[
  {
    "path": ".github/CODEOWNERS",
    "content": "*       @viclovsky\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE.md",
    "content": "[//]: # (\n. This repository's issues are reserved for feature requests and bug reports.\n.\n. Make sure you have a clear name for your issue. The name should start with a capital \n. letter and no dot is required in the end of the sentence. An example of good issue names:\n.\n. - Bad perfomance with a large specification\n. - Support OAS3 \n)\n\n#### I'm submitting a ... \n  - [ ] bug report\n  - [ ] feature request\n\n#### What is the current behavior?\n\n\n#### If the current behavior is a bug, please provide steps to reproduce, broken swagger specification and swagger-coverage-output:\n\n\n#### What is the expected behavior?\n\n\n#### What is the motivation / use case for changing the behavior?\n\n\n#### Other information \n\n[//]: # (\n. e.g. detailed explanation, stacktraces, related issues, suggestions \n. how to fix, links for us to have more context\n)\n"
  },
  {
    "path": ".github/dependabot.yml",
    "content": "version: 2\nupdates:\n- package-ecosystem: gradle\n  directory: /\n  schedule:\n    interval: weekly\n- package-ecosystem: github-actions\n  directory: /\n  schedule:\n    interval: weekly\n"
  },
  {
    "path": ".github/release-drafter.yml",
    "content": "name-template: '$NEXT_MINOR_VERSION'\ntag-template: '$NEXT_MINOR_VERSION'\ncategories:\n  - title: '🚀 New Features'\n    label: 'type:new feature'\n  - title: '🔬 Improvements'\n    label: 'type:improvement'\n  - title: '🐞 Bug Fixes'\n    label: 'type:bug'\n\nchange-template: '* $TITLE (via #$NUMBER) - @$AUTHOR'\ntemplate: |\n  $CHANGES\n\n  ## 👀 Links\n\n  [Commits since $PREVIOUS_TAG](https://github.com/viclovsky/swagger-coverage/compare/$PREVIOUS_TAG...master)"
  },
  {
    "path": ".github/workflows/build.yml",
    "content": "name: CI\n\non:\n  pull_request:\n    branches:\n      - '*'\n  push:\n    branches:\n      - 'master'\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n\n    - uses: actions/checkout@v3\n\n    - name: Set up JDK\n      uses: actions/setup-java@v3\n      with:\n        distribution: 'temurin'\n        java-version: 8\n        cache: 'gradle'\n\n    - name: Gradle Build\n      run: ./gradlew build\n\n    - name: Run Demo\n      if: github.event_name == 'pull_request'\n      run: ./run.sh\n\n    - uses: actions/upload-artifact@v3\n      if: github.event_name == 'pull_request'\n      with:\n        name: custom-report.html\n        path: custom-report.html\n"
  },
  {
    "path": ".github/workflows/gradle-wrapper-validation.yml",
    "content": "name: \"Validate Gradle Wrapper\"\n\non:\n  push:\n    branches:\n    - master\n    paths:\n      - 'gradlew'\n      - 'gradlew.bat'\n      - 'gradle/wrapper/**'\n      - '.github/workflows/gradle-wrapper-validation.yml'\n  pull_request:\n    branches:\n    - master\n    paths:\n      - 'gradlew'\n      - 'gradlew.bat'\n      - 'gradle/wrapper/**'\n      - '.github/workflows/gradle-wrapper-validation.yml'\n\njobs:\n  validation:\n    name: \"Validation\"\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - uses: gradle/wrapper-validation-action@v1\n"
  },
  {
    "path": ".github/workflows/label-verify.yml",
    "content": "\nname: \"Verify type labels\"\n\non:\n  pull_request:\n    types: [opened, labeled, unlabeled, synchronize]\n\njobs:\n  triage:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: zwaldowski/match-label-action@v2\n        with:\n          allowed: 'type:new feature, type:improvement, type:bug'"
  },
  {
    "path": ".github/workflows/release-draft.yml",
    "content": "name: Release Draft\n\non:\n  push:\n    branches:\n      - master\n\njobs:\n  update_draft_release:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: toolmantim/release-drafter@v5.2.0\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}"
  },
  {
    "path": ".github/workflows/release.yml",
    "content": "name: Release\n\non:\n  release:\n    types: [published]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v1\n      - name: Set up JDK\n        uses: actions/setup-java@v1\n        with:\n          java-version: 8\n      - run: echo \"::set-output name=version::${GITHUB_REF:10}\"\n        id: release\n      - name: \"Gradle Build\"\n        run: ./gradlew build -Pversion=${{ steps.release.outputs.version }}\n\n      - name: Prepare to publish\n        run: |\n          echo '${{secrets.GPG_KEY_CONTENTS}}' | base64 -d > ${{ github.workspace }}/publish_key.gpg\n          gpg --quiet --batch --yes --decrypt --passphrase=\"${{secrets.SECRET_PASSPHRASE}}\" \\\n          --output ${{ github.workspace }}/secret.gpg ${{ github.workspace }}/publish_key.gpg\n\n      - name: \"Publish packages to Maven Central\"\n        env:\n          SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}\n          SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}\n        run: ./gradlew --no-parallel publishAllPublicationsToSonatypeRepository -Pversion=${{ steps.release.outputs.version }} -Psigning.secretKeyRingFile=${{ github.workspace }}/secret.gpg -Psigning.keyId=${{secrets.SIGNING_KEYID}} -Psigning.password=${{secrets.SIGNING_PASSWORD}}\n\n      - name: \"Publish Zip to GitHub\"\n        uses: actions/upload-release-asset@v1\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        with:\n          upload_url: ${{ github.event.release.upload_url }}\n          asset_path: ./swagger-coverage-commandline/build/distributions/swagger-coverage-commandline-${{ steps.release.outputs.version }}.zip\n          asset_name: swagger-coverage-${{ steps.release.outputs.version }}.zip\n          asset_content_type: application/octet-stream\n      - name: \"Publish Tar to GitHub\"\n        uses: actions/upload-release-asset@v1\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        with:\n          upload_url: ${{ github.event.release.upload_url }}\n          asset_path: ./swagger-coverage-commandline/build/distributions/swagger-coverage-commandline-${{ steps.release.outputs.version }}.tar\n          asset_name: swagger-coverage-${{ steps.release.outputs.version }}.tar\n          asset_content_type: application/octet-stream"
  },
  {
    "path": ".gitignore",
    "content": "# IDEA files\n.idea\n*.iml\n\n# Gradle\n.gradle\nbuild\n\n# Mac OS\n.DS_Store\n\n# Allure\nallure-results\nbin/\n"
  },
  {
    "path": "LICENSE",
    "content": "                                 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 [2019] [viclovsky]\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": "README.md",
    "content": "[license]: http://www.apache.org/licenses/LICENSE-2.0 \"Apache License 2.0\"\n[release]: https://github.com/viclovsky/swagger-coverage/releases/latest \"Latest release\"\n[release-badge]: https://img.shields.io/github/release/viclovsky/swagger-coverage.svg?style=flat\n[maven]: https://repo.maven.apache.org/maven2/com/github/viclovsky/swagger-coverage-commandline/ \"Maven Central\"\n[maven-badge]: https://img.shields.io/maven-central/v/com.github.viclovsky/swagger-coverage-commandline.svg?style=flat\n\n[![Build Status](https://github.com/viclovsky/swagger-coverage/workflows/Build/badge.svg)](https://github.com/viclovsky/swagger-coverage/actions)\n[![release-badge][]][release]\n[![maven-badge][]][maven] \n\n# swagger-coverage\nSwagger-coverage gives a full picture about coverage of API tests (regression) based on OAS (Swagger). \nBy saying coverage we mean not a broad theme functionality, but presence (or absence) of calls defined by API methods, parameters, return codes or other conditions which corresponds specification of API.\n\n![Swagger Coverage Report](.github/swagger-coverage.png)\n\n## How it works\nProducing coverage report consists of two parts. Firstly, during test execution, filter/interceptor/proxy save information of calls in swagger format in specific folder on executing tests.\nThe next stage is to compare saved result with generated conditions from current API specification and builds report.  \n\n## How to use and examples\nYou can use swagger-coverage with any language and framework. You need to have proxy/filter/interceptor that accumulates data in swagger format. \nSwagger-coverage have rest-assured integration from the box.\n\n> There is also a Karate integration, which has its own [manual](/swagger-coverage-karate/README.md).\n\nAdd filter dependency:\n```xml\n <dependency>\n     <groupId>com.github.viclovsky</groupId>\n     <artifactId>swagger-coverage-rest-assured</artifactId>\n     <version>${latest-swagger-coverage-version}</version>\n </dependency>\n```\nor if use gradle, it can be added like\n\n```\ncompile \"com.github.viclovsky:swagger-coverage-rest-assured:$latest-swagger-coverage-version\"\n```\n\nJust add filter into test client SwaggerCoverageRestAssured (SwaggerCoverageV3RestAssured for v3). For instance, as presented below:\n```java\nRestAssured.given().filter(new SwaggerCoverageRestAssured())\n```\n\n* Download and run command line.\nDownload zip archive and unpack it. Don't forget to replace {latest-swagger-coverage-version} to latest version. \n```\nwget https://github.com/viclovsky/swagger-coverage/releases/download/{latest-swagger-coverage-version}/swagger-coverage-{latest-swagger-coverage-version}.zip\nunzip swagger-coverage-commandline-{latest-swagger-coverage-version}.zip\n```\n\nHere is help of unzip swagger-commandline\n\n```\n./swagger-coverage-commandline --help\n\n  Options:\n  * -s, --spec\n      Path to local or URL to remote swagger specification.\n  * -i, --input\n      Path to folder with generated files with coverage.\n    -c, --configuration\n      Path to file with report configuration.\n    --help\n      Print commandline help.\n    -q, --quiet\n      Switch on the quiet mode.\n      Default: false\n    -v, --verbose\n      Switch on the verbose mode.\n      Default: false\n```\n\nTo compare result of API tests with current API specification and build report call command line tool after running tests like that:\n\n```\n./swagger-coverage-commandline -s swagger.json -i swagger-coverage-output\n```\n\nOutput of the command:\n```\n19:21:21 INFO  OperationSwaggerCoverageCalculator - Empty coverage:\n...\n19:21:21 INFO  OperationSwaggerCoverageCalculator - Partial coverage:\n...\n19:21:21 INFO  OperationSwaggerCoverageCalculator - Full coverage:\n...\n19:21:21 INFO  OperationSwaggerCoverageCalculator - Conditions: 874/2520\n19:21:21 INFO  OperationSwaggerCoverageCalculator - Empty coverage 49.284 %\n19:21:21 INFO  OperationSwaggerCoverageCalculator - Partial coverage 12.034 %\n19:21:21 INFO  OperationSwaggerCoverageCalculator - Full coverage 38.682 %\n19:21:21 INFO  FileSystemResultsWriter - Write html report in file '.../swagger-coverage-report.html'\n```\nResults (swagger-coverage-report.html/swagger-coverage-results.json) will be created after running of swagger-coverage.\n\n## Configuration options\nSwagger-coverage report can be configured by json-file. \nYou can control list of coverage, which be generated and checked for results.\n\n## Rules configuration options\nOptions for different rules are placed in \"rules\" section. \nYou can disable some rules or change their behavior.\n\n#### Checking response http-status\nThis rule create condition for every status from *responses*-section of swagger specification.\nCondition mark *covered* when report generator find specific status in results files.\nOptions for this rules are placed in *status* subsection in *rules* sections.\n\nYou can setup next options:\n\n**enable** - *true/false*. You can disable this rule. Default value is *true*.\n\n**filter** - *[val1,val2]*. Rule will ignore all status, which not in filter list.\n\n**ignore** - *[val1,val2]*. Rule will ignore all status, which in ignore list.\n\n```` \n{\n  \"rules\" : {\n    \"status\": {\n      \"enable\": true,\n      \"ignore\": [\"400\",\"500\"],\n      \"filter\": [\"200\"]\n    },\n\n    ....\n  },\n  \n  ....\n}\n````\n\n#### Checking the list of declared and received statuses\nThis rule create condition for comparing declared and received status. \nCondition marked as *covered* when result not contains any of undeclared status.\n*Uncovered* state of this condition indicates missed status in original swagger-documentation \nor server errors.\nOptions for this rules are placed in *only-declared-status* subsection in *rules* sections.\n\n\nYou can setup next options:\n\n**enable** - *true/false*. You can disable this rule. Default value is *true*.\n\n````\n{\n  \"rules\" : {\n\n    ....\n\n    \"only-declared-status\" : {\n      \"enable\" : true\n    }\n  },\n\n   ....\n}\n````\n\n#### Excluding deprecated operations from the coverage report statistic\nThis rule is created for cases when you don't want to measure coverage of deprecated operations, but only for actual ones. <br>\nIf an operation is deprecated then it will be excluded from *Full*, *Partial*, and *Empty* categories and won't affect the \"Operations coverage summary\"\n\nOptions for this rule are placed in \"*exclude-deprecated*\" subsection in *rules* sections.\n\nYou can set up next options:\n\n**enable** - *true/false*. <br>\nBy default, this rule is not enabled. Add it to the config file with *true* value to enable this rule, like in the example below:\n\n````\n{\n  \"rules\" : {\n\n    ....\n\n    \"exclude-deprecated\" : {\n      \"enable\" : true\n    }\n  },\n\n   ....\n}\n````\n\nIf you need you can add your rules for generation of conditions. So, please, send your PRs.\n\n## Result writer configuration\nOptions for report generation setting are placed in *writers* sections.\n\n#### HTML report writer\nOptions for html-report placed in subsection *html* of *writers* sections.\n\nYou can setup next options:\n\n**locale** - two latter language code. Now supported only *en/ru*.\n\n**filename** - filename for html report.\n\n**numberFormat** - [Extended Java decimal format](https://freemarker.apache.org/docs/ref_builtins_number.html#topic.extendedJavaDecimalFormat) to control how numbers are displayed in the report.\n\n````\n{\n  ....\n\n  \"writers\": {\n      \"html\": {\n        \"locale\": \"ru\",\n        \"filename\":\"report.html\",\n        \"numberFormat\": \"0.##\"\n      }\n  }\n}\n````\n\n#### Report customization\nTo customize your http report with your own template set full path to the template like below:\n````\n{\n  ....\n  \n  \"writers\": {\n    \"html\": {\n      ....\n      \"customTemplatePath\": \"/full/path/to/report_custom.ftl\"\n    }\n  }\n}\n````\n\n[Look here](https://github.com/swagger-api/swagger-parser/blob/master/modules/swagger-parser-core/src/main/java/io/swagger/v3/parser/core/models/ParseOptions.java) to see all available options.\n\n\n## Demo\nI have prepared several tests. Thus you are able to have a look and touch swagger-coverage. Just run ```run.sh``` script.\n\n## Important remark\nSwagger-coverage works fine with clients which were generated from swagger (for example: https://github.com/OpenAPITools/openapi-generator). \nBecause all methods/parameters which will be saved are 100% compatible with current API specification. \n\n## Requirements \n\nFor a moment swagger-coverage  is compatible only with OpenApi specifications v2 & v3. It is possible that swagger-coverage will support other versions.\n\n## Pull Requests\nMy project is open for any enhancement. So, your help is much appreciated. Please, feel free to open your pull request or issue and I will consider it in several days.\n\n## Created & Maintained By\n[Victor Orlovsky](https://github.com/viclovsky)\n\n## Contributing to swagger-coverage\nThanks to all people who contributed. Especially \n\n* [@TemaMak](https://github.com/TemaMak) \n* [@Emilio-Pega](https://github.com/Emilio-Pega)\n\nwho have contributed significant improvements to swagger-coverage.\n\n## License\nSwagger coverage is released under version 2.0 of the [Apache License](http://www.apache.org/licenses/LICENSE-2.0)\n"
  },
  {
    "path": "build.gradle.kts",
    "content": "import io.spring.gradle.dependencymanagement.dsl.DependencyManagementExtension\n\nbuildscript {\n    repositories {\n        mavenLocal()\n    }\n}\n\nplugins {\n    java\n    id(\"io.spring.dependency-management\") version \"1.0.11.RELEASE\"\n}\n\ngroup = \"com.github.viclovsky\"\nversion = version\n\nval root = rootProject.projectDir\nval gradleScriptDir by extra(\"$root/gradle\")\n\njava {\n    sourceCompatibility = JavaVersion.VERSION_1_8\n}\n\nconfigure(subprojects) {\n    group = \"com.github.viclovsky\"\n    version = version\n\n    apply(plugin = \"io.spring.dependency-management\")\n    apply(plugin = \"java\")\n    apply(plugin = \"java-library\")\n\n    configure<DependencyManagementExtension> {\n        imports {\n            mavenBom(\"com.fasterxml.jackson:jackson-bom:2.9.8\")\n        }\n        dependencies {\n            dependency(\"org.freemarker:freemarker:2.3.31\")\n\n            //swagger 2.x\n            dependency(\"io.swagger:swagger-models:1.6.6\")\n            //swagger 3.x\n            dependency(\"io.swagger.core.v3:swagger-core:2.2.0\")\n            dependency(\"io.swagger.core.v3:swagger-models:2.2.0\")\n            dependency(\"io.swagger.parser.v3:swagger-parser:2.0.32\")\n\n            dependency(\"org.slf4j:slf4j-api:1.7.32\")\n            dependency(\"ch.qos.logback:logback-classic:1.2.10\")\n\n            dependency(\"com.beust:jcommander:1.81\")\n            dependency(\"junit:junit:4.13.2\")\n            dependency(\"org.hamcrest:hamcrest:2.2\")\n            dependency(\"com.jayway.jsonpath:json-path-assert:2.7.0\")\n            dependency(\"io.rest-assured:rest-assured:4.4.0\")\n            dependency(\"com.github.tomakehurst:wiremock:2.27.2\")\n            dependency(\"com.fasterxml.jackson.core:jackson-core:2.12.3\")\n            dependency(\"com.fasterxml.jackson.core:jackson-databind:2.12.3\")\n            dependency(\"com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.12.3\")\n            dependency(\"com.fasterxml.jackson.core:jackson-annotations:2.12.3\")\n            dependency(\"org.springframework:spring-web:5.3.7\")\n            dependency(\"com.intuit.karate:karate-core:1.2.0.RC1\")\n        }\n    }\n\n    java {\n        sourceCompatibility = JavaVersion.VERSION_1_8\n        targetCompatibility = JavaVersion.VERSION_1_8\n    }\n\n    val sourceJar by tasks.creating(Jar::class) {\n        from(sourceSets.getByName(\"main\").allSource)\n        archiveClassifier.set(\"sources\")\n    }\n\n    val javadocJar by tasks.creating(Jar::class) {\n        from(tasks.getByName(\"javadoc\"))\n        archiveClassifier.set(\"javadoc\")\n    }\n\n    tasks.withType(Javadoc::class) {\n        (options as StandardJavadocDocletOptions).addStringOption(\"Xdoclint:none\", \"-quiet\")\n    }\n\n    tasks.withType<GenerateModuleMetadata> {\n        enabled = false\n    }\n\n    artifacts.add(\"archives\", sourceJar)\n    artifacts.add(\"archives\", javadocJar)\n\n\n    tasks.compileJava {\n        options.encoding = \"UTF-8\"\n    }\n\n    tasks.compileTestJava {\n        options.encoding = \"UTF-8\"\n        options.compilerArgs.add(\"-parameters\")\n    }\n\n    tasks.jar {\n        manifest {\n            attributes(mapOf(\n                    \"Implementation-Title\" to project.name,\n                    \"Implementation-Version\" to project.version\n\n            ))\n        }\n    }\n\n    apply(from = \"$gradleScriptDir/maven-publish.gradle\")\n}\n\nrepositories {\n    mavenCentral()\n}\n\n"
  },
  {
    "path": "gradle/maven-publish.gradle",
    "content": "apply plugin: 'maven-publish'\napply plugin: 'signing'\n\npublishing {\n    publications {\n        gpr(MavenPublication) {\n            from components.java\n            artifact sourceJar\n            artifact javadocJar\n\n            pom {\n                name = project.name\n                description = project.name\n                url = \"https://github.com/viclovsky/swagger-coverage\"\n                organization {\n                    name = \"viclovsky\"\n                    url = \"https://github.com/viclovsky\"\n                }\n                licenses {\n                    license {\n                        name = 'The Apache Software License, Version 2.0'\n                        url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'\n                        distribution = 'repo'\n                    }\n                }\n                scm {\n                    url = 'https://github.com/viclovsky/swagger-coverage'\n                    connection = 'scm:git:git://github.com/viclovsky/swagger-coverage'\n                    developerConnection = 'scm:git:git://github.com/viclovsky/swagger-coverage'\n                }\n                developers {\n                    developer {\n                        id = 'viclovsky'\n                        name = 'Victor Orlovsky'\n                        email = 'viclovsky@gmail.com'\n                    }\n                }\n                issueManagement {\n                    system = 'Github Issues'\n                    url = 'https://github.com/viclovsky/swagger-coverage/issues'\n                }\n            }\n        }\n    }\n\n    repositories {\n        maven {\n            name = \"sonatype\"\n            url = uri(\"https://oss.sonatype.org/service/local/staging/deploy/maven2\")\n            credentials {\n                username = project.hasProperty('SONATYPE_USERNAME') ? project.property('SONATYPE_USERNAME') : System.getenv('SONATYPE_USERNAME')\n                password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD')\n            }\n        }\n    }\n}\n\nsigning {\n    sign publishing.publications\n}\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-7.6.1-bin.zip\nnetworkTimeout=10000\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n"
  },
  {
    "path": "gradle.properties",
    "content": "version=1.0-SNAPSHOT"
  },
  {
    "path": "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": "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": "jitpack.yml",
    "content": "jdk:\n  - openjdk8\ninstall:\n   - ./gradlew clean build publishToMavenLocal -x signGprPublication\n"
  },
  {
    "path": "run.sh",
    "content": "./gradlew clean build -x test\nrm -r -f swagger-coverage-commandline-1.0-SNAPSHOT\nunzip swagger-coverage-commandline/build/distributions/swagger-coverage-commandline-1.0-SNAPSHOT.zip\n./swagger-coverage-commandline-1.0-SNAPSHOT/bin/swagger-coverage-commandline -s swagger-coverage-commandline/src/test/resources/v3/petstory.yaml -i swagger-coverage-commandline/src/test/resources/v3/swagger-coverage-output -c swagger-coverage-commandline/src/test/resources/configuration.json"
  },
  {
    "path": "settings.gradle.kts",
    "content": "rootProject.name = \"swagger-coverage\"\n\ninclude(\"swagger-coverage-commandline\")\ninclude(\"swagger-coverage-rest-assured\")\ninclude(\"swagger-coverage-commons\")\ninclude(\"swagger-coverage-karate\")\n"
  },
  {
    "path": "swagger-coverage-commandline/build.gradle.kts",
    "content": "plugins {\n    java\n    `java-library`\n    application\n}\n\ndescription = \"Swagger-coverage Commandline\"\n\napplication {\n    mainClass.set(\"com.github.viclovsky.swagger.coverage.CommandLine\")\n}\n\njava {\n    sourceCompatibility = JavaVersion.VERSION_1_8\n}\n\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    api(project(\":swagger-coverage-commons\"))\n    implementation(\"io.swagger.parser.v3:swagger-parser\")\n    implementation(\"org.slf4j:slf4j-api\")\n    implementation(\"ch.qos.logback:logback-classic\")\n    implementation(\"com.beust:jcommander\")\n    implementation(\"org.springframework:spring-web\")\n    testImplementation(\"junit:junit\")\n    testImplementation(\"org.hamcrest:hamcrest\")\n    testImplementation(\"com.jayway.jsonpath:json-path-assert\")\n}\n\ntasks {\n    test {\n        //set the workingDir to the build dir so we don't pollute the main project dir\n        //with generated test files\n        workingDir(buildDir)\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/CommandLine.java",
    "content": "package com.github.viclovsky.swagger.coverage;\n\nimport ch.qos.logback.classic.Level;\nimport com.beust.jcommander.JCommander;\nimport com.beust.jcommander.ParameterException;\nimport com.beust.jcommander.Parameters;\nimport com.beust.jcommander.ParametersDelegate;\nimport com.github.viclovsky.swagger.coverage.core.generator.Generator;\nimport com.github.viclovsky.swagger.coverage.option.MainOptions;\nimport com.github.viclovsky.swagger.coverage.option.VerboseOptions;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.util.Optional;\n\n\n@Parameters(commandNames = \"swagger-coverage\", commandDescription = \"Swagger-coverage Commandline\")\npublic class CommandLine {\n\n    @ParametersDelegate\n    private MainOptions mainOptions = new MainOptions();\n\n    @ParametersDelegate\n    private VerboseOptions verboseOptions = new VerboseOptions();\n\n    private static final Logger LOGGER = LoggerFactory.getLogger(CommandLine.class);\n    private final JCommander commander = new JCommander(this);\n\n    public static void main(final String[] argv) {\n        final CommandLine commandLine = new CommandLine();\n\n        final ExitCode exitCode = commandLine\n                .parse(argv)\n                .orElseGet(commandLine::run);\n        System.exit(exitCode.getCode());\n    }\n\n    @SuppressWarnings({\"PMD.AvoidLiteralsInIfCondition\", \"ReturnCount\"})\n    public Optional<ExitCode> parse(final String... args) {\n        if (args.length == 0) {\n            printUsage(commander);\n            return Optional.of(ExitCode.ARGUMENT_PARSING_ERROR);\n        }\n        try {\n            commander.parse(args);\n        } catch (ParameterException e) {\n            LOGGER.debug(\"Error during arguments parsing: {}\", e);\n            LOGGER.info(\"Could not parse arguments: {}\", e.getMessage());\n            printUsage(commander);\n            return Optional.of(ExitCode.ARGUMENT_PARSING_ERROR);\n        }\n\n        return Optional.empty();\n    }\n\n    private ExitCode run() {\n\n        ch.qos.logback.classic.Logger rootLogger =\n                (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);\n\n        if (verboseOptions.isQuiet()) {\n            rootLogger.setLevel(Level.OFF);\n        }\n\n        if (verboseOptions.isVerbose()) {\n            rootLogger.setLevel(Level.DEBUG);\n        }\n\n        if (mainOptions.isHelp()) {\n            printUsage(commander);\n            return ExitCode.NO_ERROR;\n        }\n\n        new Generator().setInputPath(mainOptions.getInputPath())\n                .setSpecPath(mainOptions.getSpecPath())\n                .setConfigurationPath(mainOptions.getConfiguration())\n                .run();\n\n        return ExitCode.NO_ERROR;\n    }\n\n\n    private void printUsage(final JCommander commander) {\n        commander.usage();\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/ExitCode.java",
    "content": "package com.github.viclovsky.swagger.coverage;\n\npublic enum ExitCode {\n\n    NO_ERROR(0),\n    GENERIC_ERROR(1),\n    ARGUMENT_PARSING_ERROR(127);\n\n    private final int code;\n\n    ExitCode(final int code) {\n        this.code = code;\n    }\n\n    public int getCode() {\n        return code;\n    }\n\n    public boolean isSuccess() {\n        return 0 == code;\n    }\n\n}"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/configuration/Configuration.java",
    "content": "package com.github.viclovsky.swagger.coverage.configuration;\n\nimport com.github.viclovsky.swagger.coverage.configuration.options.ConfigurationOptions;\nimport com.github.viclovsky.swagger.coverage.configuration.options.RuleConfigurationOptions;\nimport com.github.viclovsky.swagger.coverage.core.results.builder.core.StatisticsBuilder;\nimport com.github.viclovsky.swagger.coverage.core.rule.core.ConditionRule;\nimport com.github.viclovsky.swagger.coverage.core.writer.CoverageResultsWriter;\nimport io.swagger.v3.oas.models.OpenAPI;\n\nimport java.util.List;\nimport java.util.stream.Collectors;\n\npublic class Configuration {\n    protected ConfigurationOptions options = new ConfigurationOptions();\n    private List<ConditionRule> defaultRules;\n    private List<StatisticsBuilder> registeredBuilders;\n\n    /**\n     * Configured data\n     **/\n    private List<ConditionRule> configuredRules = null;\n    private List<StatisticsBuilder> configuredBuilders = null;\n    private List<CoverageResultsWriter> configuredResultsWriters = null;\n\n    public Configuration() {\n    }\n\n    public List<ConditionRule> getRulesList() {\n        if (configuredRules == null) {\n            configuredRules = defaultRules.stream()\n                    .filter(rule -> enableByRuleOptions(rule.getId()))\n                    .map(rule -> rule.configure(options.getRules().getOrDefault(rule.getId(),\n                            new RuleConfigurationOptions())))\n                    .collect(Collectors.toList());\n        }\n        return configuredRules;\n    }\n\n    public List<StatisticsBuilder> getStatisticsBuilders(OpenAPI specification) {\n        if (configuredBuilders == null) {\n            configuredBuilders = registeredBuilders\n                    .stream().map(builder -> builder\n                            .configure(options)\n                            .configure(specification, getRulesList())\n                    )\n                    .collect(Collectors.toList());\n        }\n\n        return configuredBuilders;\n    }\n\n    protected boolean enableByRuleOptions(String id) {\n        RuleConfigurationOptions option = options.getRules().get(id);\n        if (option != null) {\n            return option.isEnable();\n        }\n\n        return true;\n    }\n\n    public Configuration setOptions(ConfigurationOptions options) {\n        this.options = options;\n        return this;\n    }\n\n    public RuleConfigurationOptions getOption(String optionKey) {\n        return this.options.getRules().get(optionKey);\n    }\n\n    public Configuration setDefaultRules(List<ConditionRule> defaultRules) {\n        this.defaultRules = defaultRules;\n        return this;\n    }\n\n    public Configuration setRegisteredBuilders(List<StatisticsBuilder> registeredBuilders) {\n        this.registeredBuilders = registeredBuilders;\n        return this;\n    }\n\n    public List<StatisticsBuilder> getConfiguredBuilders() {\n        return configuredBuilders;\n    }\n\n    public Configuration setConfiguredBuilders(List<StatisticsBuilder> configuredBuilders) {\n        this.configuredBuilders = configuredBuilders;\n        return this;\n    }\n\n    public List<CoverageResultsWriter> getConfiguredResultsWriters() {\n        return configuredResultsWriters;\n    }\n\n    public Configuration setConfiguredResultsWriters(List<CoverageResultsWriter> configuredResultsWriters) {\n        this.configuredResultsWriters = configuredResultsWriters;\n        return this;\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/configuration/ConfigurationBuilder.java",
    "content": "package com.github.viclovsky.swagger.coverage.configuration;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.github.viclovsky.swagger.coverage.configuration.options.ConfigurationOptions;\nimport com.github.viclovsky.swagger.coverage.core.results.builder.core.StatisticsBuilder;\nimport com.github.viclovsky.swagger.coverage.core.results.builder.postbuilder.ConditionStatisticsBuilder;\nimport com.github.viclovsky.swagger.coverage.core.results.builder.postbuilder.ConfigurationStatisticsBuilder;\nimport com.github.viclovsky.swagger.coverage.core.results.builder.postbuilder.FlatOperationBuilder;\nimport com.github.viclovsky.swagger.coverage.core.results.builder.postbuilder.SwaggerInfoBuilder;\nimport com.github.viclovsky.swagger.coverage.core.results.builder.postbuilder.TagStatisticsBuilder;\nimport com.github.viclovsky.swagger.coverage.core.results.builder.postbuilder.ZeroCallStatisticsBuilder;\nimport com.github.viclovsky.swagger.coverage.core.results.builder.prebuilder.CoverageStatisticsBuilder;\nimport com.github.viclovsky.swagger.coverage.core.results.builder.prebuilder.GenerationStatisticsBuilder;\nimport com.github.viclovsky.swagger.coverage.core.rule.body.PropertyEnumAllValuesRule;\nimport com.github.viclovsky.swagger.coverage.core.rule.body.PropertyNotEmptyRule;\nimport com.github.viclovsky.swagger.coverage.core.rule.body.PropertyNotOnlyEnumValuesRule;\nimport com.github.viclovsky.swagger.coverage.core.rule.core.ConditionRule;\nimport com.github.viclovsky.swagger.coverage.core.rule.parameter.EmptyHeaderRule;\nimport com.github.viclovsky.swagger.coverage.core.rule.body.NotEmptyBodyRule;\nimport com.github.viclovsky.swagger.coverage.core.rule.parameter.EnumAllValuesRule;\nimport com.github.viclovsky.swagger.coverage.core.rule.parameter.NotEmptyParameterRule;\nimport com.github.viclovsky.swagger.coverage.core.rule.parameter.NotOnlyEnumValuesRule;\nimport com.github.viclovsky.swagger.coverage.core.rule.status.HTTPStatusRule;\nimport com.github.viclovsky.swagger.coverage.core.rule.status.OnlyDeclaredHTTPStatusesRule;\nimport com.github.viclovsky.swagger.coverage.core.writer.CoverageResultsWriter;\nimport com.github.viclovsky.swagger.coverage.core.writer.FileSystemResultsWriter;\nimport com.github.viclovsky.swagger.coverage.core.writer.HtmlReportResultsWriter;\nimport com.github.viclovsky.swagger.coverage.core.writer.LogResultsWriter;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.io.IOException;\nimport java.nio.file.Path;\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class ConfigurationBuilder {\n\n    private static final Logger LOGGER = LoggerFactory.getLogger(ConfigurationBuilder.class);\n\n    public static Configuration build(Path path) {\n        Configuration configuration = new Configuration();\n        ConfigurationOptions options = new ConfigurationOptions();\n        ObjectMapper mapper = new ObjectMapper();\n        try {\n            if (path != null) {\n                options = mapper.readValue(path.toFile(), ConfigurationOptions.class);\n            }\n        } catch (IOException e) {\n            LOGGER.info(\"can't read configuration, use default configuration\");\n        }\n        configuration.setOptions(options)\n                .setDefaultRules(getDefaultList())\n                .setRegisteredBuilders(getDefaultBuilderList())\n                .setConfiguredResultsWriters(getResultsWriters(options));\n\n        return configuration;\n    }\n\n    private static List<CoverageResultsWriter> getResultsWriters(ConfigurationOptions options) {\n        List<CoverageResultsWriter> configuredResultsWriters = new ArrayList<>();\n\n        if (options.getWriters().isEmpty()) {\n            configuredResultsWriters.add(new HtmlReportResultsWriter());\n            configuredResultsWriters.add(new LogResultsWriter());\n            configuredResultsWriters.add(new FileSystemResultsWriter());\n        } else {\n            options.getWriters()\n                    .forEach((key, value) -> {\n                        switch (key) {\n                            case \"html\":\n                                configuredResultsWriters.add(\n                                        new HtmlReportResultsWriter(value)\n                                );\n                                break;\n                            case \"LOGGER\":\n                                configuredResultsWriters.add(\n                                        new LogResultsWriter()\n                                );\n                                break;\n                            case \"json\":\n                                configuredResultsWriters.add(\n                                        new FileSystemResultsWriter(value.getFilename())\n                                );\n                                break;\n                        }\n                    });\n        }\n\n        return configuredResultsWriters;\n    }\n\n    private static List<ConditionRule> getDefaultList() {\n        List<ConditionRule> registeredRules = new ArrayList<>();\n\n        registeredRules.add(new HTTPStatusRule());\n        registeredRules.add(new NotEmptyParameterRule());\n        registeredRules.add(new EnumAllValuesRule());\n        registeredRules.add(new NotEmptyBodyRule());\n        registeredRules.add(new OnlyDeclaredHTTPStatusesRule());\n        registeredRules.add(new EmptyHeaderRule());\n        registeredRules.add(new NotOnlyEnumValuesRule());\n        registeredRules.add(new PropertyEnumAllValuesRule());\n        registeredRules.add(new PropertyNotOnlyEnumValuesRule());\n        registeredRules.add(new PropertyNotEmptyRule());\n\n        return registeredRules;\n    }\n\n    private static List<StatisticsBuilder> getDefaultBuilderList() {\n        List<StatisticsBuilder> registeredBuilders = new ArrayList<>();\n\n        registeredBuilders.add(new CoverageStatisticsBuilder());\n        registeredBuilders.add(new GenerationStatisticsBuilder());\n        registeredBuilders.add(new ConditionStatisticsBuilder());\n        registeredBuilders.add(new ZeroCallStatisticsBuilder());\n        registeredBuilders.add(new TagStatisticsBuilder());\n        registeredBuilders.add(new ConfigurationStatisticsBuilder());\n        registeredBuilders.add(new FlatOperationBuilder());\n        registeredBuilders.add(new SwaggerInfoBuilder());\n\n        return registeredBuilders;\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/configuration/options/ConfigurationOptions.java",
    "content": "package com.github.viclovsky.swagger.coverage.configuration.options;\n\nimport io.swagger.v3.parser.core.models.ParseOptions;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\npublic class ConfigurationOptions {\n\n    private Map<String, RuleConfigurationOptions> rules = new HashMap<>();\n    private Map<String, ResultsWriterOptions> writers = new HashMap<>();\n\n    public Map<String, RuleConfigurationOptions> getRules() {\n        return rules;\n    }\n\n    public ConfigurationOptions setRules(Map<String, RuleConfigurationOptions> rules) {\n        this.rules = rules;\n        return this;\n    }\n\n    public Map<String, ResultsWriterOptions> getWriters() {\n        return writers;\n    }\n\n    public ConfigurationOptions setWriters(Map<String, ResultsWriterOptions> writers) {\n        this.writers = writers;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        return \"ConfigurationOptions{\" +\n                \"rules=\" + rules.toString() +\n                \", writers=\" + writers.toString() +\n                '}';\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/configuration/options/MainOptions.java",
    "content": "package com.github.viclovsky.swagger.coverage.configuration.options;\n\npublic class MainOptions {\n\n    //todo: add more options\n\n    @Override\n    public String toString() {\n        return \"MainOptions{\" +\n\n                '}';\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/configuration/options/ResultsWriterOptions.java",
    "content": "package com.github.viclovsky.swagger.coverage.configuration.options;\n\npublic class ResultsWriterOptions {\n    private String filename;\n    private String locale = \"en\";\n    private String customTemplatePath;\n    private String numberFormat = \"0.###\";\n\n    public String getFilename() {\n        return filename;\n    }\n\n    public ResultsWriterOptions setFilename(String filename) {\n        this.filename = filename;\n        return this;\n    }\n\n    public String getLocale() {\n        return locale;\n    }\n\n    public ResultsWriterOptions setLocale(String locale) {\n        this.locale = locale;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        return \"ResultsWriterOptions{\" +\n                \", filename='\" + filename + '\\'' +\n                \", locale='\" + locale + '\\'' +\n                \", customTemplatePath='\" + customTemplatePath + '\\'' +\n                \", numberFormat='\" + numberFormat + '\\'' +\n                '}';\n    }\n\n    public ResultsWriterOptions setCustomTemplatePath(String customTemplatePath) {\n        this.customTemplatePath = customTemplatePath;\n        return this;\n    }\n\n    public String getCustomTemplatePath() {\n        return customTemplatePath;\n    }\n\n    public String getNumberFormat() {return numberFormat;}\n\n    public ResultsWriterOptions setNumberFormat(String numberFormat){\n        this.numberFormat = numberFormat;\n        return this;\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/configuration/options/RuleConfigurationOptions.java",
    "content": "package com.github.viclovsky.swagger.coverage.configuration.options;\n\nimport java.util.List;\n\npublic class RuleConfigurationOptions {\n    private boolean enable = true;\n    private List<String> filter;\n    private List<String> ignore;\n\n    public boolean isEnable() {\n        return enable;\n    }\n\n    public RuleConfigurationOptions setEnable(boolean enable) {\n        this.enable = enable;\n        return this;\n    }\n\n    public List<String> getFilter() {\n        return filter;\n    }\n\n    public RuleConfigurationOptions setFilter(List<String> filter) {\n        this.filter = filter;\n        return this;\n    }\n\n    public List<String> getIgnore() {\n        return ignore;\n    }\n\n    public RuleConfigurationOptions setIgnore(List<String> ignore) {\n        this.ignore = ignore;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        return \"RuleConfigurationOptions{\" +\n                \"enable=\" + enable +\n                \", filter=\" + filter +\n                '}';\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/generator/Generator.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.generator;\n\nimport com.github.viclovsky.swagger.coverage.CoverageOutputReader;\nimport com.github.viclovsky.swagger.coverage.FileSystemOutputReader;\nimport com.github.viclovsky.swagger.coverage.configuration.Configuration;\nimport com.github.viclovsky.swagger.coverage.configuration.ConfigurationBuilder;\nimport com.github.viclovsky.swagger.coverage.core.results.Results;\nimport com.github.viclovsky.swagger.coverage.core.results.builder.core.StatisticsBuilder;\nimport io.swagger.parser.OpenAPIParser;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.parser.core.models.AuthorizationValue;\nimport io.swagger.v3.parser.core.models.ParseOptions;\nimport io.swagger.v3.parser.core.models.SwaggerParseResult;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.net.URI;\nimport java.nio.file.Path;\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class Generator {\n\n    private static final Logger LOGGER = LoggerFactory.getLogger(Generator.class);\n\n    private URI specPath;\n    private List<AuthorizationValue> specAuths;\n\n    private Path inputPath;\n\n    private Path configurationPath;\n\n    private final OpenAPIParser parser = new OpenAPIParser();\n\n    private List<StatisticsBuilder> statisticsBuilders = new ArrayList<>();\n\n    public void run() {\n        Configuration configuration = ConfigurationBuilder.build(configurationPath);\n        ParseOptions parseOptions = new ParseOptions();\n        parseOptions.setResolve(true);\n        SwaggerParseResult parsed = parser.readLocation(specPath.toString(), specAuths, parseOptions);\n        parsed.getMessages().forEach(LOGGER::info);\n        OpenAPI spec = parsed.getOpenAPI();\n\n        LOGGER.info(\"spec is {}\", spec);\n        statisticsBuilders = configuration.getStatisticsBuilders(spec);\n\n        CoverageOutputReader reader = new FileSystemOutputReader(getInputPath());\n        reader.getOutputs().forEach(this::processFile);\n\n        Results result = new Results();\n\n        statisticsBuilders.stream().filter(StatisticsBuilder::isPreBuilder).forEach(\n                statisticsBuilder -> statisticsBuilder.build(result, configuration));\n\n        statisticsBuilders.stream().filter(StatisticsBuilder::isPostBuilder).forEach(\n                statisticsBuilder -> statisticsBuilder.build(result, configuration));\n\n        configuration.getConfiguredResultsWriters().forEach(writer -> writer.write(result));\n    }\n\n    public void processFile(Path path) {\n        SwaggerParseResult parsed = parser.readLocation(path.toUri().toString(), null, null);\n        parsed.getMessages().forEach(LOGGER::info);\n        OpenAPI spec = parsed.getOpenAPI();\n        statisticsBuilders.stream().filter(StatisticsBuilder::isPreBuilder).forEach(builder ->\n                builder.add(path.toString()).add(spec));\n    }\n\n    public URI getSpecPath() {\n        return specPath;\n    }\n\n    public Generator setSpecPath(URI specPath) {\n        this.specPath = specPath;\n        return this;\n    }\n\n    public List<AuthorizationValue> getSpecAuths() {\n        return specAuths;\n    }\n\n    public Generator setSpecAuths(List<AuthorizationValue> specAuths) {\n        this.specAuths = specAuths;\n        return this;\n    }\n\n    public Path getInputPath() {\n        return inputPath;\n    }\n\n    public Generator setInputPath(Path inputPath) {\n        this.inputPath = inputPath;\n        return this;\n    }\n\n    public Path getConfigurationPath() {\n        return configurationPath;\n    }\n\n    public Generator setConfigurationPath(Path configurationPath) {\n        this.configurationPath = configurationPath;\n        return this;\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/generator/OperationConditionGenerator.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.generator;\n\nimport com.github.viclovsky.swagger.coverage.core.model.Condition;\nimport com.github.viclovsky.swagger.coverage.core.model.ConditionOperationCoverage;\nimport com.github.viclovsky.swagger.coverage.core.model.OperationKey;\nimport com.github.viclovsky.swagger.coverage.core.model.OperationsHolder;\nimport com.github.viclovsky.swagger.coverage.core.rule.core.ConditionRule;\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.Objects;\nimport java.util.TreeMap;\nimport java.util.stream.Collectors;\n\npublic class OperationConditionGenerator {\n\n    private static final Logger LOGGER = LoggerFactory.getLogger(OperationConditionGenerator.class);\n\n    public static Map<OperationKey, ConditionOperationCoverage> getOperationMap(OpenAPI swagger, List<ConditionRule> rules) {\n        OperationsHolder operations = SwaggerSpecificationProcessor.extractOperation(swagger);\n        Map<OperationKey, ConditionOperationCoverage> coverage = new TreeMap<>();\n\n        operations.getOperations().forEach((key, value) -> {\n            ConditionOperationCoverage oc = buildConditionOperationCoverage(value, rules);\n            LOGGER.debug(String.format(\"put operation %s\", key));\n            coverage.put(key, oc);\n        });\n\n        return coverage;\n    }\n\n    private static ConditionOperationCoverage buildConditionOperationCoverage(Operation operation, List<ConditionRule> rules) {\n        ConditionOperationCoverage operationCoverage = new ConditionOperationCoverage();\n        operationCoverage.setOperation(operation);\n        operationCoverage.setConditions(generateConditionList(operation, rules));\n\n        return operationCoverage;\n    }\n\n    private static List<Condition> generateConditionList(Operation operation, List<ConditionRule> rules) {\n        List<Condition> conditions = rules\n                .stream()\n                .map(rule -> rule.createCondition(operation))\n                .filter(Objects::nonNull)\n                .flatMap(List::stream)\n                .collect(Collectors.toList());\n\n        LOGGER.debug(String.format(\"created list is %s\", conditions));\n        return conditions;\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/generator/SwaggerSpecificationProcessor.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.generator;\n\nimport com.github.viclovsky.swagger.coverage.core.model.OperationKey;\nimport com.github.viclovsky.swagger.coverage.core.model.OperationsHolder;\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 java.util.List;\nimport java.util.stream.Collectors;\nimport java.util.stream.Stream;\n\npublic class SwaggerSpecificationProcessor {\n\n    private static final String X_EXAMPLE = \"x-example\";\n\n    public static OperationsHolder extractOperation(OpenAPI swagger) {\n        OperationsHolder operations = new OperationsHolder();\n\n        swagger.getPaths().keySet().forEach(path\n                -> swagger.getPaths().get(path).readOperationsMap().forEach((httpMethod, operation)\n                -> operations.addOperation(new OperationKey().setPath(path).setHttpMethod(httpMethod), operation)\n        ));\n        return operations;\n    }\n\n    public static String extractValue(Parameter p) {\n        if (p.getExtensions() != null && p.getExtensions().containsKey(X_EXAMPLE)) {\n            return (String) p.getExtensions().get(X_EXAMPLE);\n        }\n        if(p.getExample() != null) {\n            return p.getExample().toString();\n        }\n        return p.getName();\n    }\n\n    public static String extractValue(Schema schema) {\n        if (schema.getExtensions() !=null && schema.getExtensions().containsKey(X_EXAMPLE)) {\n            return (String) schema.getExtensions().get(X_EXAMPLE);\n        }\n        if(schema.getExample() != null) {\n            return schema.getExample().toString();\n        }\n\n        return schema.getName();\n    }\n\n    public static List<String> extractEnum(Parameter p) {\n        return extractEnum(p.getSchema());\n    }\n\n    public static List<String> extractEnum(Schema schema) {\n        List enums = null;\n        if (schema != null) {\n            enums = schema.getEnum();\n            if (enums == null &&\n                    schema instanceof ArraySchema &&\n                    ((ArraySchema) schema).getItems() != null) {\n                enums = ((ArraySchema) schema).getItems().getEnum();\n            }\n        }\n        if (enums != null) {\n            return ((Stream<Object>) enums.stream())\n                    .map(o -> o.toString())\n                    .collect(Collectors.toList());\n        } else {\n            return null;\n        }\n    }\n\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/model/Condition.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.model;\n\nimport io.swagger.v3.oas.models.Operation;\n\npublic abstract class Condition {\n\n    private String name;\n    private String description;\n    boolean covered = false;\n\n    public Condition(String name, String description) {\n        this.name = name;\n        this.description = description;\n    }\n\n    public abstract void postCheck();\n\n    public abstract boolean isHasPostCheck();\n\n    public abstract boolean isNeedCheck();\n\n    public abstract boolean check(Operation operation);\n\n    public abstract String getReason();\n\n    public abstract String getType();\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 getDescription() {\n        return description;\n    }\n\n    public void setDescription(String description) {\n        this.description = description;\n    }\n\n    public boolean isCovered() {\n        return covered;\n    }\n\n    public void setCovered(boolean covered) {\n        this.covered = covered;\n    }\n\n    @Override\n    public String toString() {\n        return \"Condition{\" +\n                \"name='\" + name + '\\'' +\n                \", description='\" + description + '\\'' +\n                \", covered=\" + covered +\n                '}';\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/model/ConditionOperationCoverage.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.model;\n\nimport io.swagger.v3.oas.models.Operation;\n\nimport java.util.List;\n\npublic class ConditionOperationCoverage {\n\n    private long processCount = 0;\n    private Operation operation;\n    private List<Condition> conditions;\n\n    public Operation getOperation() {\n        return operation;\n    }\n\n    public ConditionOperationCoverage setOperation(Operation operation) {\n        this.operation = operation;\n        return this;\n    }\n\n    public List<Condition> getConditions() {\n        return conditions;\n    }\n\n    public ConditionOperationCoverage setConditions(List<Condition> conditions) {\n        this.conditions = conditions;\n        return this;\n    }\n\n    public long getProcessCount() {\n        return processCount;\n    }\n\n    public ConditionOperationCoverage setProcessCount(long processCount) {\n        this.processCount = processCount;\n        return this;\n    }\n\n    public ConditionOperationCoverage increaseProcessCount() {\n        this.processCount++;\n        return this;\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/model/OperationKey.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.model;\n\nimport io.swagger.v3.oas.models.PathItem;\n\npublic class OperationKey implements Comparable {\n\n    private String path;\n    private PathItem.HttpMethod httpMethod;\n\n    @Override\n    public String toString() {\n        return path + \" \" + httpMethod;\n    }\n\n    public String getPath() {\n        return path;\n    }\n\n    public OperationKey setPath(String path) {\n        this.path = path;\n        return this;\n    }\n\n    public PathItem.HttpMethod getHttpMethod() {\n        return httpMethod;\n    }\n\n    public OperationKey setHttpMethod(PathItem.HttpMethod httpMethod) {\n        this.httpMethod = httpMethod;\n        return this;\n    }\n\n    @Override\n    public int compareTo(Object o) {\n        return this.toString().compareTo(o.toString());\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/model/OperationsHolder.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.model;\n\nimport io.swagger.v3.oas.models.Operation;\n\nimport java.util.Map;\nimport java.util.TreeMap;\n\npublic class OperationsHolder {\n\n    private Map<OperationKey, Operation> operations = new TreeMap<>();\n\n    public Map<OperationKey, Operation> getOperations() {\n        return operations;\n    }\n\n    public OperationsHolder setOperations(Map<OperationKey, Operation> operations) {\n        this.operations = operations;\n        return this;\n    }\n\n    public OperationsHolder addOperation(OperationKey operationKey, Operation operation) {\n        this.operations.put(operationKey, operation);\n        return this;\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/model/SinglePredicateCondition.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.model;\n\nimport com.github.viclovsky.swagger.coverage.core.predicate.ConditionPredicate;\nimport io.swagger.v3.oas.models.Operation;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class SinglePredicateCondition extends Condition {\n\n    private static final Logger LOGGER = LoggerFactory.getLogger(SinglePredicateCondition.class);\n\n    protected ConditionPredicate predicate;\n\n    public SinglePredicateCondition(String name, String description) {\n        super(name, description);\n    }\n\n    public SinglePredicateCondition(String name, String description, ConditionPredicate predicate) {\n        super(name, description);\n        this.predicate = predicate;\n    }\n\n    @Override\n    public void postCheck() {\n        this.covered = predicate.postCheck();\n    }\n\n    @Override\n    public boolean isHasPostCheck() {\n        return predicate.hasPostCheck();\n    }\n\n    @Override\n    public boolean isNeedCheck() {\n        return !this.covered || predicate.hasPostCheck();\n    }\n\n    @Override\n    public boolean check(Operation operation) {\n        this.covered = predicate.check(operation);\n        return this.covered;\n    }\n\n    @Override\n    public String getReason() {\n        if (predicate.getReason() != null) {\n            return predicate.getReason();\n        }\n\n        return \"\";\n    }\n\n    @Override\n    public String getType() {\n        return predicate.getClass().getSimpleName();\n    }\n\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/predicate/ConditionPredicate.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.predicate;\n\nimport io.swagger.v3.oas.models.Operation;\n\npublic abstract class ConditionPredicate {\n\n    public abstract boolean check(Operation operation);\n\n    public abstract boolean postCheck();\n\n    public abstract boolean hasPostCheck();\n\n    public abstract String getReason();\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/predicate/DefaultBodyConditionPredicate.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.predicate;\n\nimport io.swagger.v3.oas.models.Operation;\n\npublic class DefaultBodyConditionPredicate extends ConditionPredicate {\n\n    @Override\n    public boolean check(Operation operation) {\n        if(operation.getRequestBody() != null && operation.getRequestBody().getContent() != null) {\n            return operation.getRequestBody().getContent().values().size() > 0;\n        } else {\n            return false;\n        }\n    }\n\n    @Override\n    public boolean postCheck() {\n        return false;\n    }\n\n    @Override\n    public boolean hasPostCheck() {\n        return false;\n    }\n\n    @Override\n    public String getReason() {\n        return null;\n    }\n\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/predicate/DefaultParameterConditionPredicate.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.predicate;\n\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\n\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\n\npublic class DefaultParameterConditionPredicate extends ParameterConditionPredicate {\n\n    private boolean isEmpty;\n    private String name;\n    private String in;\n\n    public DefaultParameterConditionPredicate(boolean isEmpty, String name, String in) {\n        this.isEmpty = isEmpty;\n        this.name = name;\n        this.in = in;\n    }\n\n    @Override\n    public boolean check(List<Parameter> params, Map<String, ApiResponse> responses) {\n        if (params != null) {\n            Optional<Parameter> p = params.stream().filter(ParameterUtils.equalsParam(name, in)).findFirst();\n            return (isEmpty() ^ p.isPresent());\n        }\n        return isEmpty();\n    }\n\n    @Override\n    public boolean postCheck() {\n        return false;\n    }\n\n    @Override\n    public boolean hasPostCheck() {\n        return false;\n    }\n\n    @Override\n    public String getReason() {\n        return null;\n    }\n\n    public boolean isEmpty() {\n        return isEmpty;\n    }\n\n    public void setEmpty(boolean empty) {\n        isEmpty = empty;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public void setParamName(String paramName) {\n        this.name = name;\n    }\n\n    @Override\n    public String toString() {\n        return \"ConditionPredicate{\" +\n                \"isEmpty=\" + isEmpty +\n                \", paramName='\" + name + '\\'' +\n                '}';\n    }\n\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/predicate/DefaultParameterValueConditionPredicate.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.predicate;\n\nimport com.github.viclovsky.swagger.coverage.core.generator.SwaggerSpecificationProcessor;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\n\npublic class DefaultParameterValueConditionPredicate extends ParameterConditionPredicate {\n\n    private String name;\n    private String in;\n\n    private String reason;\n    private String expectedValue;\n    private List<String> currentValue = new ArrayList<>();\n\n    public DefaultParameterValueConditionPredicate(String name, String in, String value) {\n        this.name = name;\n        this.in = in;\n        this.expectedValue = value;\n    }\n\n    @Override\n    public boolean check(List<Parameter> params, Map<String, ApiResponse> responses) {\n        if (params != null) {\n            Optional<Parameter> p = params.stream().filter(ParameterUtils.equalsParam(name, in)).findFirst();\n\n            if (p.isPresent()) {\n                String val = SwaggerSpecificationProcessor.extractValue(p.get());\n                currentValue.add(val);\n            }\n        }\n\n        return currentValue.contains(expectedValue);\n    }\n\n    @Override\n    public boolean postCheck() {\n        return false;\n    }\n\n    @Override\n    public boolean hasPostCheck() {\n        return false;\n    }\n\n    @Override\n    public String getReason() {\n        return reason;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public DefaultParameterValueConditionPredicate setName(String name) {\n        this.name = name;\n        return this;\n    }\n\n    public String getValue() {\n        return expectedValue;\n    }\n\n    public DefaultParameterValueConditionPredicate setValue(String value) {\n        this.expectedValue = value;\n        return this;\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/predicate/DefaultPropertyConditionPredicate.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.predicate;\n\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.util.Optional;\n\npublic class DefaultPropertyConditionPredicate extends PropertyConditionPredicate {\n\n    protected boolean isEmpty;\n\n    public DefaultPropertyConditionPredicate(String mediaTypeName, String propertyName, boolean isEmpty) {\n        super(mediaTypeName, propertyName);\n        this.isEmpty = isEmpty;\n    }\n\n    @Override\n    public boolean postCheck() {\n        return false;\n    }\n\n    @Override\n    public boolean hasPostCheck() {\n        return false;\n    }\n\n    @Override\n    public String getReason() {\n        return null;\n    }\n\n    public boolean isEmpty() {\n        return isEmpty;\n    }\n\n    @Override\n    protected boolean check(Optional<Schema> schema) {\n        return (isEmpty() ^ schema.isPresent());\n    }\n\n    @Override\n    public DefaultPropertyConditionPredicate setPropertyName(String propertyName) {\n        return (DefaultPropertyConditionPredicate) super.setPropertyName(propertyName);\n    }\n\n    @Override\n    public DefaultPropertyConditionPredicate setMediaTypeName(String mediaTypeName) {\n        return (DefaultPropertyConditionPredicate) super.setMediaTypeName(mediaTypeName);\n    }\n\n    DefaultPropertyConditionPredicate setEmpty(boolean isEmpty) {\n        this.isEmpty = isEmpty;\n        return this;\n    }\n\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/predicate/DefaultStatusConditionPredicate.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.predicate;\n\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\n\nimport java.util.List;\nimport java.util.Map;\n\npublic class DefaultStatusConditionPredicate extends ParameterConditionPredicate {\n\n    private String statusCode;\n\n    public DefaultStatusConditionPredicate(String statusCode) {\n        this.statusCode = statusCode;\n    }\n\n    @Override\n    public boolean check(List<Parameter> params, Map<String, ApiResponse> responses) {\n        return responses.containsKey(getStatusCode());\n    }\n\n    @Override\n    public boolean postCheck() {\n        return false;\n    }\n\n    @Override\n    public boolean hasPostCheck() {\n        return false;\n    }\n\n    @Override\n    public String getReason() {\n        return null;\n    }\n\n    public String getStatusCode() {\n        return statusCode;\n    }\n\n    public void setStatusCode(String statusCode) {\n        this.statusCode = statusCode;\n    }\n\n    @Override\n    public String toString() {\n        return \"StatusConditionPredicate{\" +\n                \"statusCode=\" + statusCode +\n                '}';\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/predicate/FullStatusConditionPredicate.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.predicate;\n\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\n\nimport java.util.HashSet;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Set;\n\npublic class FullStatusConditionPredicate extends ParameterConditionPredicate {\n\n    private Set<String> expectedStatuses;\n    private Set<String> currentStatuses = new HashSet<>();\n    private String reason;\n\n    public FullStatusConditionPredicate(Set<String> expectedStatuses) {\n        this.expectedStatuses = expectedStatuses;\n    }\n\n    @Override\n    public boolean check(List<Parameter> params, Map<String, ApiResponse> responses) {\n        responses.forEach((key, value) -> currentStatuses.add(key));\n        return true;\n    }\n\n    @Override\n    public boolean postCheck() {\n        if (currentStatuses.isEmpty() && expectedStatuses != null) {\n            reason = \"No call - no statuses...\";\n            return false;\n        }\n        boolean covered = expectedStatuses.containsAll(currentStatuses);\n\n        if (!covered) {\n            currentStatuses.removeAll(expectedStatuses);\n            reason = \"Undeclared status: \" + String.join(\",\", currentStatuses);\n        }\n\n        return covered;\n    }\n\n    @Override\n    public boolean hasPostCheck() {\n        return true;\n    }\n\n    @Override\n    public String getReason() {\n        return reason;\n    }\n\n    public Set<String> getExpectedStatuses() {\n        return expectedStatuses;\n    }\n\n    public FullStatusConditionPredicate setExpectedStatuses(Set<String> expectedStatuses) {\n        this.expectedStatuses = expectedStatuses;\n        return this;\n    }\n\n    public Set<String> getCurrentStatuses() {\n        return currentStatuses;\n    }\n\n    public FullStatusConditionPredicate setCurrentStatuses(Set<String> currentStatuses) {\n        this.currentStatuses = currentStatuses;\n        return this;\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/predicate/NotOnlyParameterListValueConditionPredicate.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.predicate;\n\nimport com.github.viclovsky.swagger.coverage.core.generator.SwaggerSpecificationProcessor;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\n\nimport java.util.HashSet;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\nimport java.util.Set;\n\npublic class NotOnlyParameterListValueConditionPredicate extends ParameterConditionPredicate {\n    private String name;\n    private String in;\n\n    private String reason;\n    private Set<String> expectedValue = new HashSet<>();\n    private Set<String> currentValue = new HashSet<>();\n\n    public NotOnlyParameterListValueConditionPredicate(String name, String in, List<String> value) {\n        this.name = name;\n        this.in = in;\n        this.expectedValue.addAll(value);\n        reason = \"Checked values: -\";\n    }\n\n    @Override\n    public boolean check(List<Parameter> params, Map<String, ApiResponse> responses) {\n        if (params != null) {\n            Optional<Parameter> p = params.stream().filter(ParameterUtils.equalsParam(name, in)).findFirst();\n            if (p.isPresent()) {\n                String val = SwaggerSpecificationProcessor.extractValue(p.get());\n                currentValue.add(val);\n            }\n        }\n\n        return true;\n    }\n\n    @Override\n    public boolean postCheck() {\n        reason = \"Checked values: \" + currentValue.toString();\n        currentValue.removeAll(expectedValue);\n        return !currentValue.isEmpty();\n    }\n\n    @Override\n    public boolean hasPostCheck() {\n        return true;\n    }\n\n    @Override\n    public String getReason() {\n        return reason;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public NotOnlyParameterListValueConditionPredicate setName(String name) {\n        this.name = name;\n        return this;\n    }\n\n    public Set<String> getValue() {\n        return expectedValue;\n    }\n\n    public NotOnlyParameterListValueConditionPredicate setValue(Set<String> value) {\n        this.expectedValue = value;\n        return this;\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/predicate/ParameterConditionPredicate.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.predicate;\n\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\n\nimport java.util.List;\nimport java.util.Map;\n\npublic abstract class ParameterConditionPredicate extends ConditionPredicate {\n\n    @Override\n    public boolean check(Operation operation) {\n        return check(operation.getParameters(), operation.getResponses());\n    }\n\n    public abstract boolean check(List<Parameter> params, Map<String, ApiResponse> responses);\n\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/predicate/ParameterUtils.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.predicate;\n\nimport io.swagger.v3.oas.models.parameters.Parameter;\n\nimport java.util.function.Predicate;\n\nclass ParameterUtils {\n\n    private ParameterUtils() {\n    }\n\n    static Predicate<Parameter> equalsParam(String name, String in) {\n        return p -> (p.getName().equals(name) && p.getIn().equals(in));\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/predicate/ParameterValueConditionPredicate.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.predicate;\n\nimport com.github.viclovsky.swagger.coverage.core.generator.SwaggerSpecificationProcessor;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\n\npublic class ParameterValueConditionPredicate extends ParameterConditionPredicate {\n\n    private String name;\n    private String in;\n    private String reason;\n    private List<String> expectedValue = new ArrayList<>();\n    private List<String> currentValue = new ArrayList<>();\n\n    public ParameterValueConditionPredicate(String name, String in, List<String> value) {\n        this.name = name;\n        this.expectedValue.addAll(value);\n        this.in = in;\n    }\n\n    @Override\n    public boolean check(List<Parameter> params, Map<String, ApiResponse> responses) {\n        if (params != null) {\n            Optional<Parameter> p = params.stream().filter(ParameterUtils.equalsParam(name, in)).findFirst();\n            if (p.isPresent()) {\n                String val = SwaggerSpecificationProcessor.extractValue(p.get());\n                currentValue.add(val);\n            }\n        }\n\n        return true;\n    }\n\n    @Override\n    public boolean postCheck() {\n        boolean covered = currentValue.containsAll(expectedValue);\n\n        if (!covered) {\n            expectedValue.removeAll(currentValue);\n            reason = \"Missed values \" + expectedValue.toString();\n        }\n\n        return covered;\n    }\n\n    @Override\n    public boolean hasPostCheck() {\n        return true;\n    }\n\n    @Override\n    public String getReason() {\n        return reason;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public ParameterValueConditionPredicate setName(String name) {\n        this.name = name;\n        return this;\n    }\n\n    public List<String> getValue() {\n        return expectedValue;\n    }\n\n    public ParameterValueConditionPredicate setValue(List<String> value) {\n        this.expectedValue = value;\n        return this;\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/predicate/PropertyConditionPredicate.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.predicate;\n\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.util.Map;\nimport java.util.Objects;\nimport java.util.Optional;\nimport java.util.stream.Stream;\n\npublic abstract class PropertyConditionPredicate extends ConditionPredicate {\n    protected String mediaTypeName;\n    protected String propertyName;\n\n    public PropertyConditionPredicate(String mediaTypeName, String propertyName) {\n        this.mediaTypeName = mediaTypeName;\n        this.propertyName = propertyName;\n    }\n\n    @Override\n    public boolean check(Operation operation) {\n        if (operation.getRequestBody() == null ||\n                operation.getRequestBody().getContent() == null ||\n                operation.getRequestBody().getContent().isEmpty()) {\n            return false;\n        }\n        Optional<Schema> schema = operation.getRequestBody().getContent().entrySet()\n                .stream()\n                .filter(o -> mediaTypeName.equals(o.getKey()))\n                .map(o -> o.getValue().getSchema())\n                .filter(Objects::nonNull)\n                .flatMap(o -> (Stream<Map.Entry<String, Schema>>) o.getProperties().entrySet().stream())\n                .filter(o -> propertyName.equals(o.getKey()))\n                .map(o -> o.getValue())\n                .findFirst();\n        return check(schema);\n    }\n\n    public String getPropertyName() {\n        return propertyName;\n    }\n\n    public String getMediaTypeName() {\n        return mediaTypeName;\n    }\n\n    public PropertyConditionPredicate setPropertyName(String propertyName) {\n        this.propertyName = propertyName;\n        return this;\n    }\n\n    public PropertyConditionPredicate setMediaTypeName(String mediaTypeName) {\n        this.mediaTypeName = mediaTypeName;\n        return this;\n    }\n\n    protected abstract boolean check(Optional<Schema> schema);\n\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/predicate/PropertyValueConditionPredicate.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.predicate;\n\nimport com.github.viclovsky.swagger.coverage.core.generator.SwaggerSpecificationProcessor;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Optional;\n\npublic class PropertyValueConditionPredicate extends PropertyConditionPredicate {\n\n    private List<String> expectedValue = new ArrayList<>();\n    private List<String> currentValue = new ArrayList<>();\n    protected String reason;\n\n    public PropertyValueConditionPredicate(String mediaTypeName, String propertyName, List<String> value) {\n        super(mediaTypeName, propertyName);\n        expectedValue.addAll(value);\n    }\n\n    @Override\n    public boolean postCheck() {\n        reason = \"Checked values: \" + currentValue.toString();\n        currentValue.removeAll(expectedValue);\n        return !currentValue.isEmpty();\n    }\n\n    @Override\n    public boolean hasPostCheck() {\n        return true;\n    }\n\n    @Override\n    public String getReason() {\n        return reason;\n    }\n\n    @Override\n    protected boolean check(Optional<Schema> schema) {\n        if (schema.isPresent()) {\n            currentValue.add(SwaggerSpecificationProcessor.extractValue(schema.get()));\n        }\n        return true;\n    }\n\n    public List<String> getValue() {\n        return expectedValue;\n    }\n\n    @Override\n    public PropertyValueConditionPredicate setPropertyName(String propertyName) {\n        return (PropertyValueConditionPredicate) super.setPropertyName(propertyName);\n    }\n\n    @Override\n    public PropertyValueConditionPredicate setMediaTypeName(String mediaTypeName) {\n        return (PropertyValueConditionPredicate) super.setMediaTypeName(mediaTypeName);\n    }\n\n    public PropertyValueConditionPredicate setValue(List<String> value) {\n        this.expectedValue = value;\n        return this;\n    }\n\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/predicate/PropertyValueNotOnlyConditionPredicate.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.predicate;\n\nimport com.github.viclovsky.swagger.coverage.core.generator.SwaggerSpecificationProcessor;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Optional;\n\npublic class PropertyValueNotOnlyConditionPredicate extends PropertyConditionPredicate {\n\n    private List<String> expectedValue = new ArrayList<>();\n    private List<String> currentValue = new ArrayList<>();\n    protected String reason;\n\n    public PropertyValueNotOnlyConditionPredicate(String mediaTypeName, String propertyName, List<String> value) {\n        super(mediaTypeName, propertyName);\n        expectedValue.addAll(value);\n    }\n\n    @Override\n    public boolean postCheck() {\n        boolean covered = currentValue.containsAll(expectedValue);\n\n        if (!covered) {\n            expectedValue.removeAll(currentValue);\n            reason = \"Missed values \" + expectedValue.toString();\n        }\n\n        return covered;\n    }\n\n    @Override\n    public boolean hasPostCheck() {\n        return true;\n    }\n\n    @Override\n    public String getReason() {\n        return reason;\n    }\n\n    @Override\n    protected boolean check(Optional<Schema> schema) {\n        if (schema.isPresent()) {\n            currentValue.add(SwaggerSpecificationProcessor.extractValue(schema.get()));\n        }\n        return true;\n    }\n\n    public List<String> getValue() {\n        return expectedValue;\n    }\n\n    @Override\n    public PropertyValueNotOnlyConditionPredicate setPropertyName(String propertyName) {\n        return (PropertyValueNotOnlyConditionPredicate) super.setPropertyName(propertyName);\n    }\n\n    @Override\n    public PropertyValueNotOnlyConditionPredicate setMediaTypeName(String mediaTypeName) {\n        return (PropertyValueNotOnlyConditionPredicate) super.setMediaTypeName(mediaTypeName);\n    }\n\n    public PropertyValueNotOnlyConditionPredicate setValue(List<String> value) {\n        this.expectedValue = value;\n        return this;\n    }\n\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/Results.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results;\n\nimport com.github.viclovsky.swagger.coverage.core.model.OperationKey;\nimport com.github.viclovsky.swagger.coverage.core.results.data.ConditionCounter;\nimport com.github.viclovsky.swagger.coverage.core.results.data.ConditionStatistics;\nimport com.github.viclovsky.swagger.coverage.core.results.data.CoverageCounter;\nimport com.github.viclovsky.swagger.coverage.core.results.data.CoverageOperationMap;\nimport com.github.viclovsky.swagger.coverage.core.results.data.GenerationStatistics;\nimport com.github.viclovsky.swagger.coverage.core.results.data.OperationResult;\nimport com.github.viclovsky.swagger.coverage.core.results.data.TagCoverage;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.info.Info;\n\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Map;\nimport java.util.Set;\nimport java.util.TreeMap;\n\npublic class Results {\n\n    private Map<OperationKey, OperationResult> operations = new TreeMap<>();\n    private Map<String, OperationResult> flatOperations = new TreeMap<>();\n    private Map<OperationKey, Operation> missed = new TreeMap<>();\n    private Map<OperationKey, Operation> deprecated = new TreeMap<>();\n    private Map<String, ConditionStatistics> conditionStatisticsMap = new HashMap<>();\n    private Set<OperationKey> zeroCall = new HashSet<>();\n\n    private GenerationStatistics generationStatistics;\n    private CoverageOperationMap coverageOperationMap = new CoverageOperationMap();\n    private ConditionCounter conditionCounter = new ConditionCounter();\n\n    /**\n     * TAG STATISTICS\n     **/\n    private Map<String, TagCoverage> tagCoverageMap = new TreeMap<>();\n    private CoverageCounter tagCounter;\n\n    /**\n     *\n     **/\n    private String prettyConfiguration;\n    private Info info;\n\n    public Results() {\n\n    }\n\n    public Map<OperationKey, OperationResult> getOperations() {\n        return operations;\n    }\n\n    public Results setOperations(Map<OperationKey, OperationResult> operations) {\n        this.operations = operations;\n        return this;\n    }\n\n    public Set<OperationKey> getZeroCall() {\n        return zeroCall;\n    }\n\n    public Results setZeroCall(Set<OperationKey> zeroCall) {\n        this.zeroCall = zeroCall;\n        return this;\n    }\n\n    public Map<OperationKey, Operation> getMissed() {\n        return missed;\n    }\n\n    public Results setMissed(Map<OperationKey, Operation> missed) {\n        this.missed = missed;\n        return this;\n    }\n\n    public Results setDeprecated(Map<OperationKey, Operation> deprecated) {\n        this.deprecated = deprecated;\n        return this;\n    }\n\n    public Map<OperationKey, Operation> getDeprecated() {\n        return deprecated;\n    }\n\n    public GenerationStatistics getGenerationStatistics() {\n        return generationStatistics;\n    }\n\n    public Results setGenerationStatistics(GenerationStatistics generationStatistics) {\n        this.generationStatistics = generationStatistics;\n        return this;\n    }\n\n    public ConditionCounter getConditionCounter() {\n        return conditionCounter;\n    }\n\n    public Results setConditionCounter(ConditionCounter conditionCounter) {\n        this.conditionCounter = conditionCounter;\n        return this;\n    }\n\n    public Map<String, ConditionStatistics> getConditionStatisticsMap() {\n        return conditionStatisticsMap;\n    }\n\n    public Results setConditionStatisticsMap(Map<String, ConditionStatistics> conditionStatisticsMap) {\n        this.conditionStatisticsMap = conditionStatisticsMap;\n        return this;\n    }\n\n    public CoverageOperationMap getCoverageOperationMap() {\n        return coverageOperationMap;\n    }\n\n    public Results setCoverageOperationMap(CoverageOperationMap coverageOperationMap) {\n        this.coverageOperationMap = coverageOperationMap;\n        return this;\n    }\n\n    public Map<String, TagCoverage> getTagCoverageMap() {\n        return tagCoverageMap;\n    }\n\n    public Results setTagCoverageMap(Map<String, TagCoverage> tagCoverageMap) {\n        this.tagCoverageMap = tagCoverageMap;\n        return this;\n    }\n\n    public CoverageCounter getTagCounter() {\n        return tagCounter;\n    }\n\n    public Results setTagCounter(CoverageCounter tagCounter) {\n        this.tagCounter = tagCounter;\n        return this;\n    }\n\n    public String getPrettyConfiguration() {\n        return prettyConfiguration;\n    }\n\n    public Results setPrettyConfiguration(String prettyConfiguration) {\n        this.prettyConfiguration = prettyConfiguration;\n        return this;\n    }\n\n    public Map<String, OperationResult> getFlatOperations() {\n        return flatOperations;\n    }\n\n    public Results setFlatOperations(Map<String, OperationResult> flatOperations) {\n        this.flatOperations = flatOperations;\n        return this;\n    }\n\n    public Info getInfo() {\n        return info;\n    }\n\n    public Results setInfo(Info info) {\n        this.info = info;\n        return this;\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/builder/core/StatisticsBuilder.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results.builder.core;\n\nimport com.github.viclovsky.swagger.coverage.configuration.Configuration;\nimport com.github.viclovsky.swagger.coverage.configuration.options.ConfigurationOptions;\nimport com.github.viclovsky.swagger.coverage.core.results.Results;\nimport com.github.viclovsky.swagger.coverage.core.rule.core.ConditionRule;\nimport io.swagger.v3.oas.models.OpenAPI;\n\nimport java.util.List;\n\npublic abstract class StatisticsBuilder {\n\n    protected ConfigurationOptions options;\n\n    public StatisticsBuilder add(String path) {\n        return this;\n    }\n\n    public StatisticsBuilder add(OpenAPI swagger) {\n        return this;\n    }\n\n    public StatisticsBuilder configure(ConfigurationOptions options) {\n        this.options = options;\n        return this;\n    }\n\n    public abstract StatisticsBuilder configure(OpenAPI swagger, List<ConditionRule> rules);\n\n    public abstract void build(Results results, Configuration configuration);\n\n    public abstract boolean isPreBuilder();\n\n    public abstract boolean isPostBuilder();\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/builder/core/StatisticsOperationPostBuilder.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results.builder.core;\n\nimport com.github.viclovsky.swagger.coverage.configuration.Configuration;\nimport com.github.viclovsky.swagger.coverage.core.model.OperationKey;\nimport com.github.viclovsky.swagger.coverage.core.results.Results;\nimport com.github.viclovsky.swagger.coverage.core.results.data.OperationResult;\nimport com.github.viclovsky.swagger.coverage.core.rule.core.ConditionRule;\nimport io.swagger.v3.oas.models.OpenAPI;\n\nimport java.util.List;\n\npublic abstract class StatisticsOperationPostBuilder extends StatisticsPostBuilder {\n\n    @Override\n    public StatisticsBuilder configure(OpenAPI swagger, List<ConditionRule> rules) {\n        return this;\n    }\n\n    @Override\n    public void build(Results results, Configuration configuration) {\n        results.getOperations().forEach(this::buildOperation);\n        buildResult(results);\n    }\n\n    public abstract void buildOperation(OperationKey operation, OperationResult operationResult);\n\n    public abstract void buildResult(Results results);\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/builder/core/StatisticsPostBuilder.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results.builder.core;\n\npublic abstract class StatisticsPostBuilder extends StatisticsBuilder {\n\n    public StatisticsPostBuilder() {\n        super();\n    }\n\n    @Override\n    public boolean isPreBuilder() {\n        return false;\n    }\n\n    @Override\n    public boolean isPostBuilder() {\n        return true;\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/builder/core/StatisticsPreBuilder.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results.builder.core;\n\npublic abstract class StatisticsPreBuilder extends StatisticsBuilder {\n\n    @Override\n    public boolean isPreBuilder() {\n        return true;\n    }\n\n    @Override\n    public boolean isPostBuilder() {\n        return false;\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/builder/postbuilder/ConditionStatisticsBuilder.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results.builder.postbuilder;\n\nimport com.github.viclovsky.swagger.coverage.core.model.OperationKey;\nimport com.github.viclovsky.swagger.coverage.core.results.Results;\nimport com.github.viclovsky.swagger.coverage.core.results.builder.core.StatisticsOperationPostBuilder;\nimport com.github.viclovsky.swagger.coverage.core.results.data.ConditionCounter;\nimport com.github.viclovsky.swagger.coverage.core.results.data.CoverageOperationMap;\nimport com.github.viclovsky.swagger.coverage.core.results.data.CoverageState;\nimport com.github.viclovsky.swagger.coverage.core.results.data.OperationResult;\n\npublic class ConditionStatisticsBuilder extends StatisticsOperationPostBuilder {\n\n    private CoverageOperationMap coverageOperationMap = new CoverageOperationMap();\n    private ConditionCounter conditionCounter = new ConditionCounter();\n\n    @Override\n    public void buildResult(Results results) {\n        results.setCoverageOperationMap(coverageOperationMap)\n                .setConditionCounter(conditionCounter);\n    }\n\n    @Override\n    public void buildOperation(OperationKey operation, OperationResult operationResult) {\n        conditionCounter.updateAll(operationResult.getAllConditionCount());\n        conditionCounter.updateCovered(operationResult.getCoveredConditionCount());\n\n        switch (operationResult.getState()) {\n            case PARTY:\n                coverageOperationMap.addParty(operation);\n                break;\n            case EMPTY:\n                coverageOperationMap.addEmpty(operation);\n                break;\n            case FULL:\n                coverageOperationMap.addFull(operation);\n                break;\n        }\n\n        if (operationResult.getDeprecated()) {\n            coverageOperationMap.addDeprecated(operation);\n            conditionCounter.incrementDeprecated();\n\n            if (operationResult.getState() == CoverageState.EMPTY) {\n                conditionCounter.incrementDeprecatedAndEmpty();\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/builder/postbuilder/ConfigurationStatisticsBuilder.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results.builder.postbuilder;\n\nimport com.fasterxml.jackson.core.JsonProcessingException;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.github.viclovsky.swagger.coverage.configuration.Configuration;\nimport com.github.viclovsky.swagger.coverage.core.results.Results;\nimport com.github.viclovsky.swagger.coverage.core.results.builder.core.StatisticsBuilder;\nimport com.github.viclovsky.swagger.coverage.core.results.builder.core.StatisticsPostBuilder;\nimport com.github.viclovsky.swagger.coverage.core.rule.core.ConditionRule;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.util.List;\n\npublic class ConfigurationStatisticsBuilder extends StatisticsPostBuilder {\n\n    private static final Logger LOGGER = LoggerFactory.getLogger(ConfigurationStatisticsBuilder.class);\n\n    @Override\n    public StatisticsBuilder configure(OpenAPI swagger, List<ConditionRule> rules) {\n        return this;\n    }\n\n    @Override\n    public void build(Results results, Configuration configuration) {\n        ObjectMapper mapper = new ObjectMapper();\n        String prettyConfiguration = \"\";\n        try {\n            prettyConfiguration = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(options);\n        } catch (JsonProcessingException e) {\n            LOGGER.error(\"can't write options\", e);\n        }\n\n        results.setPrettyConfiguration(prettyConfiguration);\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/builder/postbuilder/FlatOperationBuilder.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results.builder.postbuilder;\n\nimport com.github.viclovsky.swagger.coverage.core.model.OperationKey;\nimport com.github.viclovsky.swagger.coverage.core.results.Results;\nimport com.github.viclovsky.swagger.coverage.core.results.builder.core.StatisticsOperationPostBuilder;\nimport com.github.viclovsky.swagger.coverage.core.results.data.OperationResult;\n\nimport java.util.Map;\nimport java.util.TreeMap;\n\npublic class FlatOperationBuilder extends StatisticsOperationPostBuilder {\n    @Override\n    public void buildOperation(OperationKey operation, OperationResult operationResult) {\n\n    }\n\n    @Override\n    public void buildResult(Results results) {\n        Map<String, OperationResult> flatOperations = new TreeMap<>();\n\n        results.getOperations().forEach((operationKey, operationResult) -> flatOperations.put(\n                operationKey.toString(), operationResult)\n        );\n\n        results.setFlatOperations(flatOperations);\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/builder/postbuilder/SwaggerInfoBuilder.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results.builder.postbuilder;\n\nimport com.github.viclovsky.swagger.coverage.core.model.OperationKey;\nimport com.github.viclovsky.swagger.coverage.core.results.Results;\nimport com.github.viclovsky.swagger.coverage.core.results.builder.core.StatisticsOperationPostBuilder;\nimport com.github.viclovsky.swagger.coverage.core.results.data.OperationResult;\nimport com.github.viclovsky.swagger.coverage.core.rule.core.ConditionRule;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.info.Info;\n\nimport java.util.List;\n\npublic class SwaggerInfoBuilder extends StatisticsOperationPostBuilder {\n\n    private Info info;\n\n    @Override\n    public SwaggerInfoBuilder configure(OpenAPI swagger, List<ConditionRule> rules) {\n        info = swagger.getInfo();\n        return this;\n    }\n\n    @Override\n    public void buildOperation(OperationKey operation, OperationResult operationResult) {\n\n    }\n\n    @Override\n    public void buildResult(Results results) {\n        results.setInfo(info);\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/builder/postbuilder/TagStatisticsBuilder.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results.builder.postbuilder;\n\nimport com.github.viclovsky.swagger.coverage.core.generator.SwaggerSpecificationProcessor;\nimport com.github.viclovsky.swagger.coverage.core.model.OperationKey;\nimport com.github.viclovsky.swagger.coverage.core.model.OperationsHolder;\nimport com.github.viclovsky.swagger.coverage.core.results.Results;\nimport com.github.viclovsky.swagger.coverage.core.results.builder.core.StatisticsOperationPostBuilder;\nimport com.github.viclovsky.swagger.coverage.core.results.data.CoverageCounter;\nimport com.github.viclovsky.swagger.coverage.core.results.data.OperationResult;\nimport com.github.viclovsky.swagger.coverage.core.results.data.TagCoverage;\nimport com.github.viclovsky.swagger.coverage.core.rule.core.ConditionRule;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.tags.Tag;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.util.List;\nimport java.util.Map;\n\nimport static java.util.Collections.emptyList;\nimport static java.util.Optional.ofNullable;\nimport static java.util.stream.Collectors.toMap;\n\npublic class TagStatisticsBuilder extends StatisticsOperationPostBuilder {\n\n    private static final Logger LOGGER = LoggerFactory.getLogger(TagStatisticsBuilder.class);\n\n    private Map<OperationKey, List<String>> operationToTag;\n\n    private Map<String, TagCoverage> tagCoverageMap;\n    private CoverageCounter tagCounter = new CoverageCounter();\n\n    @Override\n    public TagStatisticsBuilder configure(OpenAPI swagger, List<ConditionRule> rules) {\n        OperationsHolder operations = SwaggerSpecificationProcessor.extractOperation(swagger);\n\n        tagCoverageMap = ofNullable(swagger.getTags())\n                .orElse(emptyList())\n                .stream()\n                .collect(toMap(Tag::getName, TagCoverage::new));\n\n        operationToTag = operations.getOperations()\n                .entrySet()\n                .stream()\n                .filter(entry -> entry.getValue().getTags() != null)\n                .collect(toMap(Map.Entry::getKey, entry -> entry.getValue().getTags()));\n\n        operationToTag.forEach((key, value) -> value.stream()\n                .filter(tag -> tagCoverageMap.containsKey(tag))\n                .forEach(tag -> tagCoverageMap.get(tag).addOperation(key)));\n\n        return this;\n    }\n\n    @Override\n    public void buildOperation(OperationKey operation, OperationResult operationResult) {\n        operationToTag.forEach((key, value) -> {\n            if (operation.toString().equals(key.toString())) {\n                value.stream()\n                        .filter(tag -> tagCoverageMap.containsKey(tag))\n                        .forEach(tag -> tagCoverageMap.get(tag)\n                        .updateCallCount(operationResult.getProcessCount())\n                        .incrementByState(operationResult.getState())\n                        .updateAllConditionCount(operationResult.getAllConditionCount())\n                        .updateCoveredConditionCount(operationResult.getCoveredConditionCount())\n                        .updateState()\n                );\n            }\n        });\n    }\n\n    @Override\n    public void buildResult(Results results) {\n        LOGGER.info(tagCoverageMap.toString());\n        tagCoverageMap.forEach((key, value) -> tagCounter.incrementByState(value.getState()));\n        results.setTagCoverageMap(tagCoverageMap).setTagCounter(tagCounter);\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/builder/postbuilder/ZeroCallStatisticsBuilder.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results.builder.postbuilder;\n\nimport com.github.viclovsky.swagger.coverage.core.model.OperationKey;\nimport com.github.viclovsky.swagger.coverage.core.results.Results;\nimport com.github.viclovsky.swagger.coverage.core.results.builder.core.StatisticsOperationPostBuilder;\nimport com.github.viclovsky.swagger.coverage.core.results.data.OperationResult;\n\nimport java.util.HashSet;\nimport java.util.Set;\n\npublic class ZeroCallStatisticsBuilder extends StatisticsOperationPostBuilder {\n\n    private Set<OperationKey> zeroCall = new HashSet<>();\n\n    @Override\n    public void buildOperation(OperationKey operation, OperationResult operationResult) {\n        if (operationResult.getProcessCount() == 0) {\n            zeroCall.add(operation);\n        }\n    }\n\n    @Override\n    public void buildResult(Results results) {\n        results.setZeroCall(zeroCall);\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/builder/prebuilder/CoverageStatisticsBuilder.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results.builder.prebuilder;\n\nimport com.github.viclovsky.swagger.coverage.configuration.Configuration;\nimport com.github.viclovsky.swagger.coverage.core.generator.OperationConditionGenerator;\nimport com.github.viclovsky.swagger.coverage.core.generator.SwaggerSpecificationProcessor;\nimport com.github.viclovsky.swagger.coverage.core.model.Condition;\nimport com.github.viclovsky.swagger.coverage.core.model.ConditionOperationCoverage;\nimport com.github.viclovsky.swagger.coverage.core.model.OperationKey;\nimport com.github.viclovsky.swagger.coverage.core.model.OperationsHolder;\nimport com.github.viclovsky.swagger.coverage.core.results.Results;\nimport com.github.viclovsky.swagger.coverage.core.results.builder.core.StatisticsPreBuilder;\nimport com.github.viclovsky.swagger.coverage.core.results.data.ConditionStatistics;\nimport com.github.viclovsky.swagger.coverage.core.results.data.OperationResult;\nimport com.github.viclovsky.swagger.coverage.core.rule.core.ConditionRule;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.Operation;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport org.springframework.util.AntPathMatcher;\n\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\nimport java.util.TreeMap;\nimport java.util.function.Predicate;\n\npublic class CoverageStatisticsBuilder extends StatisticsPreBuilder {\n    private static final Logger LOGGER = LoggerFactory.getLogger(CoverageStatisticsBuilder.class);\n\n    private Map<OperationKey, ConditionOperationCoverage> mainCoverageData;\n    private Map<OperationKey, Operation> missed = new TreeMap<>();\n    private Map<OperationKey, Operation> deprecated = new TreeMap<>();\n\n    @Override\n    public CoverageStatisticsBuilder configure(OpenAPI swagger, List<ConditionRule> rules) {\n        mainCoverageData = OperationConditionGenerator.getOperationMap(swagger, rules);\n        return this;\n    }\n\n    @Override\n    public CoverageStatisticsBuilder add(OpenAPI swagger) {\n        OperationsHolder operations = SwaggerSpecificationProcessor.extractOperation(swagger);\n\n        operations.getOperations().forEach((key, value) -> {\n            LOGGER.info(String.format(\"==  process result [%s]\", key));\n\n            Optional<OperationKey> keyOptional = mainCoverageData.keySet().stream()\n                    .filter(equalsOperationKeys(key)).findFirst();\n\n            if (keyOptional.isPresent()) {\n                mainCoverageData.get(keyOptional.get())\n                        .increaseProcessCount()\n                        .getConditions()\n                        .stream()\n                        .filter(Condition::isNeedCheck)\n                        .forEach(condition -> condition.check(value));\n            } else {\n                LOGGER.info(String.format(\"Missed request [%s]\", key));\n                missed.put(key, value);\n            }\n        });\n        return this;\n    }\n\n    private static Predicate<OperationKey> equalsOperationKeys(OperationKey operationKey) {\n        return p -> (p.getHttpMethod() == operationKey.getHttpMethod())\n                && new AntPathMatcher().match(p.getPath(), operationKey.getPath());\n    }\n\n    @Override\n    public void build(Results results, Configuration configuration) {\n        Map<OperationKey, OperationResult> operations = new TreeMap<>();\n        Map<String, ConditionStatistics> conditionStatisticsMap = new HashMap<>();\n\n        mainCoverageData.forEach((key, value) -> {\n            value.getConditions().stream().filter(Condition::isHasPostCheck).forEach(Condition::postCheck);\n\n            operations.put(key, new OperationResult(configuration, value.getConditions(), value.getOperation().getDeprecated())\n                    .setProcessCount(value.getProcessCount())\n                    .setDescription(value.getOperation().getDescription())\n                    .setOperationKey(key)\n            );\n\n            if (value.getOperation().getDeprecated() != null && value.getOperation().getDeprecated()) {\n                deprecated.put(key, value.getOperation());\n            }\n\n            value.getConditions().forEach(condition -> {\n                        if (!conditionStatisticsMap.containsKey(condition.getType())) {\n                            conditionStatisticsMap.put(condition.getType(), new ConditionStatistics());\n                        }\n                        conditionStatisticsMap.get(condition.getType()).processCondition(key, condition);\n                    }\n            );\n        });\n\n        results.setOperations(operations)\n                .setMissed(missed)\n                .setDeprecated(deprecated)\n                .setConditionStatisticsMap(conditionStatisticsMap);\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/builder/prebuilder/GenerationStatisticsBuilder.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results.builder.prebuilder;\n\nimport com.github.viclovsky.swagger.coverage.CommandLine;\nimport com.github.viclovsky.swagger.coverage.configuration.Configuration;\nimport com.github.viclovsky.swagger.coverage.core.results.Results;\nimport com.github.viclovsky.swagger.coverage.core.results.builder.core.StatisticsPreBuilder;\nimport com.github.viclovsky.swagger.coverage.core.results.data.GenerationStatistics;\nimport com.github.viclovsky.swagger.coverage.core.results.util.DateTimeUtil;\nimport com.github.viclovsky.swagger.coverage.core.rule.core.ConditionRule;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.io.IOException;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.nio.file.Paths;\nimport java.nio.file.attribute.BasicFileAttributes;\nimport java.nio.file.attribute.FileTime;\nimport java.time.Instant;\nimport java.util.List;\n\npublic class GenerationStatisticsBuilder extends StatisticsPreBuilder {\n    private static final Logger LOGGER = LoggerFactory.getLogger(CommandLine.class);\n\n    private long fileCounter = 0;\n    private FileTime minResultTime = null;\n    private FileTime maxResultTime = null;\n    private long startTime;\n\n    @Override\n    public GenerationStatisticsBuilder configure(OpenAPI swagger, List<ConditionRule> rules) {\n        startTime = System.currentTimeMillis();\n        return this;\n    }\n\n    @Override\n    public GenerationStatisticsBuilder add(String path) {\n        Path file = Paths.get(path);\n        this.fileCounter++;\n\n        try {\n            BasicFileAttributes attr = Files.readAttributes(file, BasicFileAttributes.class);\n            if (minResultTime == null || minResultTime.toMillis() > attr.lastModifiedTime().toMillis()) {\n                minResultTime = attr.lastModifiedTime();\n            }\n\n            if (maxResultTime == null || maxResultTime.toMillis() < attr.lastModifiedTime().toMillis()) {\n                maxResultTime = attr.lastModifiedTime();\n            }\n        } catch (IOException e) {\n            LOGGER.error(\"can't read file attributes\", e);\n        }\n        return this;\n    }\n\n    @Override\n    public void build(Results results, Configuration configuration) {\n        final long duration = System.currentTimeMillis() - startTime;\n        final String resultDateDuration = DateTimeUtil.formatDate(minResultTime.toInstant())\n                + \" - \"\n                + DateTimeUtil.formatDate(maxResultTime.toInstant());\n\n        results.setGenerationStatistics(\n                new GenerationStatistics()\n                        .setResultFileCount(fileCounter)\n                        .setGenerationTime(duration)\n                        .setFileResultDateInterval(resultDateDuration)\n                        .setGenerateDate(DateTimeUtil.formatDate(Instant.now()))\n        );\n    }\n\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/data/ConditionCounter.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results.data;\n\npublic class ConditionCounter {\n\n    private long all = 0;\n    private long covered = 0;\n    private long deprecated = 0;\n    private long deprecatedAndEmpty = 0;\n\n    public ConditionCounter updateAll(long count) {\n        this.all = this.all + count;\n        return this;\n    }\n\n    public ConditionCounter updateCovered(long count) {\n        this.covered = this.covered + count;\n        return this;\n    }\n\n    public ConditionCounter incrementDeprecated() {\n        this.deprecated = this.deprecated + 1;\n        return this;\n    }\n\n    public ConditionCounter incrementDeprecatedAndEmpty() {\n        this.deprecatedAndEmpty = this.deprecatedAndEmpty + 1;\n        return this;\n    }\n\n    public long getAll() {\n        return all;\n    }\n\n    public ConditionCounter setAll(long all) {\n        this.all = all;\n        return this;\n    }\n\n    public long getCovered() {\n        return covered;\n    }\n\n    public ConditionCounter setCovered(long covered) {\n        this.covered = covered;\n        return this;\n    }\n\n    public long getDeprecated() {\n        return deprecated;\n    }\n\n    public void setDeprecated(long deprecated) {\n        this.deprecated = deprecated;\n    }\n\n    public long getDeprecatedAndEmpty() {\n        return deprecatedAndEmpty;\n    }\n\n    public void setDeprecatedAndEmpty(long deprecatedAndEmpty) {\n        this.deprecatedAndEmpty = deprecatedAndEmpty;\n    }\n\n    @Override\n    public String toString() {\n        return \"ConditionCounter{\" +\n                \"all=\" + all +\n                \", covered=\" + covered +\n                '}';\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/data/ConditionStatistics.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results.data;\n\nimport com.github.viclovsky.swagger.coverage.core.model.Condition;\nimport com.github.viclovsky.swagger.coverage.core.model.OperationKey;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class ConditionStatistics {\n\n    private long allCount = 0;\n    private long coveredCount = 0;\n    private long uncoveredCount = 0;\n\n    private List<ConditionStatisticsItem> coveredOperation = new ArrayList<>();\n    private List<ConditionStatisticsItem> uncoveredOperation = new ArrayList<>();\n\n    public long getAllCount() {\n        return allCount;\n    }\n\n    public ConditionStatistics setAllCount(long allCount) {\n        this.allCount = allCount;\n        return this;\n    }\n\n    public long getCoveredCount() {\n        return coveredCount;\n    }\n\n    public ConditionStatistics setCoveredCount(long coveredCount) {\n        this.coveredCount = coveredCount;\n        return this;\n    }\n\n    public long getUncoveredCount() {\n        return uncoveredCount;\n    }\n\n    public ConditionStatistics setUncoveredCount(long uncoveredCount) {\n        this.uncoveredCount = uncoveredCount;\n        return this;\n    }\n\n    public List<ConditionStatisticsItem> getCoveredOperation() {\n        return coveredOperation;\n    }\n\n    public ConditionStatistics setCoveredOperation(List<ConditionStatisticsItem> coveredOperation) {\n        this.coveredOperation = coveredOperation;\n        return this;\n    }\n\n    public List<ConditionStatisticsItem> getUncoveredOperation() {\n        return uncoveredOperation;\n    }\n\n    public ConditionStatistics setUncoveredOperation(List<ConditionStatisticsItem> uncoveredOperation) {\n        this.uncoveredOperation = uncoveredOperation;\n        return this;\n    }\n\n    public ConditionStatistics processCondition(OperationKey operation, Condition condition) {\n        this.allCount++;\n\n        if (condition.isCovered()) {\n            this.coveredCount++;\n            this.coveredOperation.add(new ConditionStatisticsItem(operation, condition));\n        } else {\n            this.uncoveredCount++;\n            this.uncoveredOperation.add(new ConditionStatisticsItem(operation, condition));\n            ;\n        }\n\n        return this;\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/data/ConditionStatisticsItem.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results.data;\n\nimport com.github.viclovsky.swagger.coverage.core.model.Condition;\nimport com.github.viclovsky.swagger.coverage.core.model.OperationKey;\n\npublic class ConditionStatisticsItem {\n\n    private OperationKey operation;\n    private Condition condition;\n\n    public ConditionStatisticsItem(OperationKey operation, Condition condition) {\n        this.operation = operation;\n        this.condition = condition;\n    }\n\n    public OperationKey getOperation() {\n        return operation;\n    }\n\n    public ConditionStatisticsItem setOperation(OperationKey operation) {\n        this.operation = operation;\n        return this;\n    }\n\n    public Condition getCondition() {\n        return condition;\n    }\n\n    public ConditionStatisticsItem setCondition(Condition condition) {\n        this.condition = condition;\n        return this;\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/data/CoverageCounter.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results.data;\n\npublic class CoverageCounter {\n    private long all = 0;\n    private long full = 0;\n    private long party = 0;\n    private long empty = 0;\n    private long deprecated = 0;\n\n    public CoverageCounter incrementByState(CoverageState state) {\n        switch (state) {\n            case FULL:\n                return incrementFull();\n            case EMPTY:\n                return incrementEmpty();\n            case PARTY:\n                return incrementParty();\n        }\n        return this;\n    }\n\n    public CoverageCounter incrementFull() {\n        this.all++;\n        this.full++;\n\n        return this;\n    }\n\n    public CoverageCounter incrementParty() {\n        this.all++;\n        this.party++;\n\n        return this;\n    }\n\n    public CoverageCounter incrementEmpty() {\n        this.all++;\n        this.empty++;\n\n        return this;\n    }\n\n    public CoverageCounter incrementDeprecated() {\n        this.deprecated++;\n\n        return this;\n    }\n\n    public long getAll() {\n        return all;\n    }\n\n    public CoverageCounter setAll(long all) {\n        this.all = all;\n        return this;\n    }\n\n    public long getFull() {\n        return full;\n    }\n\n    public CoverageCounter setFull(long full) {\n        this.full = full;\n        return this;\n    }\n\n    public long getParty() {\n        return party;\n    }\n\n    public CoverageCounter setParty(long party) {\n        this.party = party;\n        return this;\n    }\n\n    public long getEmpty() {\n        return empty;\n    }\n\n    public CoverageCounter setEmpty(long empty) {\n        this.empty = empty;\n        return this;\n    }\n\n    public long getDeprecated() {\n        return deprecated;\n    }\n\n    public CoverageCounter setDeprecated(long deprecated) {\n        this.deprecated = deprecated;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        return \"CoverageCounter{\" +\n                \"all=\" + all +\n                \", full=\" + full +\n                \", party=\" + party +\n                \", empty=\" + empty +\n                \", deprecated=\" + deprecated +\n                '}';\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/data/CoverageOperationMap.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results.data;\n\nimport com.github.viclovsky.swagger.coverage.core.model.OperationKey;\n\nimport java.util.HashSet;\nimport java.util.Set;\n\npublic class CoverageOperationMap {\n    private Set<OperationKey> full = new HashSet<>();\n    private Set<OperationKey> party = new HashSet<>();\n    private Set<OperationKey> empty = new HashSet<>();\n    private Set<OperationKey> deprecated = new HashSet<>();\n\n    protected CoverageCounter counter = new CoverageCounter();\n\n    public CoverageOperationMap addFull(OperationKey operation) {\n        this.full.add(operation);\n        this.counter.incrementFull();\n        return this;\n    }\n\n    public CoverageOperationMap addParty(OperationKey operation) {\n        this.party.add(operation);\n        this.counter.incrementParty();\n        return this;\n    }\n\n    public CoverageOperationMap addEmpty(OperationKey operation) {\n        this.empty.add(operation);\n        this.counter.incrementEmpty();\n        return this;\n    }\n\n    public CoverageOperationMap addDeprecated(OperationKey operation) {\n        this.deprecated.add(operation);\n        this.counter.incrementDeprecated();\n        return this;\n    }\n\n    public Set<OperationKey> getFull() {\n        return full;\n    }\n\n    public CoverageOperationMap setFull(Set<OperationKey> full) {\n        this.full = full;\n        return this;\n    }\n\n    public Set<OperationKey> getParty() {\n        return party;\n    }\n\n    public CoverageOperationMap setParty(Set<OperationKey> party) {\n        this.party = party;\n        return this;\n    }\n\n    public Set<OperationKey> getEmpty() {\n        return empty;\n    }\n\n    public CoverageOperationMap setEmpty(Set<OperationKey> empty) {\n        this.empty = empty;\n        return this;\n    }\n\n    public Set<OperationKey> getDeprecated() {\n        return deprecated;\n    }\n\n    public CoverageOperationMap setDeprecated(Set<OperationKey> deprecated) {\n        this.deprecated = deprecated;\n        return this;\n    }\n\n    public CoverageCounter getCounter() {\n        return counter;\n    }\n\n    public CoverageOperationMap setCounter(CoverageCounter counter) {\n        this.counter = counter;\n        return this;\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/data/CoverageState.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results.data;\n\npublic enum CoverageState {\n    FULL,\n    PARTY,\n    EMPTY,\n    DEPRECATED,\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/data/GenerationStatistics.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results.data;\n\npublic class GenerationStatistics {\n\n    private long resultFileCount = 0;\n    private long generationTime;\n    private String fileResultDateInterval;\n    private String generateDate;\n\n    public GenerationStatistics() {\n    }\n\n    public long getResultFileCount() {\n        return resultFileCount;\n    }\n\n    public GenerationStatistics setResultFileCount(long resultFileCount) {\n        this.resultFileCount = resultFileCount;\n        return this;\n    }\n\n    public long getGenerationTime() {\n        return generationTime;\n    }\n\n    public GenerationStatistics setGenerationTime(long generationTime) {\n        this.generationTime = generationTime;\n        return this;\n    }\n\n    public String getFileResultDateInterval() {\n        return fileResultDateInterval;\n    }\n\n    public GenerationStatistics setFileResultDateInterval(String fileResultDateInterval) {\n        this.fileResultDateInterval = fileResultDateInterval;\n        return this;\n    }\n\n    public String getGenerateDate() {\n        return generateDate;\n    }\n\n    public GenerationStatistics setGenerateDate(String generateDate) {\n        this.generateDate = generateDate;\n        return this;\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/data/OperationResult.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results.data;\n\nimport com.github.viclovsky.swagger.coverage.configuration.Configuration;\nimport com.github.viclovsky.swagger.coverage.core.model.Condition;\nimport com.github.viclovsky.swagger.coverage.core.model.OperationKey;\n\nimport java.util.List;\n\npublic class OperationResult {\n\n    private boolean excludeDeprecated;\n    private OperationKey operationKey;\n    private List<Condition> conditions;\n    private long allConditionCount;\n    private long coveredConditionCount;\n    private long processCount;\n    private String description;\n    private CoverageState state;\n    private boolean deprecated;\n\n    public OperationResult(Configuration configuration, List<Condition> conditions, Boolean isDeprecated) {\n        this.conditions = conditions;\n        this.deprecated = (isDeprecated != null) ? isDeprecated : false;\n        allConditionCount = conditions.size();\n        coveredConditionCount = conditions.stream().filter(Condition::isCovered).count();\n\n        try {\n            excludeDeprecated = configuration.getOption(\"exclude-deprecated\").isEnable();\n        } catch (NullPointerException e) {\n            excludeDeprecated = false;\n        }\n\n        if (this.deprecated && excludeDeprecated) {\n            state = CoverageState.DEPRECATED;\n        } else if (coveredConditionCount == 0) {\n            state = CoverageState.EMPTY;\n        } else {\n            if (allConditionCount == coveredConditionCount) {\n                state = CoverageState.FULL;\n            } else {\n                state = CoverageState.PARTY;\n            }\n        }\n    }\n\n    public long getAllConditionCount() {\n        return allConditionCount;\n    }\n\n    public OperationResult setAllConditionCount(long allConditionCount) {\n        this.allConditionCount = allConditionCount;\n        return this;\n    }\n\n    public long getCoveredConditionCount() {\n        return coveredConditionCount;\n    }\n\n    public OperationResult setCoveredConditionCount(long coveredConditionCount) {\n        this.coveredConditionCount = coveredConditionCount;\n        return this;\n    }\n\n    public long getProcessCount() {\n        return processCount;\n    }\n\n    public OperationResult setProcessCount(long processCount) {\n        this.processCount = processCount;\n        return this;\n    }\n\n    public String getDescription() {\n        if (description == null) {\n            return \"\";\n        }\n        return description;\n    }\n\n    public OperationResult setDescription(String description) {\n        this.description = description;\n        return this;\n    }\n\n    public CoverageState getState() {\n        return state;\n    }\n\n    public OperationResult setState(CoverageState state) {\n        this.state = state;\n        return this;\n    }\n\n    public OperationKey getOperationKey() {\n        return operationKey;\n    }\n\n    public OperationResult setOperationKey(OperationKey operationKey) {\n        this.operationKey = operationKey;\n        return this;\n    }\n\n    public List<Condition> getConditions() {\n        return conditions;\n    }\n\n    public void setConditions(List<Condition> conditions) {\n        this.conditions = conditions;\n    }\n\n    public boolean getDeprecated() {\n        return deprecated;\n    }\n\n    public void setDeprecated(boolean isDeprecated) {\n        this.deprecated = isDeprecated;\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/data/TagCoverage.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results.data;\n\nimport com.github.viclovsky.swagger.coverage.core.model.OperationKey;\nimport io.swagger.v3.oas.models.tags.Tag;\n\nimport java.util.HashSet;\nimport java.util.Set;\n\npublic class TagCoverage {\n\n    private Tag tag;\n    private Set<OperationKey> operations = new HashSet<>();\n    private CoverageCounter coverageCounter = new CoverageCounter();\n    private ConditionCounter conditionCounter = new ConditionCounter();\n    private long callCounts = 0;\n    private CoverageState state = CoverageState.EMPTY;\n\n    public TagCoverage(Tag tag) {\n        this.tag = tag;\n    }\n\n    public TagCoverage updateState() {\n        if (conditionCounter.getCovered() == 0) {\n            state = CoverageState.EMPTY;\n        } else {\n            if (conditionCounter.getAll() == conditionCounter.getCovered()) {\n                state = CoverageState.FULL;\n            } else {\n                state = CoverageState.PARTY;\n            }\n        }\n\n        return this;\n    }\n\n    public TagCoverage addOperation(OperationKey operation) {\n        this.operations.add(operation);\n        return this;\n    }\n\n    public TagCoverage updateCallCount(long callCounts) {\n        this.callCounts += callCounts;\n        return this;\n    }\n\n    public TagCoverage incrementByState(CoverageState state) {\n        this.coverageCounter.incrementByState(state);\n        return this;\n    }\n\n    public TagCoverage updateAllConditionCount(long count) {\n        conditionCounter.updateAll(count);\n        return this;\n    }\n\n    public TagCoverage updateCoveredConditionCount(long count) {\n        conditionCounter.updateCovered(count);\n        return this;\n    }\n\n    public Tag getTag() {\n        return tag;\n    }\n\n    public TagCoverage setTag(Tag tag) {\n        this.tag = tag;\n        return this;\n    }\n\n    public CoverageCounter getCoverageCounter() {\n        return coverageCounter;\n    }\n\n    public TagCoverage setCoverageCounter(CoverageCounter coverageCounter) {\n        this.coverageCounter = coverageCounter;\n        return this;\n    }\n\n    public Set<OperationKey> getOperations() {\n        return operations;\n    }\n\n    public TagCoverage setOperations(Set<OperationKey> operations) {\n        this.operations = operations;\n        return this;\n    }\n\n    public ConditionCounter getConditionCounter() {\n        return conditionCounter;\n    }\n\n    public TagCoverage setConditionCounter(ConditionCounter conditionCounter) {\n        this.conditionCounter = conditionCounter;\n        return this;\n    }\n\n    public long getCallCounts() {\n        return callCounts;\n    }\n\n    public TagCoverage setCallCounts(long callCounts) {\n        this.callCounts = callCounts;\n        return this;\n    }\n\n    public CoverageState getState() {\n        return state;\n    }\n\n    public TagCoverage setState(CoverageState state) {\n        this.state = state;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        return \"TagCoverage{\" +\n                \"tag='\" + tag.getName() + '\\'' +\n                \", operations=\" + operations.toString() +\n                \", coverageCounter=\" + coverageCounter.toString() +\n                \", conditionCounter=\" + conditionCounter.toString() +\n                '}';\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/results/util/DateTimeUtil.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.results.util;\n\nimport java.time.Instant;\nimport java.time.ZoneId;\nimport java.time.format.DateTimeFormatter;\n\n\npublic class DateTimeUtil {\n\n    private static DateTimeFormatter dateTimeFormatter = DateTimeFormatter\n            .ofPattern(\"yyyy-MM-dd HH:mm:ss\")\n            .withZone(ZoneId.systemDefault());\n\n    public static String formatDate(Instant instant) {\n        return dateTimeFormatter.format(instant);\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/rule/body/NotEmptyBodyRule.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.rule.body;\n\nimport com.github.viclovsky.swagger.coverage.core.model.Condition;\nimport com.github.viclovsky.swagger.coverage.core.model.SinglePredicateCondition;\nimport com.github.viclovsky.swagger.coverage.core.predicate.DefaultBodyConditionPredicate;\nimport com.github.viclovsky.swagger.coverage.core.rule.core.ConditionRule;\nimport io.swagger.v3.oas.models.Operation;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class NotEmptyBodyRule extends ConditionRule {\n\n    @Override\n    public List<Condition> createCondition(Operation operation) {\n        if (operation.getRequestBody() != null && operation.getRequestBody().getContent() != null) {\n            List<Condition> conditions = new ArrayList<>();\n            conditions.add(new SinglePredicateCondition(\n                    \"not empty body request\",\n                    \"\",\n                    new DefaultBodyConditionPredicate()\n            ));\n            return conditions;\n        } else {\n            return null;\n        }\n    }\n\n    @Override\n    public String getId() {\n        return \"not-empty-body\";\n    }\n\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/rule/body/PropertyConditionRule.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.rule.body;\n\nimport com.github.viclovsky.swagger.coverage.core.model.Condition;\nimport com.github.viclovsky.swagger.coverage.core.rule.core.ConditionRule;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.media.MediaType;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.util.Collection;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Objects;\nimport java.util.Set;\nimport java.util.stream.Collectors;\nimport java.util.stream.Stream;\n\n//request body properties are the v3 version of form data params\npublic abstract class PropertyConditionRule extends ConditionRule {\n\n    public List<Condition> createCondition(Operation operation) {\n        if (operation.getRequestBody() != null && operation.getRequestBody().getContent() != null) {\n            return operation.getRequestBody().getContent().entrySet().stream()\n                    .flatMap(m -> processMediaType(m.getKey(), m.getValue()))\n                    .filter(Objects::nonNull)\n                    .collect(Collectors.toList());\n        } else {\n            return null;\n        }\n    }\n\n    private Stream<Condition> processMediaType(String mediaTypeName, MediaType mediaType) {\n        if (mediaType.getSchema() != null && mediaType.getSchema().getProperties() != null) {\n            return ((Set<Map.Entry<String, Schema>>) mediaType.getSchema().getProperties().entrySet())\n                    .stream()\n                    .map(s -> processProperty(mediaTypeName, s.getKey(), s.getValue()))\n                    .filter(Objects::nonNull);\n        } else {\n            return null;\n        }\n    }\n\n    protected abstract Condition processProperty(String mediaTypeName, String name, Schema schema);\n\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/rule/body/PropertyEnumAllValuesRule.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.rule.body;\n\nimport com.github.viclovsky.swagger.coverage.core.generator.SwaggerSpecificationProcessor;\nimport com.github.viclovsky.swagger.coverage.core.model.Condition;\nimport com.github.viclovsky.swagger.coverage.core.model.SinglePredicateCondition;\nimport com.github.viclovsky.swagger.coverage.core.predicate.PropertyValueConditionPredicate;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.util.List;\n\npublic class PropertyEnumAllValuesRule extends PropertyConditionRule {\n\n    @Override\n    protected Condition processProperty(String mediaTypeName, String name, Schema schema) {\n        List<String> enums = SwaggerSpecificationProcessor.extractEnum(schema);\n        if (schema != null && name != null && mediaTypeName != null\n                && enums != null && !enums.isEmpty()) {\n            return new SinglePredicateCondition(\n                    String.format(\"«%s» contains all values from enum %s\", name, enums),\n                    \"\",\n                    new PropertyValueConditionPredicate(mediaTypeName, name, enums)\n            );\n        }\n        return null;\n    }\n\n    @Override\n    public String getId() {\n        return \"property-enum-all-value\";\n    }\n\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/rule/body/PropertyNotEmptyRule.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.rule.body;\n\nimport com.github.viclovsky.swagger.coverage.core.model.Condition;\nimport com.github.viclovsky.swagger.coverage.core.model.SinglePredicateCondition;\nimport com.github.viclovsky.swagger.coverage.core.predicate.DefaultPropertyConditionPredicate;\nimport io.swagger.v3.oas.models.media.Schema;\n\npublic class PropertyNotEmptyRule extends PropertyConditionRule {\n\n    @Override\n    protected Condition processProperty(String mediaTypeName, String name, Schema schema) {\n        if (schema != null && name != null && mediaTypeName != null) {\n            return new SinglePredicateCondition(\n                    String.format(\"«%s» is not empty\", name),\n                    \"\",\n                    new DefaultPropertyConditionPredicate(mediaTypeName, name, false)\n            );\n        }\n        return null;\n    }\n\n    @Override\n    public String getId() {\n        return \"property-not-empty\";\n    }\n\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/rule/body/PropertyNotOnlyEnumValuesRule.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.rule.body;\n\nimport com.github.viclovsky.swagger.coverage.core.generator.SwaggerSpecificationProcessor;\nimport com.github.viclovsky.swagger.coverage.core.model.Condition;\nimport com.github.viclovsky.swagger.coverage.core.model.SinglePredicateCondition;\nimport com.github.viclovsky.swagger.coverage.core.predicate.PropertyValueNotOnlyConditionPredicate;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.util.List;\n\npublic class PropertyNotOnlyEnumValuesRule extends PropertyConditionRule {\n\n    @Override\n    protected Condition processProperty(String mediaTypeName, String name, Schema schema) {\n        List<String> enums = SwaggerSpecificationProcessor.extractEnum(schema);\n        if (schema != null && name != null && mediaTypeName != null\n                && enums != null && !enums.isEmpty()) {\n            return new SinglePredicateCondition(\n                    String.format(\"«%s» contains all values from enum %s\", name, enums),\n                    \"\",\n                    new PropertyValueNotOnlyConditionPredicate(mediaTypeName, name, enums)\n            );\n        }\n        return null;\n    }\n\n    @Override\n    public String getId() {\n        return \"property-enum-another-value\";\n    }\n\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/rule/core/ConditionRule.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.rule.core;\n\nimport com.github.viclovsky.swagger.coverage.configuration.options.RuleConfigurationOptions;\nimport com.github.viclovsky.swagger.coverage.core.model.Condition;\nimport io.swagger.v3.oas.models.Operation;\n\nimport java.util.List;\n\npublic abstract class ConditionRule {\n    protected RuleConfigurationOptions options;\n\n    public abstract String getId();\n\n    public abstract List<Condition> createCondition(Operation operation);\n\n    public ConditionRule configure(RuleConfigurationOptions options) {\n        this.options = options;\n        return this;\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/rule/parameter/EmptyHeaderRule.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.rule.parameter;\n\nimport com.github.viclovsky.swagger.coverage.core.model.Condition;\nimport com.github.viclovsky.swagger.coverage.core.model.SinglePredicateCondition;\nimport com.github.viclovsky.swagger.coverage.core.predicate.ConditionPredicate;\nimport com.github.viclovsky.swagger.coverage.core.predicate.DefaultParameterConditionPredicate;\nimport io.swagger.v3.oas.models.parameters.HeaderParameter;\nimport io.swagger.v3.oas.models.parameters.Parameter;\n\npublic class EmptyHeaderRule extends ParameterConditionRule {\n\n    @Override\n    public Condition processParameter(Parameter parameter) {\n        if (parameter instanceof HeaderParameter) {\n            ConditionPredicate predicate = new DefaultParameterConditionPredicate(true, parameter.getName(), parameter.getIn());\n            return new SinglePredicateCondition(\n                    String.format(\"header «%s» is empty\", parameter.getName()),\n                    \"\",\n                    predicate\n            );\n        }\n\n        return null;\n    }\n\n    @Override\n    public String getId() {\n        return \"empty-required-header\";\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/rule/parameter/EnumAllValuesRule.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.rule.parameter;\n\nimport com.github.viclovsky.swagger.coverage.core.generator.SwaggerSpecificationProcessor;\nimport com.github.viclovsky.swagger.coverage.core.model.Condition;\nimport com.github.viclovsky.swagger.coverage.core.model.SinglePredicateCondition;\nimport com.github.viclovsky.swagger.coverage.core.predicate.ConditionPredicate;\nimport com.github.viclovsky.swagger.coverage.core.predicate.ParameterValueConditionPredicate;\nimport io.swagger.v3.oas.models.parameters.Parameter;\n\nimport java.util.List;\n\npublic class EnumAllValuesRule extends ParameterConditionRule {\n\n    @Override\n    public Condition processParameter(Parameter parameter) {\n        List<String> enumValues = SwaggerSpecificationProcessor.extractEnum(parameter);\n\n        if (enumValues != null && !enumValues.isEmpty()) {\n            ConditionPredicate predicate = new ParameterValueConditionPredicate(parameter.getName(), parameter.getIn(), enumValues);\n            return new SinglePredicateCondition(\n                    String.format(\"%s «%s» contains all values from enum %s\", parameter.getIn(), parameter.getName(), enumValues),\n                    \"\",\n                    predicate\n            );\n        }\n\n        return null;\n    }\n\n    @Override\n    public String getId() {\n        return \"enum-all-value\";\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/rule/parameter/NotEmptyParameterRule.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.rule.parameter;\n\nimport com.github.viclovsky.swagger.coverage.core.model.Condition;\nimport com.github.viclovsky.swagger.coverage.core.model.SinglePredicateCondition;\nimport com.github.viclovsky.swagger.coverage.core.predicate.ConditionPredicate;\nimport com.github.viclovsky.swagger.coverage.core.predicate.DefaultParameterConditionPredicate;\nimport io.swagger.v3.oas.models.parameters.Parameter;\n\npublic class NotEmptyParameterRule extends ParameterConditionRule {\n\n    @Override\n    public Condition processParameter(Parameter parameter) {\n        ConditionPredicate predicate = new DefaultParameterConditionPredicate(false, parameter.getName(), parameter.getIn());\n        return new SinglePredicateCondition(\n                String.format(\"%s «%s» is not empty\", parameter.getIn(), parameter.getName()),\n                \"\",\n                predicate\n        );\n    }\n\n    @Override\n    public String getId() {\n        return \"parameter-not-empty\";\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/rule/parameter/NotOnlyEnumValuesRule.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.rule.parameter;\n\nimport com.github.viclovsky.swagger.coverage.core.generator.SwaggerSpecificationProcessor;\nimport com.github.viclovsky.swagger.coverage.core.model.Condition;\nimport com.github.viclovsky.swagger.coverage.core.model.SinglePredicateCondition;\nimport com.github.viclovsky.swagger.coverage.core.predicate.ConditionPredicate;\nimport com.github.viclovsky.swagger.coverage.core.predicate.NotOnlyParameterListValueConditionPredicate;\nimport io.swagger.v3.oas.models.parameters.Parameter;\n\nimport java.util.List;\n\npublic class NotOnlyEnumValuesRule extends ParameterConditionRule {\n\n    @Override\n    public Condition processParameter(Parameter parameter) {\n        List<String> enumValues = SwaggerSpecificationProcessor.extractEnum(parameter);\n\n        if (enumValues != null && !enumValues.isEmpty()) {\n            ConditionPredicate predicate = new NotOnlyParameterListValueConditionPredicate(\n                    parameter.getName(), parameter.getIn(), enumValues\n            );\n\n            return new SinglePredicateCondition(\n                    String.format(\"%s «%s»  contains values not only from enum\", parameter.getIn(), parameter.getName()),\n                    \"\",\n                    predicate\n            );\n        }\n\n        return null;\n    }\n\n    @Override\n    public String getId() {\n        return \"enum-another-value\";\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/rule/parameter/ParameterConditionRule.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.rule.parameter;\n\nimport com.github.viclovsky.swagger.coverage.core.model.Condition;\nimport com.github.viclovsky.swagger.coverage.core.rule.core.ConditionRule;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.parameters.Parameter;\n\nimport java.util.List;\nimport java.util.Objects;\nimport java.util.stream.Collectors;\n\npublic abstract class ParameterConditionRule extends ConditionRule {\n\n    public abstract Condition processParameter(Parameter parameter);\n\n    public List<Condition> createCondition(Operation operation) {\n        if(operation.getParameters() != null) {\n            return operation\n                    .getParameters()\n                    .stream()\n                    .map(this::processParameter)\n                    .filter(Objects::nonNull)\n                    .collect(Collectors.toList());\n        } else {\n            return null;\n        }\n    }\n\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/rule/status/HTTPStatusRule.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.rule.status;\n\nimport com.github.viclovsky.swagger.coverage.core.model.Condition;\nimport com.github.viclovsky.swagger.coverage.core.model.SinglePredicateCondition;\nimport com.github.viclovsky.swagger.coverage.core.predicate.ConditionPredicate;\nimport com.github.viclovsky.swagger.coverage.core.predicate.DefaultStatusConditionPredicate;\n\npublic class HTTPStatusRule extends StatusConditionRule {\n\n    @Override\n    public String getId() {\n        return \"status\";\n    }\n\n    @Override\n    public Condition processStatus(String status) {\n        if (skip(status)) {\n            return null;\n        }\n\n        ConditionPredicate predicate = new DefaultStatusConditionPredicate(status);\n        return new SinglePredicateCondition(\n                \"HTTP status \" + status,\n                \"\",\n                predicate\n        );\n    }\n\n    protected boolean skip(String status) {\n        if (this.options == null) {\n            return false;\n        }\n        if (this.options.getFilter() != null\n                && !this.options.getFilter().isEmpty()\n                && !this.options.getFilter().contains(status)\n        ) {\n            return true;\n        }\n\n        return this.options.getIgnore() != null\n                && !this.options.getIgnore().isEmpty()\n                && this.options.getIgnore().contains(status);\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/rule/status/OnlyDeclaredHTTPStatusesRule.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.rule.status;\n\nimport com.github.viclovsky.swagger.coverage.core.model.Condition;\nimport com.github.viclovsky.swagger.coverage.core.model.SinglePredicateCondition;\nimport com.github.viclovsky.swagger.coverage.core.predicate.ConditionPredicate;\nimport com.github.viclovsky.swagger.coverage.core.predicate.FullStatusConditionPredicate;\nimport com.github.viclovsky.swagger.coverage.core.rule.core.ConditionRule;\nimport io.swagger.v3.oas.models.Operation;\n\nimport java.util.Collections;\nimport java.util.List;\n\npublic class OnlyDeclaredHTTPStatusesRule extends ConditionRule {\n    @Override\n    public String getId() {\n        return \"only-declared-status\";\n    }\n\n    @Override\n    public List<Condition> createCondition(Operation operation) {\n        ConditionPredicate predicate = new FullStatusConditionPredicate(operation.getResponses().keySet());\n        Condition condition = new SinglePredicateCondition(\n                \"only declared status\",\n                \"\",\n                predicate\n        );\n\n        return Collections.singletonList(condition);\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/rule/status/StatusConditionRule.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.rule.status;\n\nimport com.github.viclovsky.swagger.coverage.core.model.Condition;\nimport com.github.viclovsky.swagger.coverage.core.rule.core.ConditionRule;\nimport io.swagger.v3.oas.models.Operation;\n\nimport java.util.List;\nimport java.util.Objects;\nimport java.util.stream.Collectors;\n\n\n/**\n * Base rule for status\n */\npublic abstract class StatusConditionRule extends ConditionRule {\n\n    public abstract Condition processStatus(String statusCode);\n\n    public List<Condition> createCondition(Operation operation) {\n        return operation.getResponses()\n                .keySet()\n                .stream()\n                .map(this::processStatus)\n                .filter(Objects::nonNull)\n                .collect(Collectors.toList());\n    }\n\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/writer/CoverageResultsWriter.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.writer;\n\nimport com.github.viclovsky.swagger.coverage.core.results.Results;\n\npublic interface CoverageResultsWriter {\n    void write(Results results);\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/writer/FileSystemResultsWriter.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.writer;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.github.viclovsky.swagger.coverage.SwaggerCoverageWriteException;\nimport com.github.viclovsky.swagger.coverage.core.results.Results;\nimport com.github.viclovsky.swagger.coverage.model.SwaggerCoverage2ModelJackson;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.io.IOException;\nimport java.io.OutputStream;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.nio.file.Paths;\n\nimport static com.github.viclovsky.swagger.coverage.SwaggerCoverageConstants.COVERAGE_RESULTS_NAME;\n\npublic class FileSystemResultsWriter implements CoverageResultsWriter {\n\n    private final static Logger LOGGER = LoggerFactory.getLogger(FileSystemResultsWriter.class);\n    private final ObjectMapper mapper;\n    private final String fileName;\n\n    public FileSystemResultsWriter() {\n        this(COVERAGE_RESULTS_NAME);\n    }\n\n    public FileSystemResultsWriter(String fileName) {\n        this.fileName = fileName;\n        this.mapper = SwaggerCoverage2ModelJackson.createJsonMapper();\n    }\n\n    @Override\n    public void write(Results results) {\n        final String swaggerResultName = fileName;\n        Path path = Paths.get(swaggerResultName);\n        LOGGER.info(String.format(\"Write results in file '%s'\", path.toAbsolutePath()));\n        try (OutputStream os = Files.newOutputStream(Paths.get(swaggerResultName))) {\n            mapper.writeValue(os, results);\n        } catch (IOException e) {\n            throw new SwaggerCoverageWriteException(\"Could not write results\", e);\n        }\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/writer/HtmlReportResultsWriter.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.writer;\n\nimport com.github.viclovsky.swagger.coverage.SwaggerCoverageWriteException;\nimport com.github.viclovsky.swagger.coverage.configuration.options.ResultsWriterOptions;\nimport com.github.viclovsky.swagger.coverage.core.results.Results;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\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 static com.github.viclovsky.swagger.coverage.utils.FreemarkerUtils.processCustomTemplate;\nimport static com.github.viclovsky.swagger.coverage.utils.FreemarkerUtils.processTemplate;\n\npublic class HtmlReportResultsWriter implements CoverageResultsWriter {\n\n    private static final Logger LOGGER = LoggerFactory.getLogger(HtmlReportResultsWriter.class);\n\n    private ResultsWriterOptions options;\n\n    private String filename = \"swagger-coverage-report.html\";\n    private String localeCode = \"en\";\n    private String numberFormat = \"0.###\";\n\n    public HtmlReportResultsWriter() {\n        options = new ResultsWriterOptions()\n                .setFilename(filename)\n                .setLocale(localeCode)\n                .setNumberFormat(numberFormat);\n    }\n\n    public HtmlReportResultsWriter(ResultsWriterOptions options){\n        if (options.getLocale() == null){\n            options.setLocale(localeCode);\n        }\n\n        if (options.getFilename() == null){\n            options.setFilename(filename);\n        }\n\n        if (options.getNumberFormat() == null){\n            options.setNumberFormat(numberFormat);\n        }\n\n        this.options = options;\n    }\n\n    @Override\n    public void write(Results results) {\n        Path path = Paths.get(options.getFilename());\n        LOGGER.info(String.format(\"Write html report in file '%s'\", path.toAbsolutePath()));\n        try {\n            final String htmlReport = (options.getCustomTemplatePath() == null ) ?\n                    processTemplate(\"report.ftl\", options.getLocale(), options.getNumberFormat(), results) :\n                    processCustomTemplate(options.getCustomTemplatePath(), options.getLocale(), options.getNumberFormat(), results);\n            Files.write(Paths.get(options.getFilename()), htmlReport.getBytes(StandardCharsets.UTF_8));\n        } catch (IOException e) {\n            throw new SwaggerCoverageWriteException(\"Could not write results\", e);\n        }\n    }\n\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/core/writer/LogResultsWriter.java",
    "content": "package com.github.viclovsky.swagger.coverage.core.writer;\n\nimport com.github.viclovsky.swagger.coverage.core.model.OperationKey;\nimport com.github.viclovsky.swagger.coverage.core.results.Results;\nimport com.github.viclovsky.swagger.coverage.core.results.data.OperationResult;\nimport io.swagger.v3.oas.models.Operation;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.text.DecimalFormat;\nimport java.util.Map;\nimport java.util.Set;\n\npublic class LogResultsWriter implements CoverageResultsWriter {\n\n    private final static Logger LOGGER = LoggerFactory.getLogger(LogResultsWriter.class);\n\n    public LogResultsWriter() {\n    }\n\n    @Override\n    public void write(Results results) {\n        LOGGER.info(\"Deprecated coverage: \");\n        logOperationCoverage(results.getOperations(), results.getCoverageOperationMap().getDeprecated());\n        LOGGER.info(\"Empty coverage: \");\n        logOperationCoverage(results.getOperations(), results.getCoverageOperationMap().getEmpty());\n        LOGGER.info(\"Partial coverage: \");\n        logOperationCoverage(results.getOperations(), results.getCoverageOperationMap().getParty());\n        LOGGER.info(\"Full coverage: \");\n        logOperationCoverage(results.getOperations(), results.getCoverageOperationMap().getFull());\n        logMissedCoverage(results.getMissed());\n\n        DecimalFormat df = new DecimalFormat(\"###.###\");\n        float deprecatedPercentage = (float) (results.getCoverageOperationMap().getDeprecated().size() * 100) / results.getOperations().size();\n        float emptyPercentage = (float) (results.getCoverageOperationMap().getEmpty().size() * 100) / results.getOperations().size();\n        float partialPercentage = (float) (results.getCoverageOperationMap().getParty().size() * 100) / results.getOperations().size();\n        float fullPercentage = (float) (results.getCoverageOperationMap().getFull().size() * 100) / results.getOperations().size();\n\n        LOGGER.info(String.format(\"Conditions: %s/%s\", results.getConditionCounter().getCovered(), results.getConditionCounter().getAll()));\n        LOGGER.info(\"Deprecated coverage \" + df.format(deprecatedPercentage) + \" %\");\n        LOGGER.info(\"Empty coverage \" + df.format(emptyPercentage) + \" %\");\n        LOGGER.info(\"Partial coverage \" + df.format(partialPercentage) + \" %\");\n        LOGGER.info(\"Full coverage \" + df.format(fullPercentage) + \" %\");\n    }\n\n    private void logMissedCoverage(Map<OperationKey, Operation> missed) {\n        if (!missed.isEmpty()) {\n            LOGGER.info(\"Missed coverage: \");\n            missed.keySet().forEach(\n                    m -> LOGGER.info(m.getHttpMethod() + \" \" + m.getPath()));\n        }\n    }\n\n    private void logOperationCoverage(Map<OperationKey, OperationResult> operationResults, Set<OperationKey> keys) {\n        keys.forEach(operationKey -> {\n            if (operationResults.containsKey(operationKey)) {\n                printOperationCoverage(operationResults.get(operationKey));\n            }\n        });\n    }\n\n    private void printOperationCoverage(OperationResult result) {\n        LOGGER.info(String.format(\"%s %s (%s/%s)\", result.getOperationKey().getHttpMethod(), result.getOperationKey().getPath(),\n                result.getCoveredConditionCount(), result.getAllConditionCount()));\n\n        result.getConditions().forEach(c -> {\n            if (c.isCovered()) {\n                LOGGER.info(String.format(\"✅ %s\", c.getName()));\n            } else {\n                LOGGER.info(String.format(\"❌ %s\", c.getName()));\n            }\n\n        });\n    }\n\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/option/MainOptions.java",
    "content": "package com.github.viclovsky.swagger.coverage.option;\n\nimport com.beust.jcommander.Parameter;\n\nimport java.net.URI;\nimport java.nio.file.Path;\n\npublic class MainOptions {\n\n    @Parameter(\n            names = {\"-s\", \"--spec\"},\n            description = \"Path to local or URL to remote swagger specification.\",\n            required = true,\n            order = 0\n    )\n    private URI specPath;\n\n    @Parameter(\n            names = {\"-i\", \"--input\"},\n            description = \"Path to folder with generated files with coverage.\",\n            required = true,\n            order = 1\n    )\n    private Path inputPath;\n\n    @Parameter(\n            names = {\"-c\", \"--configuration\"},\n            description = \"Path to file with report configuration.\",\n            order = 1\n    )\n    private Path configuration;\n\n    @Parameter(\n            names = \"--help\",\n            description = \"Print commandline help.\",\n            help = true,\n            order = 5\n    )\n    private boolean help;\n\n    public boolean isHelp() {\n        return help;\n    }\n\n    public URI getSpecPath() {\n        return specPath;\n    }\n\n    public Path getInputPath() {\n        return inputPath;\n    }\n\n    public Path getConfiguration() {\n        return configuration;\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/java/com/github/viclovsky/swagger/coverage/option/VerboseOptions.java",
    "content": "package com.github.viclovsky.swagger.coverage.option;\n\nimport com.beust.jcommander.Parameter;\n\npublic class VerboseOptions {\n\n    @Parameter(\n            names = {\"-v\", \"--verbose\"},\n            description = \"Switch on the verbose mode.\"\n    )\n    private boolean verbose;\n\n    @Parameter(\n            names = {\"-q\", \"--quiet\"},\n            description = \"Switch on the quiet mode.\"\n    )\n    private boolean quiet;\n\n    /**\n     * Returns true if silent mode is enabled, false otherwise.\n     */\n    public boolean isQuiet() {\n        return quiet;\n    }\n\n    /**\n     * Returns true if verbose mode is enabled, false otherwise.\n     */\n    public boolean isVerbose() {\n        return verbose;\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/main/resources/logback.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n    <appender name=\"stdout\" class=\"ch.qos.logback.core.ConsoleAppender\">\n        <Target>System.out</Target>\n        <encoder>\n            <pattern>%d{HH:mm:ss} %-5p %c{1} - %m%n</pattern>\n        </encoder>\n    </appender>\n    <root level=\"ALL\">\n        <appender-ref ref=\"stdout\"/>\n    </root>\n</configuration>"
  },
  {
    "path": "swagger-coverage-commandline/src/test/java/com/github/viclovsky/swagger/coverage/Config.java",
    "content": "package com.github.viclovsky.swagger.coverage;\n\nimport java.io.File;\nimport java.net.URI;\nimport java.nio.file.Path;\n\nimport static java.util.Optional.ofNullable;\n\npublic class Config {\n    private final String path;\n    private final String outputPath;\n    private final String specPath;\n\n    public Config(String path, String outputPath, String specPath) {\n        this.path = path;\n        this.outputPath = outputPath;\n        this.specPath = specPath;\n    }\n\n    public Path getPath() {\n        return getFile(path).toPath();\n    }\n\n    public Path getOutput() {\n        return getFile(outputPath).toPath();\n    }\n\n    public URI getSpec() {\n        return URI.create(specPath);\n    }\n\n    private File getFile(String name) {\n        return ofNullable(getClass().getClassLoader().getResource(name))\n                .map(spec -> new File(spec.getFile()))\n                .orElseThrow(() -> new IllegalArgumentException(\"Unable to read file: \" + name));\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/test/java/com/github/viclovsky/swagger/coverage/CustomReportTemplateTest.java",
    "content": "package com.github.viclovsky.swagger.coverage;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.github.viclovsky.swagger.coverage.configuration.options.ConfigurationOptions;\nimport com.github.viclovsky.swagger.coverage.configuration.options.ResultsWriterOptions;\nimport com.github.viclovsky.swagger.coverage.core.generator.Generator;\nimport io.swagger.v3.parser.core.models.ParseOptions;\nimport org.apache.commons.io.FileUtils;\nimport org.hamcrest.io.FileMatchers;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.junit.runners.Parameterized;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.net.URISyntaxException;\nimport java.net.URL;\nimport java.nio.file.Paths;\nimport java.util.Arrays;\nimport java.util.Collection;\nimport java.util.HashMap;\n\nimport static java.nio.file.Paths.get;\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.text.StringContainsInOrder.stringContainsInOrder;\n\n@RunWith(Parameterized.class)\npublic class CustomReportTemplateTest {\n    private static final Logger LOGGER = LoggerFactory.getLogger(CustomReportTemplateTest.class);\n    private final String outputPath, specPath;\n\n    public CustomReportTemplateTest(String outputPath, String specPath ) {\n        this.outputPath = outputPath;\n        this.specPath = specPath;\n    }\n\n    private File generateConfigurationFile() throws URISyntaxException, IOException {\n        HashMap<String, ResultsWriterOptions> customReportOptions = new HashMap<>();\n        URL res = getClass().getClassLoader().getResource(\"report_custom.ftl\");\n        customReportOptions.put(\"html\", new ResultsWriterOptions()\n                .setFilename(\"custom-template-report.html\")\n                .setLocale(\"en\")\n                .setNumberFormat(\"0.###\")\n                .setCustomTemplatePath(Paths.get(res.toURI()).toFile().getAbsolutePath()));\n        ParseOptions parseOptions = new ParseOptions();\n        parseOptions.setResolve(true);\n        ConfigurationOptions configurationOptions = new ConfigurationOptions()\n                .setWriters(customReportOptions);\n        File testConfigurationFile = File.createTempFile(\"customTemplate\", \".json\");\n        FileUtils.writeStringToFile(testConfigurationFile, new ObjectMapper().writeValueAsString(configurationOptions));\n        return testConfigurationFile;\n    }\n\n    @Test\n    public void testWithCustomTemplate() throws IOException, URISyntaxException {\n        File testConfigurationFile = generateConfigurationFile();\n        Config testConfig = new Config(testConfigurationFile.getAbsolutePath(),\n                outputPath, specPath);\n        LOGGER.info(\"Generate report for {}:\", testConfigurationFile.getAbsolutePath());\n        LOGGER.info(\"{}\", FileUtils.readFileToString(testConfigurationFile));\n        new Generator()\n                .setInputPath(testConfig.getOutput())\n                .setSpecPath(testConfig.getSpec())\n                .setConfigurationPath(testConfigurationFile.toPath())\n                .run();\n\n        File reportFile = get(\"custom-template-report.html\").toFile();\n        assertThat(reportFile, FileMatchers.anExistingFile());\n        assertThat(FileUtils.readFileToString(reportFile), stringContainsInOrder(\"CUSTOM_TEST_REPORT\"));\n    }\n\n    @Parameterized.Parameters()\n    public static Collection<Object[]> testData() {\n        return Arrays.asList(new Object[][]{\n                //Swagger v2\n                {\"v2/swagger-coverage-output\", \"v2/petstory.json\"},\n                //Swagger v3\n                {\"v3/swagger-coverage-output\", \"v3/petstory.yaml\"},\n        });\n    }\n\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/test/java/com/github/viclovsky/swagger/coverage/ParseOptionsTest.java",
    "content": "package com.github.viclovsky.swagger.coverage;\n\nimport com.github.viclovsky.swagger.coverage.core.generator.Generator;\nimport org.junit.Test;\n\nimport static com.jayway.jsonpath.matchers.JsonPathMatchers.hasJsonPath;\nimport static java.nio.file.Paths.get;\nimport static org.hamcrest.MatcherAssert.assertThat;\n\npublic class ParseOptionsTest {\n    private static final String V3_OUTPUT_SWAGGER_COVERAGE_DIR = \"v3/swagger-coverage-output\";\n    private static final String CONFIGURATION_FILE = \"full_configuration.json\";\n\n    @Test\n    public void resolveOptionTest() {\n        Config config = new Config(CONFIGURATION_FILE, V3_OUTPUT_SWAGGER_COVERAGE_DIR, \"v3/petstory_ref_operations.yaml\");\n\n        new Generator()\n                .setInputPath(config.getOutput())\n                .setSpecPath(config.getSpec())\n                .setConfigurationPath(config.getPath())\n                .run();\n\n        assertThat(get(\"json-report.json\").toFile(), hasJsonPath(\"$.operations.[\\\"/pet/{petId} GET\\\"]\"));\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/test/java/com/github/viclovsky/swagger/coverage/SimpleTest.java",
    "content": "package com.github.viclovsky.swagger.coverage;\n\nimport com.github.viclovsky.swagger.coverage.core.generator.Generator;\nimport org.hamcrest.io.FileMatchers;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.junit.runners.Parameterized;\n\nimport java.util.Arrays;\nimport java.util.Collection;\n\nimport static com.github.viclovsky.swagger.coverage.SwaggerCoverageConstants.COVERAGE_HTML_REPORT_NAME;\nimport static com.github.viclovsky.swagger.coverage.SwaggerCoverageConstants.COVERAGE_RESULTS_NAME;\nimport static java.nio.file.Paths.get;\nimport static org.hamcrest.MatcherAssert.assertThat;\n\n@RunWith(Parameterized.class)\npublic class SimpleTest {\n\n    private static final String V2_OUTPUT_SWAGGER_COVERAGE_DIR = \"v2/swagger-coverage-output\";\n    private static final String V3_OUTPUT_SWAGGER_COVERAGE_DIR = \"v3/swagger-coverage-output\";\n    private static final String CONFIGURATION_FILE = \"full_configuration.json\";\n    private final Config config;\n\n    public SimpleTest(Config config) {\n        this.config = config;\n    }\n\n    @Parameterized.Parameters()\n    public static Collection<Object[]> testData() {\n        return Arrays.asList(new Object[][]{\n                //Swagger v2\n                {new Config(CONFIGURATION_FILE, V2_OUTPUT_SWAGGER_COVERAGE_DIR, \"v2/petstory.json\")},\n                {new Config(CONFIGURATION_FILE, V2_OUTPUT_SWAGGER_COVERAGE_DIR, \"v2/petstory_no_tags.json\")},\n                {new Config(CONFIGURATION_FILE, V2_OUTPUT_SWAGGER_COVERAGE_DIR, \"v2/petstory_operation_wo_tags.json\")},\n                {new Config(CONFIGURATION_FILE, V2_OUTPUT_SWAGGER_COVERAGE_DIR, \"v2/petstory_with_x_example.json\")},\n                {new Config(CONFIGURATION_FILE, V2_OUTPUT_SWAGGER_COVERAGE_DIR, \"v2/petstory_without_parameters.json\")},\n                {new Config(CONFIGURATION_FILE, V2_OUTPUT_SWAGGER_COVERAGE_DIR, \"https://petstore.swagger.io/v2/swagger.json\")},\n                //Swagger v3\n                {new Config(CONFIGURATION_FILE, V3_OUTPUT_SWAGGER_COVERAGE_DIR, \"v3/petstory.yaml\")},\n                {new Config(CONFIGURATION_FILE, V3_OUTPUT_SWAGGER_COVERAGE_DIR, \"v3/petstory_no_tags.yaml\")},\n                {new Config(CONFIGURATION_FILE, V3_OUTPUT_SWAGGER_COVERAGE_DIR, \"v3/petstory_operation_wo_tags.yaml\")},\n                {new Config(CONFIGURATION_FILE, V3_OUTPUT_SWAGGER_COVERAGE_DIR, \"v3/petstory_with_x_example.yaml\")},\n                {new Config(CONFIGURATION_FILE, V3_OUTPUT_SWAGGER_COVERAGE_DIR, \"v3/petstory_without_parameters.yaml\")},\n                {new Config(CONFIGURATION_FILE, V3_OUTPUT_SWAGGER_COVERAGE_DIR, \"https://petstore3.swagger.io/api/v3/openapi.yaml\")}\n        });\n    }\n\n    @Test\n    public void simpleTest() {\n        new Generator()\n                .setInputPath(config.getOutput())\n                .setSpecPath(config.getSpec())\n                .run();\n\n        assertThat(get(COVERAGE_HTML_REPORT_NAME).toFile(), FileMatchers.anExistingFile());\n        assertThat(get(COVERAGE_RESULTS_NAME).toFile(), FileMatchers.anExistingFile());\n    }\n\n    @Test\n    public void simpleTestWithConfiguration() {\n        new Generator()\n                .setInputPath(config.getOutput())\n                .setSpecPath(config.getSpec())\n                .setConfigurationPath(config.getPath())\n                .run();\n\n        assertThat(get(\"custom-report.html\").toFile(), FileMatchers.anExistingFile());\n        assertThat(get(\"json-report.json\").toFile(), FileMatchers.anExistingFile());\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/configuration.json",
    "content": "{\n  \"rules\" : {\n    \"status\": {\n      \"filter\": [\"200\"]\n    },\n    \"only-declared-status\" : {\n      \"enable\" : false\n    },\n    \"empty-required-header\" : {\n      \"enable\" : false\n    },\n    \"enum-another-value\" : {\n      \"enable\" : false\n    }\n  },\n  \"writers\": {\n      \"html\": {\n        \"filename\": \"custom-report.html\",\n        \"locale\": \"en\"\n      }\n  }\n}"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/full_configuration.json",
    "content": "{\n  \"rules\": {\n    \"status\": {\n      \"filter\": [\n        \"200\"\n      ],\n      \"ignore\": [\n        \"500\",\n        \"400\",\n        \"404\"\n      ]\n    },\n    \"only-declared-status\": {\n      \"enable\": true\n    },\n    \"empty-required-header\": {\n      \"enable\": true\n    },\n    \"enum-another-value\": {\n      \"enable\": true\n    },\n    \"exclude-deprecated\" : {\n      \"enable\" : true\n    }\n  },\n  \"writers\": {\n    \"html\": {\n      \"filename\": \"custom-report.html\",\n      \"locale\": \"en\"\n    },\n    \"json\": {\n      \"filename\": \"json-report.json\"\n    }\n  }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/report_custom.ftl",
    "content": "<#ftl output_format=\"HTML\">\n\n<#global i18=messages>\n<#global operationMap=data.flatOperations>\n\n<#-- @ftlvariable ftlvariable name=\"data\" type=\"com.github.viclovsky.swagger.coverage.model.SwaggerCoverageResults\" -->\n\n<head>\n    <meta charset=\"utf-8\">\n    <title>Swagger Coverage: CUSTOM_TEST_REPORT</title>\n    <script src=\"https://code.jquery.com/jquery-3.4.1.slim.min.js\"\n            integrity=\"sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n\"\n            crossorigin=\"anonymous\"></script>\n    <script src=\"https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js\"\n            integrity=\"sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo\"\n            crossorigin=\"anonymous\"></script>\n    <script src=\"https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js\"\n            integrity=\"sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6\"\n            crossorigin=\"anonymous\"></script>\n    <link rel=\"stylesheet\" href=\"https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css\"\n          integrity=\"sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO\" crossorigin=\"anonymous\">\n    <script src=\"https://kit.fontawesome.com/0b83173bdb.js\" crossorigin=\"anonymous\"></script>\n    <style>\n        .title {\n            margin-top: 60px;\n        }\n\n        .progress {\n            position: relative;\n        }\n\n        .progress span {\n            position: absolute;\n            display: block;\n            width: 100%;\n            color: black;\n        }\n    </style>\n</head>\n<body>\n\n<nav class=\"navbar navbar-expand-md navbar-dark fixed-top bg-dark\">\n    <div class=\"container\">\n        <div class=\"collapse navbar-collapse\" id=\"navbarCollapse\">\n            <a class=\"navbar-brand\" href=\"#\">${data.info.getTitle()!} ${data.info.getVersion()!}</a>\n            <ul class=\"navbar-nav mr-auto\">\n                <li class=\"nav-item\">\n                    <a class=\"nav-link\" href=\"#tag-section\">${i18[\"menu.tags\"]}</a>\n                </li>\n            </ul>\n        </div>\n    </div>\n</nav>\n\n<main role=\"main\" class=\"container\">\n    <div class=\"container\">\n        <section id=\"condition-section\">\n            <div class=\"row\">\n                <div class=\"accordion col-12\" id=\"conditions-by-type-accordion\">\n                    <#list data.conditionStatisticsMap as key, value>\n                        <div class=\"card\">\n                            <div class=\"card-header\">\n                                <div class=\"row\"\n                                     data-toggle=\"collapse\"\n                                     data-target=\"#conditions-by-type-${key?index}\"\n                                     aria-expanded=\"true\"\n                                     aria-controls=\"collapseOne\">\n                                    <div class=\"col-8\">\n                                        <#assign nameKey = \"predicate.${key}.name\">\n                                        <#assign descriptionKey = \"predicate.${key}.description\">\n                                        <p><strong>${i18[nameKey]!nameKey}</strong></p>\n                                        <small>${i18[descriptionKey]!descriptionKey}</small>\n                                    </div>\n                                </div>\n                            </div>\n                            <div id=\"conditions-by-type-${key?index}\" class=\"collapse\" aria-labelledby=\"headingOne\">\n                                <div class=\"card-body\">\n                                    <div class=\"row\">\n                                        <div class=\"col-12\">\n                                            <div class=\"tab-content\" id=\"details-content-${key?index}\">\n                                                <div class=\"tab-pane fade show active\" id=\"condition-covered-${key?index}\" role=\"tabpanel\" aria-labelledby=\"tab-condition-covered-${key?index}\">\n                                                    <table class=\"table table-sm\">\n                                                        <thead>\n                                                        <tr>\n                                                            <th scope=\"col\">${i18[\"details.condition.conditionname\"]}e</th>\n                                                            <th scope=\"col\">${i18[\"details.condition.details\"]}</th>\n                                                        </tr>\n                                                        </thead>\n                                                        <tbody>\n                                                        <#list value.coveredOperation as conditionItem>\n                                                            <tr class=\"table-success\">\n                                                                <td>\n                                                                    <span>\n                                                                        <i class=\"fas fa-check\"></i>\n                                                                    </span>\n                                                                    &nbsp;${conditionItem.operation}\n                                                                </td>\n                                                                <td>${conditionItem.condition.name}</td>\n                                                                <td>${conditionItem.condition.reason?no_esc}</td>\n                                                            </tr>\n                                                        </#list>\n                                                        </tbody>\n                                                    </table>\n                                                </div>\n                                                <div class=\"tab-pane fade\" id=\"condition-uncovered-${key?index}\" role=\"tabpanel\" aria-labelledby=\"tab-condition-uncovered-${key?index}\">\n                                                    <table class=\"table table-sm\">\n                                                        <thead>\n                                                        <tr>\n                                                            <th scope=\"col\">${i18[\"details.condition.operation\"]}</th>\n                                                            <th scope=\"col\">${i18[\"details.condition.conditionname\"]}e</th>\n                                                            <th scope=\"col\">${i18[\"details.condition.details\"]}</th>\n                                                        </tr>\n                                                        </thead>\n                                                        <tbody>\n                                                        <#list value.uncoveredOperation as conditionItem>\n                                                            <tr class=\"table-danger\">\n                                                                <td>\n                                                                    <span>\n                                                                        <i class=\"fas fa-bug\"></i>\n                                                                    </span>\n                                                                    &nbsp;${conditionItem.operation}\n                                                                </td>\n                                                                <td>${conditionItem.condition.name}</td>\n                                                                <td>${conditionItem.condition.reason?no_esc}</td>\n                                                            </tr>\n                                                        </#list>\n                                                        </tbody>\n                                                    </table>\n                                                </div>\n                                            </div>\n                                        </div>\n                                    </div>\n                                </div>\n                            </div>\n                        </div>\n                    </#list>\n                </div>\n            </div>\n        </section>\n\n        <section id=\"system-section\">\n            <div class=\"row\">\n                <div class=\"col-12\">\n                    <div class=\"col-sm\">\n                        <div class=\"alert alert-secondary\" role=\"alert\">\n                            <pre>${data.prettyConfiguration} </pre>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </section>\n\n        <footer class=\"page-footer font-small mdb-color lighten-3 pt-4\">\n            <div class=\"footer-copyright text-center py-3\"></div>\n        </footer>\n\n    </div>\n</main>\n\n</body>\n"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v2/petstory.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 [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    \"version\": \"1.0.3\",\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\": \"petstore.swagger.io\",\n  \"basePath\": \"/v2\",\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    \"https\",\n    \"http\"\n  ],\n  \"paths\": {\n    \"/pet/{petId}\": {\n      \"get\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Find pet by ID\",\n        \"description\": \"Returns a single pet\",\n        \"operationId\": \"getPetById\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet to return\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Pet not found\"\n          }\n        },\n        \"security\": [\n          {\n            \"api_key\": []\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Updates a pet in the store with form data\",\n        \"description\": \"\",\n        \"operationId\": \"updatePetWithForm\",\n        \"consumes\": [\n          \"application/x-www-form-urlencoded\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet that needs to be updated\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          {\n            \"name\": \"name\",\n            \"in\": \"formData\",\n            \"description\": \"Updated name of the pet\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"status\",\n            \"in\": \"formData\",\n            \"description\": \"Updated status of the pet\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      },\n      \"delete\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Deletes a pet\",\n        \"description\": \"\",\n        \"operationId\": \"deletePet\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"api_key\",\n            \"in\": \"header\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"Pet id to delete\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Pet not found\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pet/{petId}/uploadImage\": {\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"uploads an image\",\n        \"description\": \"\",\n        \"operationId\": \"uploadFile\",\n        \"consumes\": [\n          \"multipart/form-data\"\n        ],\n        \"produces\": [\n          \"application/json\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet to update\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          {\n            \"name\": \"additionalMetadata\",\n            \"in\": \"formData\",\n            \"description\": \"Additional data to pass to server\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"file\",\n            \"in\": \"formData\",\n            \"description\": \"file to upload\",\n            \"required\": false,\n            \"type\": \"file\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/ApiResponse\"\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pet\": {\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Add a new pet to the store\",\n        \"description\": \"\",\n        \"operationId\": \"addPet\",\n        \"consumes\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Update an existing pet\",\n        \"description\": \"\",\n        \"operationId\": \"updatePet\",\n        \"consumes\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\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        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pet/findByStatus\": {\n      \"get\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Finds Pets by status\",\n        \"description\": \"Multiple status values can be provided with comma separated strings\",\n        \"operationId\": \"findPetsByStatus\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"status\",\n            \"in\": \"query\",\n            \"description\": \"Status values that need to be considered for filter\",\n            \"required\": true,\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\",\n              \"enum\": [\n                \"available\",\n                \"pending\",\n                \"sold\"\n              ],\n              \"default\": \"available\"\n            },\n            \"collectionFormat\": \"multi\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Pet\"\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid status value\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\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        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"tags\",\n            \"in\": \"query\",\n            \"description\": \"Tags to filter by\",\n            \"required\": true,\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"collectionFormat\": \"multi\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Pet\"\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid tag value\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ],\n        \"deprecated\": true\n      }\n    },\n    \"/store/inventory\": {\n      \"get\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Returns pet inventories by status\",\n        \"description\": \"Returns a map of status codes to quantities\",\n        \"operationId\": \"getInventory\",\n        \"produces\": [\n          \"application/json\"\n        ],\n        \"parameters\": [],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"object\",\n              \"additionalProperties\": {\n                \"type\": \"integer\",\n                \"format\": \"int32\"\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"api_key\": []\n          }\n        ]\n      }\n    },\n    \"/store/order/{orderId}\": {\n      \"get\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Find purchase order by ID\",\n        \"description\": \"For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions\",\n        \"operationId\": \"getOrderById\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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\": \"integer\",\n            \"maximum\": 10,\n            \"minimum\": 1,\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Order not found\"\n          }\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Delete purchase order by ID\",\n        \"description\": \"For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors\",\n        \"operationId\": \"deleteOrder\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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\": \"integer\",\n            \"minimum\": 1,\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Order not found\"\n          }\n        }\n      }\n    },\n    \"/store/order\": {\n      \"post\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Place an order for a pet\",\n        \"description\": \"\",\n        \"operationId\": \"placeOrder\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"order placed for purchasing the pet\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid Order\"\n          }\n        }\n      }\n    },\n    \"/user/{username}\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Get user by user name\",\n        \"description\": \"\",\n        \"operationId\": \"getUserByName\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid username supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      },\n      \"put\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Updated user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"updateUser\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"username\",\n            \"in\": \"path\",\n            \"description\": \"name that need to be updated\",\n            \"required\": true,\n            \"type\": \"string\"\n          },\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Updated user object\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid user supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Delete user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"deleteUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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          \"400\": {\n            \"description\": \"Invalid username supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      }\n    },\n    \"/user/login\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Logs user into the system\",\n        \"description\": \"\",\n        \"operationId\": \"loginUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"username\",\n            \"in\": \"query\",\n            \"description\": \"The user name for login\",\n            \"required\": true,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"password\",\n            \"in\": \"query\",\n            \"description\": \"The password for login in clear text\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"headers\": {\n              \"X-Expires-After\": {\n                \"type\": \"string\",\n                \"format\": \"date-time\",\n                \"description\": \"date in UTC when token expires\"\n              },\n              \"X-Rate-Limit\": {\n                \"type\": \"integer\",\n                \"format\": \"int32\",\n                \"description\": \"calls per hour allowed by the user\"\n              }\n            },\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid username/password supplied\"\n          }\n        }\n      }\n    },\n    \"/user/logout\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Logs out current logged in user session\",\n        \"description\": \"\",\n        \"operationId\": \"logoutUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Create user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"createUser\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Created user object\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user/createWithArray\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Creates list of users with given input array\",\n        \"description\": \"\",\n        \"operationId\": \"createUsersWithArrayInput\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"List of user object\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/User\"\n              }\n            }\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user/createWithList\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Creates list of users with given input array\",\n        \"description\": \"\",\n        \"operationId\": \"createUsersWithListInput\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"List of user object\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/User\"\n              }\n            }\n          }\n        ],\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\": \"https://petstore.swagger.io/oauth/authorize\",\n      \"flow\": \"implicit\",\n      \"scopes\": {\n        \"read:pets\": \"read your pets\",\n        \"write:pets\": \"modify pets in your account\"\n      }\n    }\n  },\n  \"definitions\": {\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    \"Pet\": {\n      \"type\": \"object\",\n      \"required\": [\n        \"name\",\n        \"photoUrls\"\n      ],\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"category\": {\n          \"$ref\": \"#/definitions/Category\"\n        },\n        \"name\": {\n          \"type\": \"string\",\n          \"example\": \"doggie\"\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            \"xml\": {\n              \"name\": \"tag\"\n            },\n            \"$ref\": \"#/definitions/Tag\"\n          }\n        },\n        \"status\": {\n          \"type\": \"string\",\n          \"description\": \"pet status in the store\",\n          \"enum\": [\n            \"available\",\n            \"pending\",\n            \"sold\"\n          ]\n        }\n      },\n      \"xml\": {\n        \"name\": \"Pet\"\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    \"ApiResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"code\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"type\": {\n          \"type\": \"string\"\n        },\n        \"message\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Order\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"petId\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"quantity\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"shipDate\": {\n          \"type\": \"string\",\n          \"format\": \"date-time\"\n        },\n        \"status\": {\n          \"type\": \"string\",\n          \"description\": \"Order Status\",\n          \"enum\": [\n            \"placed\",\n            \"approved\",\n            \"delivered\"\n          ]\n        },\n        \"complete\": {\n          \"type\": \"boolean\"\n        }\n      },\n      \"xml\": {\n        \"name\": \"Order\"\n      }\n    },\n    \"User\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"username\": {\n          \"type\": \"string\"\n        },\n        \"firstName\": {\n          \"type\": \"string\"\n        },\n        \"lastName\": {\n          \"type\": \"string\"\n        },\n        \"email\": {\n          \"type\": \"string\"\n        },\n        \"password\": {\n          \"type\": \"string\"\n        },\n        \"phone\": {\n          \"type\": \"string\"\n        },\n        \"userStatus\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"User Status\"\n        }\n      },\n      \"xml\": {\n        \"name\": \"User\"\n      }\n    }\n  },\n  \"externalDocs\": {\n    \"description\": \"Find out more about Swagger\",\n    \"url\": \"http://swagger.io\"\n  }\n}"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v2/petstory_no_tags.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 [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    \"version\": \"1.0.3\",\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\": \"petstore.swagger.io\",\n  \"basePath\": \"/v2\",\n  \"schemes\": [\n    \"https\",\n    \"http\"\n  ],\n  \"paths\": {\n    \"/pet/{petId}\": {\n      \"get\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Find pet by ID\",\n        \"description\": \"Returns a single pet\",\n        \"operationId\": \"getPetById\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet to return\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Pet not found\"\n          }\n        },\n        \"security\": [\n          {\n            \"api_key\": []\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Updates a pet in the store with form data\",\n        \"description\": \"\",\n        \"operationId\": \"updatePetWithForm\",\n        \"consumes\": [\n          \"application/x-www-form-urlencoded\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet that needs to be updated\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          {\n            \"name\": \"name\",\n            \"in\": \"formData\",\n            \"description\": \"Updated name of the pet\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"status\",\n            \"in\": \"formData\",\n            \"description\": \"Updated status of the pet\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      },\n      \"delete\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Deletes a pet\",\n        \"description\": \"\",\n        \"operationId\": \"deletePet\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"api_key\",\n            \"in\": \"header\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"Pet id to delete\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Pet not found\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pet/{petId}/uploadImage\": {\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"uploads an image\",\n        \"description\": \"\",\n        \"operationId\": \"uploadFile\",\n        \"consumes\": [\n          \"multipart/form-data\"\n        ],\n        \"produces\": [\n          \"application/json\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet to update\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          {\n            \"name\": \"additionalMetadata\",\n            \"in\": \"formData\",\n            \"description\": \"Additional data to pass to server\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"file\",\n            \"in\": \"formData\",\n            \"description\": \"file to upload\",\n            \"required\": false,\n            \"type\": \"file\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/ApiResponse\"\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pet\": {\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Add a new pet to the store\",\n        \"description\": \"\",\n        \"operationId\": \"addPet\",\n        \"consumes\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Update an existing pet\",\n        \"description\": \"\",\n        \"operationId\": \"updatePet\",\n        \"consumes\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\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        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pet/findByStatus\": {\n      \"get\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Finds Pets by status\",\n        \"description\": \"Multiple status values can be provided with comma separated strings\",\n        \"operationId\": \"findPetsByStatus\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"status\",\n            \"in\": \"query\",\n            \"description\": \"Status values that need to be considered for filter\",\n            \"required\": true,\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\",\n              \"enum\": [\n                \"available\",\n                \"pending\",\n                \"sold\"\n              ],\n              \"default\": \"available\"\n            },\n            \"collectionFormat\": \"multi\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Pet\"\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid status value\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\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        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"tags\",\n            \"in\": \"query\",\n            \"description\": \"Tags to filter by\",\n            \"required\": true,\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"collectionFormat\": \"multi\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Pet\"\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid tag value\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ],\n        \"deprecated\": true\n      }\n    },\n    \"/store/inventory\": {\n      \"get\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Returns pet inventories by status\",\n        \"description\": \"Returns a map of status codes to quantities\",\n        \"operationId\": \"getInventory\",\n        \"produces\": [\n          \"application/json\"\n        ],\n        \"parameters\": [],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"object\",\n              \"additionalProperties\": {\n                \"type\": \"integer\",\n                \"format\": \"int32\"\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"api_key\": []\n          }\n        ]\n      }\n    },\n    \"/store/order/{orderId}\": {\n      \"get\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Find purchase order by ID\",\n        \"description\": \"For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions\",\n        \"operationId\": \"getOrderById\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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\": \"integer\",\n            \"maximum\": 10,\n            \"minimum\": 1,\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Order not found\"\n          }\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Delete purchase order by ID\",\n        \"description\": \"For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors\",\n        \"operationId\": \"deleteOrder\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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\": \"integer\",\n            \"minimum\": 1,\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Order not found\"\n          }\n        }\n      }\n    },\n    \"/store/order\": {\n      \"post\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Place an order for a pet\",\n        \"description\": \"\",\n        \"operationId\": \"placeOrder\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"order placed for purchasing the pet\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid Order\"\n          }\n        }\n      }\n    },\n    \"/user/{username}\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Get user by user name\",\n        \"description\": \"\",\n        \"operationId\": \"getUserByName\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid username supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      },\n      \"put\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Updated user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"updateUser\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"username\",\n            \"in\": \"path\",\n            \"description\": \"name that need to be updated\",\n            \"required\": true,\n            \"type\": \"string\"\n          },\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Updated user object\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid user supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Delete user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"deleteUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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          \"400\": {\n            \"description\": \"Invalid username supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      }\n    },\n    \"/user/login\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Logs user into the system\",\n        \"description\": \"\",\n        \"operationId\": \"loginUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"username\",\n            \"in\": \"query\",\n            \"description\": \"The user name for login\",\n            \"required\": true,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"password\",\n            \"in\": \"query\",\n            \"description\": \"The password for login in clear text\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"headers\": {\n              \"X-Expires-After\": {\n                \"type\": \"string\",\n                \"format\": \"date-time\",\n                \"description\": \"date in UTC when token expires\"\n              },\n              \"X-Rate-Limit\": {\n                \"type\": \"integer\",\n                \"format\": \"int32\",\n                \"description\": \"calls per hour allowed by the user\"\n              }\n            },\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid username/password supplied\"\n          }\n        }\n      }\n    },\n    \"/user/logout\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Logs out current logged in user session\",\n        \"description\": \"\",\n        \"operationId\": \"logoutUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Create user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"createUser\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Created user object\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user/createWithArray\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Creates list of users with given input array\",\n        \"description\": \"\",\n        \"operationId\": \"createUsersWithArrayInput\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"List of user object\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/User\"\n              }\n            }\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user/createWithList\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Creates list of users with given input array\",\n        \"description\": \"\",\n        \"operationId\": \"createUsersWithListInput\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"List of user object\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/User\"\n              }\n            }\n          }\n        ],\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\": \"https://petstore.swagger.io/oauth/authorize\",\n      \"flow\": \"implicit\",\n      \"scopes\": {\n        \"read:pets\": \"read your pets\",\n        \"write:pets\": \"modify pets in your account\"\n      }\n    }\n  },\n  \"definitions\": {\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    \"Pet\": {\n      \"type\": \"object\",\n      \"required\": [\n        \"name\",\n        \"photoUrls\"\n      ],\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"category\": {\n          \"$ref\": \"#/definitions/Category\"\n        },\n        \"name\": {\n          \"type\": \"string\",\n          \"example\": \"doggie\"\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            \"xml\": {\n              \"name\": \"tag\"\n            },\n            \"$ref\": \"#/definitions/Tag\"\n          }\n        },\n        \"status\": {\n          \"type\": \"string\",\n          \"description\": \"pet status in the store\",\n          \"enum\": [\n            \"available\",\n            \"pending\",\n            \"sold\"\n          ]\n        }\n      },\n      \"xml\": {\n        \"name\": \"Pet\"\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    \"ApiResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"code\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"type\": {\n          \"type\": \"string\"\n        },\n        \"message\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Order\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"petId\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"quantity\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"shipDate\": {\n          \"type\": \"string\",\n          \"format\": \"date-time\"\n        },\n        \"status\": {\n          \"type\": \"string\",\n          \"description\": \"Order Status\",\n          \"enum\": [\n            \"placed\",\n            \"approved\",\n            \"delivered\"\n          ]\n        },\n        \"complete\": {\n          \"type\": \"boolean\"\n        }\n      },\n      \"xml\": {\n        \"name\": \"Order\"\n      }\n    },\n    \"User\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"username\": {\n          \"type\": \"string\"\n        },\n        \"firstName\": {\n          \"type\": \"string\"\n        },\n        \"lastName\": {\n          \"type\": \"string\"\n        },\n        \"email\": {\n          \"type\": \"string\"\n        },\n        \"password\": {\n          \"type\": \"string\"\n        },\n        \"phone\": {\n          \"type\": \"string\"\n        },\n        \"userStatus\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"User Status\"\n        }\n      },\n      \"xml\": {\n        \"name\": \"User\"\n      }\n    }\n  },\n  \"externalDocs\": {\n    \"description\": \"Find out more about Swagger\",\n    \"url\": \"http://swagger.io\"\n  }\n}"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v2/petstory_operation_wo_tags.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 [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    \"version\": \"1.0.3\",\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\": \"petstore.swagger.io\",\n  \"basePath\": \"/v2\",\n  \"schemes\": [\n    \"https\",\n    \"http\"\n  ],\n  \"paths\": {\n    \"/pet/{petId}\": {\n      \"get\": {\n        \"summary\": \"Find pet by ID\",\n        \"description\": \"Returns a single pet\",\n        \"operationId\": \"getPetById\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet to return\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Pet not found\"\n          }\n        },\n        \"security\": [\n          {\n            \"api_key\": []\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Updates a pet in the store with form data\",\n        \"description\": \"\",\n        \"operationId\": \"updatePetWithForm\",\n        \"consumes\": [\n          \"application/x-www-form-urlencoded\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet that needs to be updated\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          {\n            \"name\": \"name\",\n            \"in\": \"formData\",\n            \"description\": \"Updated name of the pet\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"status\",\n            \"in\": \"formData\",\n            \"description\": \"Updated status of the pet\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      },\n      \"delete\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Deletes a pet\",\n        \"description\": \"\",\n        \"operationId\": \"deletePet\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"api_key\",\n            \"in\": \"header\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"Pet id to delete\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Pet not found\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pet/{petId}/uploadImage\": {\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"uploads an image\",\n        \"description\": \"\",\n        \"operationId\": \"uploadFile\",\n        \"consumes\": [\n          \"multipart/form-data\"\n        ],\n        \"produces\": [\n          \"application/json\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet to update\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          {\n            \"name\": \"additionalMetadata\",\n            \"in\": \"formData\",\n            \"description\": \"Additional data to pass to server\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"file\",\n            \"in\": \"formData\",\n            \"description\": \"file to upload\",\n            \"required\": false,\n            \"type\": \"file\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/ApiResponse\"\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pet\": {\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Add a new pet to the store\",\n        \"description\": \"\",\n        \"operationId\": \"addPet\",\n        \"consumes\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Update an existing pet\",\n        \"description\": \"\",\n        \"operationId\": \"updatePet\",\n        \"consumes\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\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        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pet/findByStatus\": {\n      \"get\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Finds Pets by status\",\n        \"description\": \"Multiple status values can be provided with comma separated strings\",\n        \"operationId\": \"findPetsByStatus\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"status\",\n            \"in\": \"query\",\n            \"description\": \"Status values that need to be considered for filter\",\n            \"required\": true,\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\",\n              \"enum\": [\n                \"available\",\n                \"pending\",\n                \"sold\"\n              ],\n              \"default\": \"available\"\n            },\n            \"collectionFormat\": \"multi\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Pet\"\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid status value\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\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        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"tags\",\n            \"in\": \"query\",\n            \"description\": \"Tags to filter by\",\n            \"required\": true,\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"collectionFormat\": \"multi\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Pet\"\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid tag value\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ],\n        \"deprecated\": true\n      }\n    },\n    \"/store/inventory\": {\n      \"get\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Returns pet inventories by status\",\n        \"description\": \"Returns a map of status codes to quantities\",\n        \"operationId\": \"getInventory\",\n        \"produces\": [\n          \"application/json\"\n        ],\n        \"parameters\": [],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"object\",\n              \"additionalProperties\": {\n                \"type\": \"integer\",\n                \"format\": \"int32\"\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"api_key\": []\n          }\n        ]\n      }\n    },\n    \"/store/order/{orderId}\": {\n      \"get\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Find purchase order by ID\",\n        \"description\": \"For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions\",\n        \"operationId\": \"getOrderById\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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\": \"integer\",\n            \"maximum\": 10,\n            \"minimum\": 1,\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Order not found\"\n          }\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Delete purchase order by ID\",\n        \"description\": \"For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors\",\n        \"operationId\": \"deleteOrder\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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\": \"integer\",\n            \"minimum\": 1,\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Order not found\"\n          }\n        }\n      }\n    },\n    \"/store/order\": {\n      \"post\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Place an order for a pet\",\n        \"description\": \"\",\n        \"operationId\": \"placeOrder\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"order placed for purchasing the pet\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid Order\"\n          }\n        }\n      }\n    },\n    \"/user/{username}\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Get user by user name\",\n        \"description\": \"\",\n        \"operationId\": \"getUserByName\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid username supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      },\n      \"put\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Updated user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"updateUser\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"username\",\n            \"in\": \"path\",\n            \"description\": \"name that need to be updated\",\n            \"required\": true,\n            \"type\": \"string\"\n          },\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Updated user object\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid user supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Delete user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"deleteUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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          \"400\": {\n            \"description\": \"Invalid username supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      }\n    },\n    \"/user/login\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Logs user into the system\",\n        \"description\": \"\",\n        \"operationId\": \"loginUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"username\",\n            \"in\": \"query\",\n            \"description\": \"The user name for login\",\n            \"required\": true,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"password\",\n            \"in\": \"query\",\n            \"description\": \"The password for login in clear text\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"headers\": {\n              \"X-Expires-After\": {\n                \"type\": \"string\",\n                \"format\": \"date-time\",\n                \"description\": \"date in UTC when token expires\"\n              },\n              \"X-Rate-Limit\": {\n                \"type\": \"integer\",\n                \"format\": \"int32\",\n                \"description\": \"calls per hour allowed by the user\"\n              }\n            },\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid username/password supplied\"\n          }\n        }\n      }\n    },\n    \"/user/logout\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Logs out current logged in user session\",\n        \"description\": \"\",\n        \"operationId\": \"logoutUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Create user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"createUser\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Created user object\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user/createWithArray\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Creates list of users with given input array\",\n        \"description\": \"\",\n        \"operationId\": \"createUsersWithArrayInput\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"List of user object\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/User\"\n              }\n            }\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user/createWithList\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Creates list of users with given input array\",\n        \"description\": \"\",\n        \"operationId\": \"createUsersWithListInput\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"List of user object\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/User\"\n              }\n            }\n          }\n        ],\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\": \"https://petstore.swagger.io/oauth/authorize\",\n      \"flow\": \"implicit\",\n      \"scopes\": {\n        \"read:pets\": \"read your pets\",\n        \"write:pets\": \"modify pets in your account\"\n      }\n    }\n  },\n  \"definitions\": {\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    \"Pet\": {\n      \"type\": \"object\",\n      \"required\": [\n        \"name\",\n        \"photoUrls\"\n      ],\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"category\": {\n          \"$ref\": \"#/definitions/Category\"\n        },\n        \"name\": {\n          \"type\": \"string\",\n          \"example\": \"doggie\"\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            \"xml\": {\n              \"name\": \"tag\"\n            },\n            \"$ref\": \"#/definitions/Tag\"\n          }\n        },\n        \"status\": {\n          \"type\": \"string\",\n          \"description\": \"pet status in the store\",\n          \"enum\": [\n            \"available\",\n            \"pending\",\n            \"sold\"\n          ]\n        }\n      },\n      \"xml\": {\n        \"name\": \"Pet\"\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    \"ApiResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"code\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"type\": {\n          \"type\": \"string\"\n        },\n        \"message\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Order\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"petId\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"quantity\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"shipDate\": {\n          \"type\": \"string\",\n          \"format\": \"date-time\"\n        },\n        \"status\": {\n          \"type\": \"string\",\n          \"description\": \"Order Status\",\n          \"enum\": [\n            \"placed\",\n            \"approved\",\n            \"delivered\"\n          ]\n        },\n        \"complete\": {\n          \"type\": \"boolean\"\n        }\n      },\n      \"xml\": {\n        \"name\": \"Order\"\n      }\n    },\n    \"User\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"username\": {\n          \"type\": \"string\"\n        },\n        \"firstName\": {\n          \"type\": \"string\"\n        },\n        \"lastName\": {\n          \"type\": \"string\"\n        },\n        \"email\": {\n          \"type\": \"string\"\n        },\n        \"password\": {\n          \"type\": \"string\"\n        },\n        \"phone\": {\n          \"type\": \"string\"\n        },\n        \"userStatus\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"User Status\"\n        }\n      },\n      \"xml\": {\n        \"name\": \"User\"\n      }\n    }\n  },\n  \"externalDocs\": {\n    \"description\": \"Find out more about Swagger\",\n    \"url\": \"http://swagger.io\"\n  }\n}"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v2/petstory_with_x_example.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 [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    \"version\": \"1.0.3\",\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\": \"petstore.swagger.io\",\n  \"basePath\": \"/v2\",\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    \"https\",\n    \"http\"\n  ],\n  \"paths\": {\n    \"/pet/{petId}\": {\n      \"get\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Find pet by ID\",\n        \"description\": \"Returns a single pet\",\n        \"operationId\": \"getPetById\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet to return\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Pet not found\"\n          }\n        },\n        \"security\": [\n          {\n            \"api_key\": []\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Updates a pet in the store with form data\",\n        \"description\": \"\",\n        \"operationId\": \"updatePetWithForm\",\n        \"consumes\": [\n          \"application/x-www-form-urlencoded\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet that needs to be updated\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          {\n            \"name\": \"name\",\n            \"in\": \"formData\",\n            \"description\": \"Updated name of the pet\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"status\",\n            \"in\": \"formData\",\n            \"description\": \"Updated status of the pet\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      },\n      \"delete\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Deletes a pet\",\n        \"description\": \"\",\n        \"operationId\": \"deletePet\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"api_key\",\n            \"in\": \"header\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"Pet id to delete\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Pet not found\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pet/{petId}/uploadImage\": {\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"uploads an image\",\n        \"description\": \"\",\n        \"operationId\": \"uploadFile\",\n        \"consumes\": [\n          \"multipart/form-data\"\n        ],\n        \"produces\": [\n          \"application/json\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet to update\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          {\n            \"name\": \"additionalMetadata\",\n            \"in\": \"formData\",\n            \"description\": \"Additional data to pass to server\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"file\",\n            \"in\": \"formData\",\n            \"description\": \"file to upload\",\n            \"required\": false,\n            \"type\": \"file\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/ApiResponse\"\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pet\": {\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Add a new pet to the store\",\n        \"description\": \"\",\n        \"operationId\": \"addPet\",\n        \"consumes\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Update an existing pet\",\n        \"description\": \"\",\n        \"operationId\": \"updatePet\",\n        \"consumes\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\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        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pet/findByStatus\": {\n      \"get\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Finds Pets by status\",\n        \"description\": \"Multiple status values can be provided with comma separated strings\",\n        \"operationId\": \"findPetsByStatus\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"status\",\n            \"in\": \"query\",\n            \"description\": \"Status values that need to be considered for filter\",\n            \"required\": true,\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\",\n              \"enum\": [\n                \"available\",\n                \"pending\",\n                \"sold\"\n              ],\n              \"default\": \"available\"\n            },\n            \"collectionFormat\": \"multi\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Pet\"\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid status value\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\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        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"tags\",\n            \"in\": \"query\",\n            \"description\": \"Tags to filter by\",\n            \"required\": true,\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"collectionFormat\": \"multi\"\n          },\n          {\n            \"name\": \"string_parameter\",\n            \"in\": \"query\",\n            \"description\": \"Parameter with string x-example\",\n            \"required\": false,\n            \"type\": \"string\",\n            \"x-example\": \"example_string_value\"\n          },\n          {\n            \"name\": \"integer_parameter\",\n            \"in\": \"query\",\n            \"description\": \"Parameter with integer x-example\",\n            \"required\": false,\n            \"type\": \"integer\",\n            \"x-example\": 100\n          },\n          {\n            \"name\": \"boolean_parameter\",\n            \"in\": \"query\",\n            \"description\": \"Parameter with boolean x-example\",\n            \"required\": false,\n            \"type\": \"boolean\",\n            \"x-example\": true\n          },\n          {\n            \"name\": \"enum_parameter\",\n            \"in\": \"query\",\n            \"description\": \"Parameter with enum x-example\",\n            \"required\": false,\n            \"type\": \"string\",\n            \"x-example\": \"first_value\",\n            \"enum\": [\"first_value\", \"second_value\"]\n          },\n          {\n            \"name\": \"array_parameter\",\n            \"in\": \"query\",\n            \"description\": \"Parameter with array x-example\",\n            \"required\": false,\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"collectionFormat\": \"multi\",\n            \"x-example\": \"array_value\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Pet\"\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid tag value\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ],\n        \"deprecated\": true\n      }\n    },\n    \"/store/inventory\": {\n      \"get\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Returns pet inventories by status\",\n        \"description\": \"Returns a map of status codes to quantities\",\n        \"operationId\": \"getInventory\",\n        \"produces\": [\n          \"application/json\"\n        ],\n        \"parameters\": [],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"object\",\n              \"additionalProperties\": {\n                \"type\": \"integer\",\n                \"format\": \"int32\"\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"api_key\": []\n          }\n        ]\n      }\n    },\n    \"/store/order/{orderId}\": {\n      \"get\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Find purchase order by ID\",\n        \"description\": \"For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions\",\n        \"operationId\": \"getOrderById\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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\": \"integer\",\n            \"maximum\": 10,\n            \"minimum\": 1,\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Order not found\"\n          }\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Delete purchase order by ID\",\n        \"description\": \"For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors\",\n        \"operationId\": \"deleteOrder\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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\": \"integer\",\n            \"minimum\": 1,\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Order not found\"\n          }\n        }\n      }\n    },\n    \"/store/order\": {\n      \"post\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Place an order for a pet\",\n        \"description\": \"\",\n        \"operationId\": \"placeOrder\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"order placed for purchasing the pet\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid Order\"\n          }\n        }\n      }\n    },\n    \"/user/{username}\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Get user by user name\",\n        \"description\": \"\",\n        \"operationId\": \"getUserByName\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid username supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      },\n      \"put\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Updated user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"updateUser\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"username\",\n            \"in\": \"path\",\n            \"description\": \"name that need to be updated\",\n            \"required\": true,\n            \"type\": \"string\"\n          },\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Updated user object\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid user supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Delete user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"deleteUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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          \"400\": {\n            \"description\": \"Invalid username supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      }\n    },\n    \"/user/login\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Logs user into the system\",\n        \"description\": \"\",\n        \"operationId\": \"loginUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"username\",\n            \"in\": \"query\",\n            \"description\": \"The user name for login\",\n            \"required\": true,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"password\",\n            \"in\": \"query\",\n            \"description\": \"The password for login in clear text\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"headers\": {\n              \"X-Expires-After\": {\n                \"type\": \"string\",\n                \"format\": \"date-time\",\n                \"description\": \"date in UTC when token expires\"\n              },\n              \"X-Rate-Limit\": {\n                \"type\": \"integer\",\n                \"format\": \"int32\",\n                \"description\": \"calls per hour allowed by the user\"\n              }\n            },\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid username/password supplied\"\n          }\n        }\n      }\n    },\n    \"/user/logout\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Logs out current logged in user session\",\n        \"description\": \"\",\n        \"operationId\": \"logoutUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Create user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"createUser\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Created user object\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user/createWithArray\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Creates list of users with given input array\",\n        \"description\": \"\",\n        \"operationId\": \"createUsersWithArrayInput\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"List of user object\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/User\"\n              }\n            }\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user/createWithList\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Creates list of users with given input array\",\n        \"description\": \"\",\n        \"operationId\": \"createUsersWithListInput\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"List of user object\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/User\"\n              }\n            }\n          }\n        ],\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\": \"https://petstore.swagger.io/oauth/authorize\",\n      \"flow\": \"implicit\",\n      \"scopes\": {\n        \"read:pets\": \"read your pets\",\n        \"write:pets\": \"modify pets in your account\"\n      }\n    }\n  },\n  \"definitions\": {\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    \"Pet\": {\n      \"type\": \"object\",\n      \"required\": [\n        \"name\",\n        \"photoUrls\"\n      ],\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"category\": {\n          \"$ref\": \"#/definitions/Category\"\n        },\n        \"name\": {\n          \"type\": \"string\",\n          \"example\": \"doggie\"\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            \"xml\": {\n              \"name\": \"tag\"\n            },\n            \"$ref\": \"#/definitions/Tag\"\n          }\n        },\n        \"status\": {\n          \"type\": \"string\",\n          \"description\": \"pet status in the store\",\n          \"enum\": [\n            \"available\",\n            \"pending\",\n            \"sold\"\n          ]\n        }\n      },\n      \"xml\": {\n        \"name\": \"Pet\"\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    \"ApiResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"code\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"type\": {\n          \"type\": \"string\"\n        },\n        \"message\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Order\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"petId\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"quantity\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"shipDate\": {\n          \"type\": \"string\",\n          \"format\": \"date-time\"\n        },\n        \"status\": {\n          \"type\": \"string\",\n          \"description\": \"Order Status\",\n          \"enum\": [\n            \"placed\",\n            \"approved\",\n            \"delivered\"\n          ]\n        },\n        \"complete\": {\n          \"type\": \"boolean\"\n        }\n      },\n      \"xml\": {\n        \"name\": \"Order\"\n      }\n    },\n    \"User\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"username\": {\n          \"type\": \"string\"\n        },\n        \"firstName\": {\n          \"type\": \"string\"\n        },\n        \"lastName\": {\n          \"type\": \"string\"\n        },\n        \"email\": {\n          \"type\": \"string\"\n        },\n        \"password\": {\n          \"type\": \"string\"\n        },\n        \"phone\": {\n          \"type\": \"string\"\n        },\n        \"userStatus\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"User Status\"\n        }\n      },\n      \"xml\": {\n        \"name\": \"User\"\n      }\n    }\n  },\n  \"externalDocs\": {\n    \"description\": \"Find out more about Swagger\",\n    \"url\": \"http://swagger.io\"\n  }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v2/petstory_without_parameters.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 [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    \"version\": \"1.0.3\",\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\": \"petstore.swagger.io\",\n  \"basePath\": \"/v2\",\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    \"https\",\n    \"http\"\n  ],\n  \"paths\": {\n    \"/pet/{petId}\": {\n      \"get\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Find pet by ID\",\n        \"description\": \"Returns a single pet\",\n        \"operationId\": \"getPetById\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet to return\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Pet not found\"\n          }\n        },\n        \"security\": [\n          {\n            \"api_key\": []\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Updates a pet in the store with form data\",\n        \"description\": \"\",\n        \"operationId\": \"updatePetWithForm\",\n        \"consumes\": [\n          \"application/x-www-form-urlencoded\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet that needs to be updated\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          {\n            \"name\": \"name\",\n            \"in\": \"formData\",\n            \"description\": \"Updated name of the pet\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"status\",\n            \"in\": \"formData\",\n            \"description\": \"Updated status of the pet\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      },\n      \"delete\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Deletes a pet\",\n        \"description\": \"\",\n        \"operationId\": \"deletePet\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"api_key\",\n            \"in\": \"header\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"Pet id to delete\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Pet not found\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pet/{petId}/uploadImage\": {\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"uploads an image\",\n        \"description\": \"\",\n        \"operationId\": \"uploadFile\",\n        \"consumes\": [\n          \"multipart/form-data\"\n        ],\n        \"produces\": [\n          \"application/json\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet to update\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          {\n            \"name\": \"additionalMetadata\",\n            \"in\": \"formData\",\n            \"description\": \"Additional data to pass to server\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"file\",\n            \"in\": \"formData\",\n            \"description\": \"file to upload\",\n            \"required\": false,\n            \"type\": \"file\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/ApiResponse\"\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pet\": {\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Add a new pet to the store\",\n        \"description\": \"\",\n        \"operationId\": \"addPet\",\n        \"consumes\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Update an existing pet\",\n        \"description\": \"\",\n        \"operationId\": \"updatePet\",\n        \"consumes\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\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        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pet/findByStatus\": {\n      \"get\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Finds Pets by status\",\n        \"description\": \"Multiple status values can be provided with comma separated strings\",\n        \"operationId\": \"findPetsByStatus\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Pet\"\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid status value\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\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        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Pet\"\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid tag value\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ],\n        \"deprecated\": true\n      }\n    },\n    \"/store/inventory\": {\n      \"get\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Returns pet inventories by status\",\n        \"description\": \"Returns a map of status codes to quantities\",\n        \"operationId\": \"getInventory\",\n        \"produces\": [\n          \"application/json\"\n        ],\n        \"parameters\": [],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"object\",\n              \"additionalProperties\": {\n                \"type\": \"integer\",\n                \"format\": \"int32\"\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"api_key\": []\n          }\n        ]\n      }\n    },\n    \"/store/order/{orderId}\": {\n      \"get\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Find purchase order by ID\",\n        \"description\": \"For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions\",\n        \"operationId\": \"getOrderById\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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\": \"integer\",\n            \"maximum\": 10,\n            \"minimum\": 1,\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Order not found\"\n          }\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Delete purchase order by ID\",\n        \"description\": \"For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors\",\n        \"operationId\": \"deleteOrder\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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\": \"integer\",\n            \"minimum\": 1,\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Order not found\"\n          }\n        }\n      }\n    },\n    \"/store/order\": {\n      \"post\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Place an order for a pet\",\n        \"description\": \"\",\n        \"operationId\": \"placeOrder\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"order placed for purchasing the pet\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid Order\"\n          }\n        }\n      }\n    },\n    \"/user/{username}\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Get user by user name\",\n        \"description\": \"\",\n        \"operationId\": \"getUserByName\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid username supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      },\n      \"put\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Updated user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"updateUser\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"username\",\n            \"in\": \"path\",\n            \"description\": \"name that need to be updated\",\n            \"required\": true,\n            \"type\": \"string\"\n          },\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Updated user object\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid user supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Delete user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"deleteUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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          \"400\": {\n            \"description\": \"Invalid username supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      }\n    },\n    \"/user/login\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Logs user into the system\",\n        \"description\": \"\",\n        \"operationId\": \"loginUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"username\",\n            \"in\": \"query\",\n            \"description\": \"The user name for login\",\n            \"required\": true,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"password\",\n            \"in\": \"query\",\n            \"description\": \"The password for login in clear text\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"headers\": {\n              \"X-Expires-After\": {\n                \"type\": \"string\",\n                \"format\": \"date-time\",\n                \"description\": \"date in UTC when token expires\"\n              },\n              \"X-Rate-Limit\": {\n                \"type\": \"integer\",\n                \"format\": \"int32\",\n                \"description\": \"calls per hour allowed by the user\"\n              }\n            },\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid username/password supplied\"\n          }\n        }\n      }\n    },\n    \"/user/logout\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Logs out current logged in user session\",\n        \"description\": \"\",\n        \"operationId\": \"logoutUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Create user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"createUser\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Created user object\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user/createWithArray\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Creates list of users with given input array\",\n        \"description\": \"\",\n        \"operationId\": \"createUsersWithArrayInput\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"List of user object\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/User\"\n              }\n            }\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user/createWithList\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Creates list of users with given input array\",\n        \"description\": \"\",\n        \"operationId\": \"createUsersWithListInput\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"List of user object\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/User\"\n              }\n            }\n          }\n        ],\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\": \"https://petstore.swagger.io/oauth/authorize\",\n      \"flow\": \"implicit\",\n      \"scopes\": {\n        \"read:pets\": \"read your pets\",\n        \"write:pets\": \"modify pets in your account\"\n      }\n    }\n  },\n  \"definitions\": {\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    \"Pet\": {\n      \"type\": \"object\",\n      \"required\": [\n        \"name\",\n        \"photoUrls\"\n      ],\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"category\": {\n          \"$ref\": \"#/definitions/Category\"\n        },\n        \"name\": {\n          \"type\": \"string\",\n          \"example\": \"doggie\"\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            \"xml\": {\n              \"name\": \"tag\"\n            },\n            \"$ref\": \"#/definitions/Tag\"\n          }\n        },\n        \"status\": {\n          \"type\": \"string\",\n          \"description\": \"pet status in the store\",\n          \"enum\": [\n            \"available\",\n            \"pending\",\n            \"sold\"\n          ]\n        }\n      },\n      \"xml\": {\n        \"name\": \"Pet\"\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    \"ApiResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"code\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"type\": {\n          \"type\": \"string\"\n        },\n        \"message\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Order\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"petId\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"quantity\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"shipDate\": {\n          \"type\": \"string\",\n          \"format\": \"date-time\"\n        },\n        \"status\": {\n          \"type\": \"string\",\n          \"description\": \"Order Status\",\n          \"enum\": [\n            \"placed\",\n            \"approved\",\n            \"delivered\"\n          ]\n        },\n        \"complete\": {\n          \"type\": \"boolean\"\n        }\n      },\n      \"xml\": {\n        \"name\": \"Order\"\n      }\n    },\n    \"User\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"username\": {\n          \"type\": \"string\"\n        },\n        \"firstName\": {\n          \"type\": \"string\"\n        },\n        \"lastName\": {\n          \"type\": \"string\"\n        },\n        \"email\": {\n          \"type\": \"string\"\n        },\n        \"password\": {\n          \"type\": \"string\"\n        },\n        \"phone\": {\n          \"type\": \"string\"\n        },\n        \"userStatus\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"User Status\"\n        }\n      },\n      \"xml\": {\n        \"name\": \"User\"\n      }\n    }\n  },\n  \"externalDocs\": {\n    \"description\": \"Find out more about Swagger\",\n    \"url\": \"http://swagger.io\"\n  }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v2/swagger-coverage-output/empty_parameters.json",
    "content": "{\n  \"swagger\" : \"2.0\",\n  \"host\" : \"localhost\",\n  \"schemes\" : [ \"http\" ],\n  \"consumes\" : [ \"application/json\" ],\n  \"produces\" : [ \"\" ],\n  \"paths\" : {\n    \"/pet/findByStatus\" : {\n      \"get\" : {\n        \"parameters\" : [ ],\n        \"responses\" : {\n          \"200\" : { }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v2/swagger-coverage-output/enum_param_1.json",
    "content": "{\n  \"swagger\" : \"2.0\",\n  \"host\" : \"localhost\",\n  \"schemes\" : [ \"http\" ],\n  \"consumes\" : [ \"application/json\" ],\n  \"produces\" : [ \"\" ],\n  \"paths\" : {\n    \"/pet/findByStatus\" : {\n      \"get\" : {\n        \"parameters\" : [ {\n          \"name\" : \"status\",\n          \"in\" : \"query\",\n          \"required\" : true,\n          \"x-example\" : \"available\"\n        }, {\n          \"name\" : \"X-Request-ID\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"h\"\n        }, {\n          \"name\" : \"Accept\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"*/*\"\n        }, {\n          \"name\" : \"Content-Type\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"application/x-www-form-urlencoded; charset=ISO-8859-1\"\n        } ],\n        \"responses\" : {\n          \"200\" : { }\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v2/swagger-coverage-output/enum_param_2.json",
    "content": "{\n  \"swagger\" : \"2.0\",\n  \"host\" : \"localhost\",\n  \"schemes\" : [ \"http\" ],\n  \"consumes\" : [ \"application/json\" ],\n  \"produces\" : [ \"\" ],\n  \"paths\" : {\n    \"/pet/findByStatus\" : {\n      \"get\" : {\n        \"parameters\" : [ {\n          \"name\" : \"status\",\n          \"in\" : \"query\",\n          \"required\" : true,\n          \"x-example\" : \"pending\"\n        }, {\n          \"name\" : \"X-Request-ID\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"h\"\n        }, {\n          \"name\" : \"Accept\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"*/*\"\n        }, {\n          \"name\" : \"Content-Type\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"application/x-www-form-urlencoded; charset=ISO-8859-1\"\n        } ],\n        \"responses\" : {\n          \"200\" : { }\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v2/swagger-coverage-output/ignore_header.json",
    "content": "{\n  \"swagger\" : \"2.0\",\n  \"host\" : \"localhost\",\n  \"schemes\" : [ \"http\" ],\n  \"consumes\" : [ \"application/json\" ],\n  \"produces\" : [ \"\" ],\n  \"paths\" : {\n    \"/pet/{petId}\": {\n      \"delete\" : {\n        \"parameters\" : [ {\n          \"name\" : \"petId\",\n          \"in\" : \"path\",\n          \"required\" : true,\n          \"x-example\" : \"p\"\n        }, {\n          \"name\" : \"X-Request-ID\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"h\"\n        }, {\n          \"name\" : \"Accept\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"*/*\"\n        }, {\n          \"name\" : \"Content-Type\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"application/x-www-form-urlencoded; charset=ISO-8859-1\"\n        } ],\n        \"responses\" : {\n          \"404\" : { }\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v2/swagger-coverage-output/match_pattern.json",
    "content": "{\n  \"swagger\" : \"2.0\",\n  \"host\" : \"localhost\",\n  \"schemes\" : [ \"http\" ],\n  \"consumes\" : [ \"application/json\" ],\n  \"produces\" : [ \"\" ],\n  \"paths\" : {\n    \"/user/victor\": {\n      \"get\" : {\n        \"parameters\" : [ {\n          \"name\" : \"username\",\n          \"in\" : \"path\",\n          \"required\" : true,\n          \"x-example\" : \"p\"\n        }, {\n          \"name\" : \"X-Request-ID\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"h\"\n        }, {\n          \"name\" : \"Accept\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"*/*\"\n        }, {\n          \"name\" : \"Content-Type\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"application/x-www-form-urlencoded; charset=ISO-8859-1\"\n        } ],\n        \"responses\" : {\n          \"200\" : { }\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v2/swagger-coverage-output/missed_in_swagger.json",
    "content": "{\n  \"swagger\" : \"2.0\",\n  \"host\" : \"localhost\",\n  \"schemes\" : [ \"http\" ],\n  \"consumes\" : [ \"application/json\" ],\n  \"produces\" : [ \"\" ],\n  \"paths\" : {\n    \"/some/operation/missed/in/swagger\" : {\n      \"get\" : {\n        \"parameters\" : [ {\n          \"name\" : \"petId\",\n          \"in\" : \"path\",\n          \"required\" : true,\n          \"x-example\" : \"p\"\n        }, {\n          \"name\" : \"X-Request-ID\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"h\"\n        }, {\n          \"name\" : \"Accept\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"*/*\"\n        }, {\n          \"name\" : \"Content-Type\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"application/x-www-form-urlencoded; charset=ISO-8859-1\"\n        } ],\n        \"responses\" : {\n          \"200\" : { },\n          \"400\" : { },\n          \"404\" : { }\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v2/swagger-coverage-output/missed_in_swagger_without_x_example.json",
    "content": "{\n  \"swagger\": \"2.0\",\n  \"host\": \"localhost\",\n  \"schemes\": [\n    \"http\"\n  ],\n  \"consumes\": [\n    \"application/json\"\n  ],\n  \"produces\": [\n    \"\"\n  ],\n  \"paths\": {\n    \"/some/operation/missed/in/swagger/without/x/example\": {\n      \"get\": {\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"required\": true,\n            \"x-example\": \"p\"\n          },\n          {\n            \"name\": \"X-Request-ID\",\n            \"in\": \"header\",\n            \"required\": false,\n            \"x-example\": \"h\"\n          },\n          {\n            \"name\": \"Accept\",\n            \"in\": \"header\",\n            \"required\": false,\n            \"x-example\": \"*/*\"\n          },\n          {\n            \"name\": \"Content-Type\",\n            \"in\": \"header\",\n            \"required\": false,\n            \"x-example\": \"application/x-www-form-urlencoded; charset=ISO-8859-1\"\n          },\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"required\": false\n          }\n        ],\n        \"responses\": {\n          \"200\": {}\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v2/swagger-coverage-output/not_200.json",
    "content": "{\n  \"swagger\" : \"2.0\",\n  \"host\" : \"localhost\",\n  \"schemes\" : [ \"http\" ],\n  \"consumes\" : [ \"application/json\" ],\n  \"produces\" : [ \"\" ],\n  \"paths\" : {\n    \"/pet/{petId}/uploadImage\": {\n      \"post\" : {\n        \"parameters\" : [ {\n          \"name\" : \"petId\",\n          \"in\" : \"path\",\n          \"required\" : true,\n          \"x-example\" : \"p\"\n        }, {\n          \"name\" : \"X-Request-ID\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"h\"\n        }, {\n          \"name\" : \"Accept\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"*/*\"\n        }, {\n          \"name\" : \"Content-Type\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"application/x-www-form-urlencoded; charset=ISO-8859-1\"\n        } ],\n        \"responses\" : {\n          \"404\" : { }\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v2/swagger-coverage-output/one_coverage.json",
    "content": "{\n  \"swagger\" : \"2.0\",\n  \"host\" : \"localhost\",\n  \"schemes\" : [ \"http\" ],\n  \"consumes\" : [ \"application/json\" ],\n  \"produces\" : [ \"\" ],\n  \"paths\" : {\n    \"/pet/{petId}\" : {\n      \"get\" : {\n        \"parameters\" : [ {\n          \"name\" : \"petId\",\n          \"in\" : \"path\",\n          \"required\" : true,\n          \"x-example\" : \"p\"\n        }, {\n          \"name\" : \"X-Request-ID\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"h\"\n        }, {\n          \"name\" : \"Accept\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"*/*\"\n        }, {\n          \"name\" : \"Content-Type\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"application/x-www-form-urlencoded; charset=ISO-8859-1\"\n        } ],\n        \"responses\" : {\n          \"200\" : { },\n          \"400\" : { },\n          \"404\" : { }\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v2/swagger-coverage-output/one_parameter.json",
    "content": "{\n  \"swagger\" : \"2.0\",\n  \"host\" : \"localhost\",\n  \"schemes\" : [ \"http\" ],\n  \"consumes\" : [ \"application/json\" ],\n  \"produces\" : [ \"\" ],\n  \"paths\" : {\n    \"/user/{username}\": {\n      \"put\" : {\n        \"parameters\" : [ {\n          \"name\" : \"username\",\n          \"in\" : \"path\",\n          \"required\" : true,\n          \"x-example\" : \"u\"\n        }, {\n          \"name\" : \"X-Request-ID\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"h\"\n        }, {\n          \"name\" : \"Accept\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"*/*\"\n        }, {\n          \"name\" : \"Content-Type\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"application/x-www-form-urlencoded; charset=ISO-8859-1\"\n        } ],\n        \"responses\" : {\n          \"500\" : { }\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v2/swagger-coverage-output/one_partial_coverage.json",
    "content": "{\n  \"swagger\" : \"2.0\",\n  \"host\" : \"localhost\",\n  \"schemes\" : [ \"http\" ],\n  \"consumes\" : [ \"application/json\" ],\n  \"produces\" : [ \"\" ],\n  \"paths\" : {\n    \"/pet/{petId}\" : {\n      \"get\" : {\n        \"parameters\" : [ {\n          \"name\" : \"petId\",\n          \"in\" : \"path\",\n          \"required\" : true,\n          \"x-example\" : \"p\"\n        }, {\n          \"name\" : \"X-Request-ID\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"h\"\n        }, {\n          \"name\" : \"Accept\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"*/*\"\n        }, {\n          \"name\" : \"Content-Type\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"application/x-www-form-urlencoded; charset=ISO-8859-1\"\n        } ],\n        \"responses\" : {\n          \"200\" : { }\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v2/swagger-coverage-output/test_empty_operation.json",
    "content": "{\n  \"swagger\" : \"2.0\",\n  \"host\" : \"localhost\",\n  \"schemes\" : [ \"http\" ],\n  \"consumes\" : [ \"application/json\" ],\n  \"produces\" : [ \"\" ],\n  \"paths\" : {\n    \"/store/inventory\" : {\n      \"get\" : {\n        \"responses\" : {\n          \"404\" : { }\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v2/swagger-coverage-output/two_coverage.json",
    "content": "{\n  \"swagger\" : \"2.0\",\n  \"host\" : \"localhost\",\n  \"schemes\" : [ \"http\" ],\n  \"consumes\" : [ \"application/json\" ],\n  \"produces\" : [ \"\" ],\n  \"paths\" : {\n    \"/pet/findByStatus\" : {\n      \"get\" : {\n        \"parameters\" : [ {\n          \"name\": \"tags\",\n          \"in\": \"query\",\n          \"required\" : true,\n          \"x-example\" : \"p\"\n        }, {\n          \"name\" : \"X-Request-ID\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"h\"\n        }, {\n          \"name\" : \"Accept\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"*/*\"\n        }, {\n          \"name\" : \"Content-Type\",\n          \"in\" : \"header\",\n          \"required\" : false,\n          \"x-example\" : \"application/x-www-form-urlencoded; charset=ISO-8859-1\"\n        } ],\n        \"responses\" : {\n          \"200\" : { }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v3/operations/pet_petId.yaml",
    "content": "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/json:\n          schema:\n            $ref: \"../petstory_ref_operations.yaml#/components/schemas/Pet\"\n        application/xml:\n          schema:\n            $ref: \"../petstory_ref_operations.yaml#/components/schemas/Pet\"\n    \"400\":\n      description: Invalid ID supplied\n    \"404\":\n      description: Pet not found\n  security:\n    - api_key: []\npost:\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  requestBody:\n    content:\n      application/x-www-form-urlencoded:\n        schema:\n          type: object\n          properties:\n            name:\n              description: Updated name of the pet\n              type: string\n            status:\n              description: Updated status of the pet\n              type: string\n  responses:\n    \"405\":\n      description: Invalid input\n  security:\n    - petstore_auth:\n        - write:pets\n        - read:pets\ndelete:\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"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v3/petstory.yaml",
    "content": "openapi: 3.0.0\ninfo:\n  description: \"This is a sample server Petstore server.  You can find out more about\n    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  version: 1.0.3\n  title: Swagger Petstore\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\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/{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/json:\n              schema:\n                $ref: \"#/components/schemas/Pet\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid ID supplied\n        \"404\":\n          description: Pet not found\n      security:\n        - api_key: []\n    post:\n      tags:\n        - pet\n      summary: Updates a pet in the store with form data\n      description: \"\"\n      operationId: updatePetWithForm\n      parameters:\n        - name: petId\n          in: path\n          description: ID of pet that needs to be updated\n          required: true\n          schema:\n            type: integer\n            format: int64\n      requestBody:\n        content:\n          application/x-www-form-urlencoded:\n            schema:\n              type: object\n              properties:\n                name:\n                  description: Updated name of the pet\n                  type: string\n                status:\n                  description: Updated status of the pet\n                  type: string\n      responses:\n        \"405\":\n          description: Invalid input\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n    delete:\n      tags:\n        - pet\n      summary: Deletes a pet\n      description: \"\"\n      operationId: deletePet\n      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      requestBody:\n        content:\n          multipart/form-data:\n            schema:\n              type: object\n              properties:\n                additionalMetadata:\n                  description: Additional data to pass to server\n                  type: string\n                file:\n                  description: file to upload\n                  type: string\n                  format: binary\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  /pet:\n    post:\n      tags:\n        - pet\n      summary: Add a new pet to the store\n      description: \"\"\n      operationId: addPet\n      requestBody:\n        $ref: \"#/components/requestBodies/Pet\"\n      responses:\n        \"405\":\n          description: Invalid input\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n    put:\n      tags:\n        - pet\n      summary: Update an existing pet\n      description: \"\"\n      operationId: updatePet\n      requestBody:\n        $ref: \"#/components/requestBodies/Pet\"\n      responses:\n        \"400\":\n          description: Invalid ID supplied\n        \"404\":\n          description: Pet not found\n        \"405\":\n          description: Validation exception\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n  /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          explode: true\n          schema:\n            type: array\n            items:\n              type: string\n              enum:\n                - available\n                - pending\n                - sold\n              default: available\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid status value\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n  /pet/findByTags:\n    get:\n      tags:\n        - pet\n      summary: Finds Pets by tags\n      description: Multiple tags can be provided with comma separated strings. Use tag1,\n        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          explode: true\n          schema:\n            type: array\n            items:\n              type: string\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid tag value\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n      deprecated: true\n  /store/inventory:\n    get:\n      tags:\n        - store\n      summary: Returns pet inventories by status\n      description: Returns a map of status codes to quantities\n      operationId: getInventory\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: object\n                additionalProperties:\n                  type: integer\n                  format: int32\n      security:\n        - api_key: []\n  \"/store/order/{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/json:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n        \"400\":\n          description: Invalid ID supplied\n        \"404\":\n          description: Order not found\n    delete:\n      tags:\n        - store\n      summary: Delete purchase order by ID\n      description: For valid response try integer IDs with positive integer value. Negative\n        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  /store/order:\n    post:\n      tags:\n        - store\n      summary: Place an order for a pet\n      description: \"\"\n      operationId: placeOrder\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/Order\"\n        description: order placed for purchasing the pet\n        required: true\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n        \"400\":\n          description: Invalid Order\n  \"/user/{username}\":\n    get:\n      tags:\n        - user\n      summary: Get user by user name\n      description: \"\"\n      operationId: getUserByName\n      parameters:\n        - name: username\n          in: path\n          description: \"The name that needs to be fetched. Use user1 for testing. \"\n          required: true\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/User\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/User\"\n        \"400\":\n          description: Invalid username supplied\n        \"404\":\n          description: User not found\n    put:\n      tags:\n        - user\n      summary: Updated user\n      description: This can only be done by the logged in user.\n      operationId: updateUser\n      parameters:\n        - name: username\n          in: path\n          description: name that need to be updated\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/User\"\n        description: Updated user object\n        required: true\n      responses:\n        \"400\":\n          description: Invalid user supplied\n        \"404\":\n          description: User not found\n    delete:\n      tags:\n        - user\n      summary: Delete user\n      description: This can only be done by the logged in user.\n      operationId: deleteUser\n      parameters:\n        - name: username\n          in: path\n          description: The name that needs to be deleted\n          required: true\n          schema:\n            type: string\n      responses:\n        \"400\":\n          description: Invalid username supplied\n        \"404\":\n          description: User not found\n  /user/login:\n    get:\n      tags:\n        - user\n      summary: Logs user into the system\n      description: \"\"\n      operationId: loginUser\n      parameters:\n        - name: username\n          in: query\n          description: The user name for login\n          required: true\n          schema:\n            type: string\n        - name: password\n          in: query\n          description: The password for login in clear text\n          required: true\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: successful operation\n          headers:\n            X-Expires-After:\n              description: date in UTC when token expires\n              schema:\n                type: string\n                format: date-time\n            X-Rate-Limit:\n              description: calls per hour allowed by the user\n              schema:\n                type: integer\n                format: int32\n          content:\n            application/json:\n              schema:\n                type: string\n            application/xml:\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      responses:\n        default:\n          description: successful operation\n  /user:\n    post:\n      tags:\n        - user\n      summary: Create user\n      description: This can only be done by the logged in user.\n      operationId: createUser\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/User\"\n        description: Created user object\n        required: true\n      responses:\n        default:\n          description: successful operation\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      requestBody:\n        $ref: \"#/components/requestBodies/UserArray\"\n      responses:\n        default:\n          description: successful operation\n  /user/createWithList:\n    post:\n      tags:\n        - user\n      summary: Creates list of users with given input array\n      description: \"\"\n      operationId: createUsersWithListInput\n      requestBody:\n        $ref: \"#/components/requestBodies/UserArray\"\n      responses:\n        default:\n          description: successful operation\nexternalDocs:\n  description: Find out more about Swagger\n  url: http://swagger.io\nservers:\n  - url: https://petstore.swagger.io/v2\n  - url: http://petstore.swagger.io/v2\ncomponents:\n  requestBodies:\n    UserArray:\n      content:\n        application/json:\n          schema:\n            type: array\n            items:\n              $ref: \"#/components/schemas/User\"\n      description: List of user object\n      required: true\n    Pet:\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/Pet\"\n        application/xml:\n          schema:\n            $ref: \"#/components/schemas/Pet\"\n      description: Pet object that needs to be added to the store\n      required: true\n  securitySchemes:\n    api_key:\n      type: apiKey\n      name: api_key\n      in: header\n    petstore_auth:\n      type: oauth2\n      flows:\n        implicit:\n          authorizationUrl: https://petstore.swagger.io/oauth/authorize\n          scopes:\n            read:pets: read your pets\n            write:pets: modify pets in your account\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      required:\n        - name\n        - photoUrls\n      properties:\n        id:\n          type: integer\n          format: int64\n        category:\n          $ref: \"#/components/schemas/Category\"\n        name:\n          type: string\n          example: doggie\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\n            - pending\n            - 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    ApiResponse:\n      type: object\n      properties:\n        code:\n          type: integer\n          format: int32\n        type:\n          type: string\n        message:\n          type: string\n    Order:\n      type: object\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      xml:\n        name: Order\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"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v3/petstory_no_tags.yaml",
    "content": "openapi: 3.0.0\ninfo:\n  description: \"This is a sample server Petstore server.  You can find out more about\n    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  version: 1.0.3\n  title: Swagger Petstore\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\npaths:\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/json:\n              schema:\n                $ref: \"#/components/schemas/Pet\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid ID supplied\n        \"404\":\n          description: Pet not found\n      security:\n        - api_key: []\n    post:\n      tags:\n        - pet\n      summary: Updates a pet in the store with form data\n      description: \"\"\n      operationId: updatePetWithForm\n      parameters:\n        - name: petId\n          in: path\n          description: ID of pet that needs to be updated\n          required: true\n          schema:\n            type: integer\n            format: int64\n      requestBody:\n        content:\n          application/x-www-form-urlencoded:\n            schema:\n              type: object\n              properties:\n                name:\n                  description: Updated name of the pet\n                  type: string\n                status:\n                  description: Updated status of the pet\n                  type: string\n      responses:\n        \"405\":\n          description: Invalid input\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n    delete:\n      tags:\n        - pet\n      summary: Deletes a pet\n      description: \"\"\n      operationId: deletePet\n      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      requestBody:\n        content:\n          multipart/form-data:\n            schema:\n              type: object\n              properties:\n                additionalMetadata:\n                  description: Additional data to pass to server\n                  type: string\n                file:\n                  description: file to upload\n                  type: string\n                  format: binary\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  /pet:\n    post:\n      tags:\n        - pet\n      summary: Add a new pet to the store\n      description: \"\"\n      operationId: addPet\n      requestBody:\n        $ref: \"#/components/requestBodies/Pet\"\n      responses:\n        \"405\":\n          description: Invalid input\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n    put:\n      tags:\n        - pet\n      summary: Update an existing pet\n      description: \"\"\n      operationId: updatePet\n      requestBody:\n        $ref: \"#/components/requestBodies/Pet\"\n      responses:\n        \"400\":\n          description: Invalid ID supplied\n        \"404\":\n          description: Pet not found\n        \"405\":\n          description: Validation exception\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n  /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          explode: true\n          schema:\n            type: array\n            items:\n              type: string\n              enum:\n                - available\n                - pending\n                - sold\n              default: available\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid status value\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n  /pet/findByTags:\n    get:\n      tags:\n        - pet\n      summary: Finds Pets by tags\n      description: Multiple tags can be provided with comma separated strings. Use tag1,\n        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          explode: true\n          schema:\n            type: array\n            items:\n              type: string\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid tag value\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n      deprecated: true\n  /store/inventory:\n    get:\n      tags:\n        - store\n      summary: Returns pet inventories by status\n      description: Returns a map of status codes to quantities\n      operationId: getInventory\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: object\n                additionalProperties:\n                  type: integer\n                  format: int32\n      security:\n        - api_key: []\n  \"/store/order/{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/json:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n        \"400\":\n          description: Invalid ID supplied\n        \"404\":\n          description: Order not found\n    delete:\n      tags:\n        - store\n      summary: Delete purchase order by ID\n      description: For valid response try integer IDs with positive integer value. Negative\n        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  /store/order:\n    post:\n      tags:\n        - store\n      summary: Place an order for a pet\n      description: \"\"\n      operationId: placeOrder\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/Order\"\n        description: order placed for purchasing the pet\n        required: true\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n        \"400\":\n          description: Invalid Order\n  \"/user/{username}\":\n    get:\n      tags:\n        - user\n      summary: Get user by user name\n      description: \"\"\n      operationId: getUserByName\n      parameters:\n        - name: username\n          in: path\n          description: \"The name that needs to be fetched. Use user1 for testing. \"\n          required: true\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/User\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/User\"\n        \"400\":\n          description: Invalid username supplied\n        \"404\":\n          description: User not found\n    put:\n      tags:\n        - user\n      summary: Updated user\n      description: This can only be done by the logged in user.\n      operationId: updateUser\n      parameters:\n        - name: username\n          in: path\n          description: name that need to be updated\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/User\"\n        description: Updated user object\n        required: true\n      responses:\n        \"400\":\n          description: Invalid user supplied\n        \"404\":\n          description: User not found\n    delete:\n      tags:\n        - user\n      summary: Delete user\n      description: This can only be done by the logged in user.\n      operationId: deleteUser\n      parameters:\n        - name: username\n          in: path\n          description: The name that needs to be deleted\n          required: true\n          schema:\n            type: string\n      responses:\n        \"400\":\n          description: Invalid username supplied\n        \"404\":\n          description: User not found\n  /user/login:\n    get:\n      tags:\n        - user\n      summary: Logs user into the system\n      description: \"\"\n      operationId: loginUser\n      parameters:\n        - name: username\n          in: query\n          description: The user name for login\n          required: true\n          schema:\n            type: string\n        - name: password\n          in: query\n          description: The password for login in clear text\n          required: true\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: successful operation\n          headers:\n            X-Expires-After:\n              description: date in UTC when token expires\n              schema:\n                type: string\n                format: date-time\n            X-Rate-Limit:\n              description: calls per hour allowed by the user\n              schema:\n                type: integer\n                format: int32\n          content:\n            application/json:\n              schema:\n                type: string\n            application/xml:\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      responses:\n        default:\n          description: successful operation\n  /user:\n    post:\n      tags:\n        - user\n      summary: Create user\n      description: This can only be done by the logged in user.\n      operationId: createUser\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/User\"\n        description: Created user object\n        required: true\n      responses:\n        default:\n          description: successful operation\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      requestBody:\n        $ref: \"#/components/requestBodies/UserArray\"\n      responses:\n        default:\n          description: successful operation\n  /user/createWithList:\n    post:\n      tags:\n        - user\n      summary: Creates list of users with given input array\n      description: \"\"\n      operationId: createUsersWithListInput\n      requestBody:\n        $ref: \"#/components/requestBodies/UserArray\"\n      responses:\n        default:\n          description: successful operation\nexternalDocs:\n  description: Find out more about Swagger\n  url: http://swagger.io\nservers:\n  - url: https://petstore.swagger.io/v2\n  - url: http://petstore.swagger.io/v2\ncomponents:\n  requestBodies:\n    UserArray:\n      content:\n        application/json:\n          schema:\n            type: array\n            items:\n              $ref: \"#/components/schemas/User\"\n      description: List of user object\n      required: true\n    Pet:\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/Pet\"\n        application/xml:\n          schema:\n            $ref: \"#/components/schemas/Pet\"\n      description: Pet object that needs to be added to the store\n      required: true\n  securitySchemes:\n    api_key:\n      type: apiKey\n      name: api_key\n      in: header\n    petstore_auth:\n      type: oauth2\n      flows:\n        implicit:\n          authorizationUrl: https://petstore.swagger.io/oauth/authorize\n          scopes:\n            read:pets: read your pets\n            write:pets: modify pets in your account\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      required:\n        - name\n        - photoUrls\n      properties:\n        id:\n          type: integer\n          format: int64\n        category:\n          $ref: \"#/components/schemas/Category\"\n        name:\n          type: string\n          example: doggie\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\n            - pending\n            - 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    ApiResponse:\n      type: object\n      properties:\n        code:\n          type: integer\n          format: int32\n        type:\n          type: string\n        message:\n          type: string\n    Order:\n      type: object\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      xml:\n        name: Order\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"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v3/petstory_operation_wo_tags.yaml",
    "content": "openapi: 3.0.0\ninfo:\n  description: \"This is a sample server Petstore server.  You can find out more about\n    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  version: 1.0.3\n  title: Swagger Petstore\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\npaths:\n  \"/pet/{petId}\":\n    get:\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/json:\n              schema:\n                $ref: \"#/components/schemas/Pet\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid ID supplied\n        \"404\":\n          description: Pet not found\n      security:\n        - api_key: []\n    post:\n      tags:\n        - pet\n      summary: Updates a pet in the store with form data\n      description: \"\"\n      operationId: updatePetWithForm\n      parameters:\n        - name: petId\n          in: path\n          description: ID of pet that needs to be updated\n          required: true\n          schema:\n            type: integer\n            format: int64\n      requestBody:\n        content:\n          application/x-www-form-urlencoded:\n            schema:\n              type: object\n              properties:\n                name:\n                  description: Updated name of the pet\n                  type: string\n                status:\n                  description: Updated status of the pet\n                  type: string\n      responses:\n        \"405\":\n          description: Invalid input\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n    delete:\n      tags:\n        - pet\n      summary: Deletes a pet\n      description: \"\"\n      operationId: deletePet\n      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      requestBody:\n        content:\n          multipart/form-data:\n            schema:\n              type: object\n              properties:\n                additionalMetadata:\n                  description: Additional data to pass to server\n                  type: string\n                file:\n                  description: file to upload\n                  type: string\n                  format: binary\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  /pet:\n    post:\n      tags:\n        - pet\n      summary: Add a new pet to the store\n      description: \"\"\n      operationId: addPet\n      requestBody:\n        $ref: \"#/components/requestBodies/Pet\"\n      responses:\n        \"405\":\n          description: Invalid input\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n    put:\n      tags:\n        - pet\n      summary: Update an existing pet\n      description: \"\"\n      operationId: updatePet\n      requestBody:\n        $ref: \"#/components/requestBodies/Pet\"\n      responses:\n        \"400\":\n          description: Invalid ID supplied\n        \"404\":\n          description: Pet not found\n        \"405\":\n          description: Validation exception\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n  /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          explode: true\n          schema:\n            type: array\n            items:\n              type: string\n              enum:\n                - available\n                - pending\n                - sold\n              default: available\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid status value\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n  /pet/findByTags:\n    get:\n      tags:\n        - pet\n      summary: Finds Pets by tags\n      description: Multiple tags can be provided with comma separated strings. Use tag1,\n        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          explode: true\n          schema:\n            type: array\n            items:\n              type: string\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid tag value\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n      deprecated: true\n  /store/inventory:\n    get:\n      tags:\n        - store\n      summary: Returns pet inventories by status\n      description: Returns a map of status codes to quantities\n      operationId: getInventory\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: object\n                additionalProperties:\n                  type: integer\n                  format: int32\n      security:\n        - api_key: []\n  \"/store/order/{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/json:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n        \"400\":\n          description: Invalid ID supplied\n        \"404\":\n          description: Order not found\n    delete:\n      tags:\n        - store\n      summary: Delete purchase order by ID\n      description: For valid response try integer IDs with positive integer value. Negative\n        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  /store/order:\n    post:\n      tags:\n        - store\n      summary: Place an order for a pet\n      description: \"\"\n      operationId: placeOrder\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/Order\"\n        description: order placed for purchasing the pet\n        required: true\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n        \"400\":\n          description: Invalid Order\n  \"/user/{username}\":\n    get:\n      tags:\n        - user\n      summary: Get user by user name\n      description: \"\"\n      operationId: getUserByName\n      parameters:\n        - name: username\n          in: path\n          description: \"The name that needs to be fetched. Use user1 for testing. \"\n          required: true\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/User\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/User\"\n        \"400\":\n          description: Invalid username supplied\n        \"404\":\n          description: User not found\n    put:\n      tags:\n        - user\n      summary: Updated user\n      description: This can only be done by the logged in user.\n      operationId: updateUser\n      parameters:\n        - name: username\n          in: path\n          description: name that need to be updated\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/User\"\n        description: Updated user object\n        required: true\n      responses:\n        \"400\":\n          description: Invalid user supplied\n        \"404\":\n          description: User not found\n    delete:\n      tags:\n        - user\n      summary: Delete user\n      description: This can only be done by the logged in user.\n      operationId: deleteUser\n      parameters:\n        - name: username\n          in: path\n          description: The name that needs to be deleted\n          required: true\n          schema:\n            type: string\n      responses:\n        \"400\":\n          description: Invalid username supplied\n        \"404\":\n          description: User not found\n  /user/login:\n    get:\n      tags:\n        - user\n      summary: Logs user into the system\n      description: \"\"\n      operationId: loginUser\n      parameters:\n        - name: username\n          in: query\n          description: The user name for login\n          required: true\n          schema:\n            type: string\n        - name: password\n          in: query\n          description: The password for login in clear text\n          required: true\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: successful operation\n          headers:\n            X-Expires-After:\n              description: date in UTC when token expires\n              schema:\n                type: string\n                format: date-time\n            X-Rate-Limit:\n              description: calls per hour allowed by the user\n              schema:\n                type: integer\n                format: int32\n          content:\n            application/json:\n              schema:\n                type: string\n            application/xml:\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      responses:\n        default:\n          description: successful operation\n  /user:\n    post:\n      tags:\n        - user\n      summary: Create user\n      description: This can only be done by the logged in user.\n      operationId: createUser\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/User\"\n        description: Created user object\n        required: true\n      responses:\n        default:\n          description: successful operation\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      requestBody:\n        $ref: \"#/components/requestBodies/UserArray\"\n      responses:\n        default:\n          description: successful operation\n  /user/createWithList:\n    post:\n      tags:\n        - user\n      summary: Creates list of users with given input array\n      description: \"\"\n      operationId: createUsersWithListInput\n      requestBody:\n        $ref: \"#/components/requestBodies/UserArray\"\n      responses:\n        default:\n          description: successful operation\nexternalDocs:\n  description: Find out more about Swagger\n  url: http://swagger.io\nservers:\n  - url: https://petstore.swagger.io/v2\n  - url: http://petstore.swagger.io/v2\ncomponents:\n  requestBodies:\n    UserArray:\n      content:\n        application/json:\n          schema:\n            type: array\n            items:\n              $ref: \"#/components/schemas/User\"\n      description: List of user object\n      required: true\n    Pet:\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/Pet\"\n        application/xml:\n          schema:\n            $ref: \"#/components/schemas/Pet\"\n      description: Pet object that needs to be added to the store\n      required: true\n  securitySchemes:\n    api_key:\n      type: apiKey\n      name: api_key\n      in: header\n    petstore_auth:\n      type: oauth2\n      flows:\n        implicit:\n          authorizationUrl: https://petstore.swagger.io/oauth/authorize\n          scopes:\n            read:pets: read your pets\n            write:pets: modify pets in your account\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      required:\n        - name\n        - photoUrls\n      properties:\n        id:\n          type: integer\n          format: int64\n        category:\n          $ref: \"#/components/schemas/Category\"\n        name:\n          type: string\n          example: doggie\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\n            - pending\n            - 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    ApiResponse:\n      type: object\n      properties:\n        code:\n          type: integer\n          format: int32\n        type:\n          type: string\n        message:\n          type: string\n    Order:\n      type: object\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      xml:\n        name: Order\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"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v3/petstory_ref_operations.yaml",
    "content": "openapi: 3.0.0\ninfo:\n  description: \"This is a sample server Petstore server.  You can find out more about\n    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  version: 1.0.3\n  title: Swagger Petstore\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\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/{petId}\":\n    $ref: operations/pet_petId.yaml\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      requestBody:\n        content:\n          multipart/form-data:\n            schema:\n              type: object\n              properties:\n                additionalMetadata:\n                  description: Additional data to pass to server\n                  type: string\n                file:\n                  description: file to upload\n                  type: string\n                  format: binary\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  /pet:\n    post:\n      tags:\n        - pet\n      summary: Add a new pet to the store\n      description: \"\"\n      operationId: addPet\n      requestBody:\n        $ref: \"#/components/requestBodies/Pet\"\n      responses:\n        \"405\":\n          description: Invalid input\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n    put:\n      tags:\n        - pet\n      summary: Update an existing pet\n      description: \"\"\n      operationId: updatePet\n      requestBody:\n        $ref: \"#/components/requestBodies/Pet\"\n      responses:\n        \"400\":\n          description: Invalid ID supplied\n        \"404\":\n          description: Pet not found\n        \"405\":\n          description: Validation exception\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n  /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          explode: true\n          schema:\n            type: array\n            items:\n              type: string\n              enum:\n                - available\n                - pending\n                - sold\n              default: available\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid status value\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n  /pet/findByTags:\n    get:\n      tags:\n        - pet\n      summary: Finds Pets by tags\n      description: Multiple tags can be provided with comma separated strings. Use tag1,\n        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          explode: true\n          schema:\n            type: array\n            items:\n              type: string\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid tag value\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n      deprecated: true\n  /store/inventory:\n    get:\n      tags:\n        - store\n      summary: Returns pet inventories by status\n      description: Returns a map of status codes to quantities\n      operationId: getInventory\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: object\n                additionalProperties:\n                  type: integer\n                  format: int32\n      security:\n        - api_key: []\n  \"/store/order/{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/json:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n        \"400\":\n          description: Invalid ID supplied\n        \"404\":\n          description: Order not found\n    delete:\n      tags:\n        - store\n      summary: Delete purchase order by ID\n      description: For valid response try integer IDs with positive integer value. Negative\n        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  /store/order:\n    post:\n      tags:\n        - store\n      summary: Place an order for a pet\n      description: \"\"\n      operationId: placeOrder\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/Order\"\n        description: order placed for purchasing the pet\n        required: true\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n        \"400\":\n          description: Invalid Order\n  \"/user/{username}\":\n    get:\n      tags:\n        - user\n      summary: Get user by user name\n      description: \"\"\n      operationId: getUserByName\n      parameters:\n        - name: username\n          in: path\n          description: \"The name that needs to be fetched. Use user1 for testing. \"\n          required: true\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/User\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/User\"\n        \"400\":\n          description: Invalid username supplied\n        \"404\":\n          description: User not found\n    put:\n      tags:\n        - user\n      summary: Updated user\n      description: This can only be done by the logged in user.\n      operationId: updateUser\n      parameters:\n        - name: username\n          in: path\n          description: name that need to be updated\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/User\"\n        description: Updated user object\n        required: true\n      responses:\n        \"400\":\n          description: Invalid user supplied\n        \"404\":\n          description: User not found\n    delete:\n      tags:\n        - user\n      summary: Delete user\n      description: This can only be done by the logged in user.\n      operationId: deleteUser\n      parameters:\n        - name: username\n          in: path\n          description: The name that needs to be deleted\n          required: true\n          schema:\n            type: string\n      responses:\n        \"400\":\n          description: Invalid username supplied\n        \"404\":\n          description: User not found\n  /user/login:\n    get:\n      tags:\n        - user\n      summary: Logs user into the system\n      description: \"\"\n      operationId: loginUser\n      parameters:\n        - name: username\n          in: query\n          description: The user name for login\n          required: true\n          schema:\n            type: string\n        - name: password\n          in: query\n          description: The password for login in clear text\n          required: true\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: successful operation\n          headers:\n            X-Expires-After:\n              description: date in UTC when token expires\n              schema:\n                type: string\n                format: date-time\n            X-Rate-Limit:\n              description: calls per hour allowed by the user\n              schema:\n                type: integer\n                format: int32\n          content:\n            application/json:\n              schema:\n                type: string\n            application/xml:\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      responses:\n        default:\n          description: successful operation\n  /user:\n    post:\n      tags:\n        - user\n      summary: Create user\n      description: This can only be done by the logged in user.\n      operationId: createUser\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/User\"\n        description: Created user object\n        required: true\n      responses:\n        default:\n          description: successful operation\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      requestBody:\n        $ref: \"#/components/requestBodies/UserArray\"\n      responses:\n        default:\n          description: successful operation\n  /user/createWithList:\n    post:\n      tags:\n        - user\n      summary: Creates list of users with given input array\n      description: \"\"\n      operationId: createUsersWithListInput\n      requestBody:\n        $ref: \"#/components/requestBodies/UserArray\"\n      responses:\n        default:\n          description: successful operation\nexternalDocs:\n  description: Find out more about Swagger\n  url: http://swagger.io\nservers:\n  - url: https://petstore.swagger.io/v2\n  - url: http://petstore.swagger.io/v2\ncomponents:\n  requestBodies:\n    UserArray:\n      content:\n        application/json:\n          schema:\n            type: array\n            items:\n              $ref: \"#/components/schemas/User\"\n      description: List of user object\n      required: true\n    Pet:\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/Pet\"\n        application/xml:\n          schema:\n            $ref: \"#/components/schemas/Pet\"\n      description: Pet object that needs to be added to the store\n      required: true\n  securitySchemes:\n    api_key:\n      type: apiKey\n      name: api_key\n      in: header\n    petstore_auth:\n      type: oauth2\n      flows:\n        implicit:\n          authorizationUrl: https://petstore.swagger.io/oauth/authorize\n          scopes:\n            read:pets: read your pets\n            write:pets: modify pets in your account\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      required:\n        - name\n        - photoUrls\n      properties:\n        id:\n          type: integer\n          format: int64\n        category:\n          $ref: \"#/components/schemas/Category\"\n        name:\n          type: string\n          example: doggie\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\n            - pending\n            - 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    ApiResponse:\n      type: object\n      properties:\n        code:\n          type: integer\n          format: int32\n        type:\n          type: string\n        message:\n          type: string\n    Order:\n      type: object\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      xml:\n        name: Order\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": "swagger-coverage-commandline/src/test/resources/v3/petstory_with_x_example.yaml",
    "content": "openapi: 3.0.0\ninfo:\n  description: \"This is a sample server Petstore server.  You can find out more about\n    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  version: 1.0.3\n  title: Swagger Petstore\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\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/{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/json:\n              schema:\n                $ref: \"#/components/schemas/Pet\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid ID supplied\n        \"404\":\n          description: Pet not found\n      security:\n        - api_key: []\n    post:\n      tags:\n        - pet\n      summary: Updates a pet in the store with form data\n      description: \"\"\n      operationId: updatePetWithForm\n      parameters:\n        - name: petId\n          in: path\n          description: ID of pet that needs to be updated\n          required: true\n          schema:\n            type: integer\n            format: int64\n      requestBody:\n        content:\n          application/x-www-form-urlencoded:\n            schema:\n              type: object\n              properties:\n                name:\n                  description: Updated name of the pet\n                  type: string\n                status:\n                  description: Updated status of the pet\n                  type: string\n      responses:\n        \"405\":\n          description: Invalid input\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n    delete:\n      tags:\n        - pet\n      summary: Deletes a pet\n      description: \"\"\n      operationId: deletePet\n      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      requestBody:\n        content:\n          multipart/form-data:\n            schema:\n              type: object\n              properties:\n                additionalMetadata:\n                  description: Additional data to pass to server\n                  type: string\n                file:\n                  description: file to upload\n                  type: string\n                  format: binary\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  /pet:\n    post:\n      tags:\n        - pet\n      summary: Add a new pet to the store\n      description: \"\"\n      operationId: addPet\n      requestBody:\n        $ref: \"#/components/requestBodies/Pet\"\n      responses:\n        \"405\":\n          description: Invalid input\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n    put:\n      tags:\n        - pet\n      summary: Update an existing pet\n      description: \"\"\n      operationId: updatePet\n      requestBody:\n        $ref: \"#/components/requestBodies/Pet\"\n      responses:\n        \"400\":\n          description: Invalid ID supplied\n        \"404\":\n          description: Pet not found\n        \"405\":\n          description: Validation exception\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n  /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          explode: true\n          schema:\n            type: array\n            items:\n              type: string\n              enum:\n                - available\n                - pending\n                - sold\n              default: available\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid status value\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n  /pet/findByTags:\n    get:\n      tags:\n        - pet\n      summary: Finds Pets by tags\n      description: Multiple tags can be provided with comma separated strings. Use tag1,\n        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          explode: true\n          schema:\n            type: array\n            items:\n              type: string\n        - name: string_parameter\n          in: query\n          description: Parameter with string x-example\n          required: false\n          example: example_string_value\n          schema:\n            type: string\n        - name: integer_parameter\n          in: query\n          description: Parameter with integer x-example\n          required: false\n          example: 100\n          schema:\n            type: integer\n        - name: boolean_parameter\n          in: query\n          description: Parameter with boolean x-example\n          required: false\n          example: true\n          schema:\n            type: boolean\n        - name: enum_parameter\n          in: query\n          description: Parameter with enum x-example\n          required: false\n          example: first_value\n          schema:\n            type: string\n            enum:\n              - first_value\n              - second_value\n        - name: array_parameter\n          in: query\n          description: Parameter with array x-example\n          required: false\n          example: array_value\n          explode: true\n          schema:\n            type: array\n            items:\n              type: string\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid tag value\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n      deprecated: true\n  /store/inventory:\n    get:\n      tags:\n        - store\n      summary: Returns pet inventories by status\n      description: Returns a map of status codes to quantities\n      operationId: getInventory\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: object\n                additionalProperties:\n                  type: integer\n                  format: int32\n      security:\n        - api_key: []\n  \"/store/order/{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/json:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n        \"400\":\n          description: Invalid ID supplied\n        \"404\":\n          description: Order not found\n    delete:\n      tags:\n        - store\n      summary: Delete purchase order by ID\n      description: For valid response try integer IDs with positive integer value. Negative\n        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  /store/order:\n    post:\n      tags:\n        - store\n      summary: Place an order for a pet\n      description: \"\"\n      operationId: placeOrder\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/Order\"\n        description: order placed for purchasing the pet\n        required: true\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n        \"400\":\n          description: Invalid Order\n  \"/user/{username}\":\n    get:\n      tags:\n        - user\n      summary: Get user by user name\n      description: \"\"\n      operationId: getUserByName\n      parameters:\n        - name: username\n          in: path\n          description: \"The name that needs to be fetched. Use user1 for testing. \"\n          required: true\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/User\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/User\"\n        \"400\":\n          description: Invalid username supplied\n        \"404\":\n          description: User not found\n    put:\n      tags:\n        - user\n      summary: Updated user\n      description: This can only be done by the logged in user.\n      operationId: updateUser\n      parameters:\n        - name: username\n          in: path\n          description: name that need to be updated\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/User\"\n        description: Updated user object\n        required: true\n      responses:\n        \"400\":\n          description: Invalid user supplied\n        \"404\":\n          description: User not found\n    delete:\n      tags:\n        - user\n      summary: Delete user\n      description: This can only be done by the logged in user.\n      operationId: deleteUser\n      parameters:\n        - name: username\n          in: path\n          description: The name that needs to be deleted\n          required: true\n          schema:\n            type: string\n      responses:\n        \"400\":\n          description: Invalid username supplied\n        \"404\":\n          description: User not found\n  /user/login:\n    get:\n      tags:\n        - user\n      summary: Logs user into the system\n      description: \"\"\n      operationId: loginUser\n      parameters:\n        - name: username\n          in: query\n          description: The user name for login\n          required: true\n          schema:\n            type: string\n        - name: password\n          in: query\n          description: The password for login in clear text\n          required: true\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: successful operation\n          headers:\n            X-Expires-After:\n              description: date in UTC when token expires\n              schema:\n                type: string\n                format: date-time\n            X-Rate-Limit:\n              description: calls per hour allowed by the user\n              schema:\n                type: integer\n                format: int32\n          content:\n            application/json:\n              schema:\n                type: string\n            application/xml:\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      responses:\n        default:\n          description: successful operation\n  /user:\n    post:\n      tags:\n        - user\n      summary: Create user\n      description: This can only be done by the logged in user.\n      operationId: createUser\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/User\"\n        description: Created user object\n        required: true\n      responses:\n        default:\n          description: successful operation\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      requestBody:\n        $ref: \"#/components/requestBodies/UserArray\"\n      responses:\n        default:\n          description: successful operation\n  /user/createWithList:\n    post:\n      tags:\n        - user\n      summary: Creates list of users with given input array\n      description: \"\"\n      operationId: createUsersWithListInput\n      requestBody:\n        $ref: \"#/components/requestBodies/UserArray\"\n      responses:\n        default:\n          description: successful operation\nexternalDocs:\n  description: Find out more about Swagger\n  url: http://swagger.io\nservers:\n  - url: https://petstore.swagger.io/v2\n  - url: http://petstore.swagger.io/v2\ncomponents:\n  requestBodies:\n    UserArray:\n      content:\n        application/json:\n          schema:\n            type: array\n            items:\n              $ref: \"#/components/schemas/User\"\n      description: List of user object\n      required: true\n    Pet:\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/Pet\"\n        application/xml:\n          schema:\n            $ref: \"#/components/schemas/Pet\"\n      description: Pet object that needs to be added to the store\n      required: true\n  securitySchemes:\n    api_key:\n      type: apiKey\n      name: api_key\n      in: header\n    petstore_auth:\n      type: oauth2\n      flows:\n        implicit:\n          authorizationUrl: https://petstore.swagger.io/oauth/authorize\n          scopes:\n            read:pets: read your pets\n            write:pets: modify pets in your account\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      required:\n        - name\n        - photoUrls\n      properties:\n        id:\n          type: integer\n          format: int64\n        category:\n          $ref: \"#/components/schemas/Category\"\n        name:\n          type: string\n          example: doggie\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\n            - pending\n            - 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    ApiResponse:\n      type: object\n      properties:\n        code:\n          type: integer\n          format: int32\n        type:\n          type: string\n        message:\n          type: string\n    Order:\n      type: object\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      xml:\n        name: Order\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"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v3/petstory_without_parameters.yaml",
    "content": "openapi: 3.0.0\ninfo:\n  description: \"This is a sample server Petstore server.  You can find out more about\n    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  version: 1.0.3\n  title: Swagger Petstore\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\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/{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/json:\n              schema:\n                $ref: \"#/components/schemas/Pet\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid ID supplied\n        \"404\":\n          description: Pet not found\n      security:\n        - api_key: []\n    post:\n      tags:\n        - pet\n      summary: Updates a pet in the store with form data\n      description: \"\"\n      operationId: updatePetWithForm\n      parameters:\n        - name: petId\n          in: path\n          description: ID of pet that needs to be updated\n          required: true\n          schema:\n            type: integer\n            format: int64\n      requestBody:\n        content:\n          application/x-www-form-urlencoded:\n            schema:\n              type: object\n              properties:\n                name:\n                  description: Updated name of the pet\n                  type: string\n                status:\n                  description: Updated status of the pet\n                  type: string\n      responses:\n        \"405\":\n          description: Invalid input\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n    delete:\n      tags:\n        - pet\n      summary: Deletes a pet\n      description: \"\"\n      operationId: deletePet\n      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      requestBody:\n        content:\n          multipart/form-data:\n            schema:\n              type: object\n              properties:\n                additionalMetadata:\n                  description: Additional data to pass to server\n                  type: string\n                file:\n                  description: file to upload\n                  type: string\n                  format: binary\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  /pet:\n    post:\n      tags:\n        - pet\n      summary: Add a new pet to the store\n      description: \"\"\n      operationId: addPet\n      requestBody:\n        $ref: \"#/components/requestBodies/Pet\"\n      responses:\n        \"405\":\n          description: Invalid input\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n    put:\n      tags:\n        - pet\n      summary: Update an existing pet\n      description: \"\"\n      operationId: updatePet\n      requestBody:\n        $ref: \"#/components/requestBodies/Pet\"\n      responses:\n        \"400\":\n          description: Invalid ID supplied\n        \"404\":\n          description: Pet not found\n        \"405\":\n          description: Validation exception\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n  /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      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid status value\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n  /pet/findByTags:\n    get:\n      tags:\n        - pet\n      summary: Finds Pets by tags\n      description: Multiple tags can be provided with comma separated strings. Use tag1,\n        tag2, tag3 for testing.\n      operationId: findPetsByTags\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid tag value\n      security:\n        - petstore_auth:\n            - write:pets\n            - read:pets\n      deprecated: true\n  /store/inventory:\n    get:\n      tags:\n        - store\n      summary: Returns pet inventories by status\n      description: Returns a map of status codes to quantities\n      operationId: getInventory\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: object\n                additionalProperties:\n                  type: integer\n                  format: int32\n      security:\n        - api_key: []\n  \"/store/order/{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/json:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n        \"400\":\n          description: Invalid ID supplied\n        \"404\":\n          description: Order not found\n    delete:\n      tags:\n        - store\n      summary: Delete purchase order by ID\n      description: For valid response try integer IDs with positive integer value. Negative\n        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  /store/order:\n    post:\n      tags:\n        - store\n      summary: Place an order for a pet\n      description: \"\"\n      operationId: placeOrder\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/Order\"\n        description: order placed for purchasing the pet\n        required: true\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/Order\"\n        \"400\":\n          description: Invalid Order\n  \"/user/{username}\":\n    get:\n      tags:\n        - user\n      summary: Get user by user name\n      description: \"\"\n      operationId: getUserByName\n      parameters:\n        - name: username\n          in: path\n          description: \"The name that needs to be fetched. Use user1 for testing. \"\n          required: true\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/User\"\n            application/xml:\n              schema:\n                $ref: \"#/components/schemas/User\"\n        \"400\":\n          description: Invalid username supplied\n        \"404\":\n          description: User not found\n    put:\n      tags:\n        - user\n      summary: Updated user\n      description: This can only be done by the logged in user.\n      operationId: updateUser\n      parameters:\n        - name: username\n          in: path\n          description: name that need to be updated\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/User\"\n        description: Updated user object\n        required: true\n      responses:\n        \"400\":\n          description: Invalid user supplied\n        \"404\":\n          description: User not found\n    delete:\n      tags:\n        - user\n      summary: Delete user\n      description: This can only be done by the logged in user.\n      operationId: deleteUser\n      parameters:\n        - name: username\n          in: path\n          description: The name that needs to be deleted\n          required: true\n          schema:\n            type: string\n      responses:\n        \"400\":\n          description: Invalid username supplied\n        \"404\":\n          description: User not found\n  /user/login:\n    get:\n      tags:\n        - user\n      summary: Logs user into the system\n      description: \"\"\n      operationId: loginUser\n      parameters:\n        - name: username\n          in: query\n          description: The user name for login\n          required: true\n          schema:\n            type: string\n        - name: password\n          in: query\n          description: The password for login in clear text\n          required: true\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: successful operation\n          headers:\n            X-Expires-After:\n              description: date in UTC when token expires\n              schema:\n                type: string\n                format: date-time\n            X-Rate-Limit:\n              description: calls per hour allowed by the user\n              schema:\n                type: integer\n                format: int32\n          content:\n            application/json:\n              schema:\n                type: string\n            application/xml:\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      responses:\n        default:\n          description: successful operation\n  /user:\n    post:\n      tags:\n        - user\n      summary: Create user\n      description: This can only be done by the logged in user.\n      operationId: createUser\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/User\"\n        description: Created user object\n        required: true\n      responses:\n        default:\n          description: successful operation\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      requestBody:\n        $ref: \"#/components/requestBodies/UserArray\"\n      responses:\n        default:\n          description: successful operation\n  /user/createWithList:\n    post:\n      tags:\n        - user\n      summary: Creates list of users with given input array\n      description: \"\"\n      operationId: createUsersWithListInput\n      requestBody:\n        $ref: \"#/components/requestBodies/UserArray\"\n      responses:\n        default:\n          description: successful operation\nexternalDocs:\n  description: Find out more about Swagger\n  url: http://swagger.io\nservers:\n  - url: https://petstore.swagger.io/v2\n  - url: http://petstore.swagger.io/v2\ncomponents:\n  requestBodies:\n    UserArray:\n      content:\n        application/json:\n          schema:\n            type: array\n            items:\n              $ref: \"#/components/schemas/User\"\n      description: List of user object\n      required: true\n    Pet:\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/Pet\"\n        application/xml:\n          schema:\n            $ref: \"#/components/schemas/Pet\"\n      description: Pet object that needs to be added to the store\n      required: true\n  securitySchemes:\n    api_key:\n      type: apiKey\n      name: api_key\n      in: header\n    petstore_auth:\n      type: oauth2\n      flows:\n        implicit:\n          authorizationUrl: https://petstore.swagger.io/oauth/authorize\n          scopes:\n            read:pets: read your pets\n            write:pets: modify pets in your account\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      required:\n        - name\n        - photoUrls\n      properties:\n        id:\n          type: integer\n          format: int64\n        category:\n          $ref: \"#/components/schemas/Category\"\n        name:\n          type: string\n          example: doggie\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\n            - pending\n            - 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    ApiResponse:\n      type: object\n      properties:\n        code:\n          type: integer\n          format: int32\n        type:\n          type: string\n        message:\n          type: string\n    Order:\n      type: object\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      xml:\n        name: Order\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": "swagger-coverage-commandline/src/test/resources/v3/swagger-coverage-output/empty_parameters.yaml",
    "content": "---\nopenapi: 3.0.0\npaths:\n  /pet/findByStatus:\n    get:\n      responses:\n        \"200\":\n          description: \"\"\n        \"400\":\n          description: \"\"\n        \"404\":\n          description: \"\"\nservers:\n  - url: http://localhost\ninfo:\n  version: \"\"\n  title: \"\"\n"
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v3/swagger-coverage-output/enum_param_1.yaml",
    "content": "---\nopenapi: 3.0.0\npaths:\n  /pet/findByStatus:\n    get:\n      parameters:\n        - name: status\n          in: query\n          required: true\n          example: available\n          schema:\n            type: string\n        - name: X-Request-ID\n          in: header\n          required: false\n          example: h\n          schema:\n            type: string\n        - name: Accept\n          in: header\n          required: false\n          example: \"*/*\"\n          schema:\n            type: string\n        - name: Content-Type\n          in: header\n          required: false\n          example: application/x-www-form-urlencoded; charset=ISO-8859-1\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: \"\"\nservers:\n  - url: http://localhost\ninfo:\n  version: \"\"\n  title: \"\""
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v3/swagger-coverage-output/enum_param_2.yaml",
    "content": "---\nopenapi: 3.0.0\npaths:\n  /pet/findByStatus:\n    get:\n      parameters:\n        - name: status\n          in: query\n          required: true\n          example: pending\n          schema:\n            type: string\n        - name: X-Request-ID\n          in: header\n          required: false\n          example: h\n          schema:\n            type: string\n        - name: Accept\n          in: header\n          required: false\n          example: \"*/*\"\n          schema:\n            type: string\n        - name: Content-Type\n          in: header\n          required: false\n          example: application/x-www-form-urlencoded; charset=ISO-8859-1\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: \"\"\nservers:\n  - url: http://localhost\ninfo:\n  version: \"\"\n  title: \"\""
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v3/swagger-coverage-output/ignore_header.yaml",
    "content": "---\nopenapi: 3.0.0\npaths:\n  \"/pet/{petId}\":\n    delete:\n      parameters:\n        - name: petId\n          in: path\n          required: true\n          example: p\n          schema:\n            type: string\n        - name: X-Request-ID\n          in: header\n          required: false\n          example: h\n          schema:\n            type: string\n        - name: Accept\n          in: header\n          required: false\n          example: \"*/*\"\n          schema:\n            type: string\n        - name: Content-Type\n          in: header\n          required: false\n          example: application/x-www-form-urlencoded; charset=ISO-8859-1\n          schema:\n            type: string\n      responses:\n        \"404\":\n          description: \"\"\nservers:\n  - url: http://localhost\ninfo:\n  version: \"\"\n  title: \"\""
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v3/swagger-coverage-output/match_pattern.yaml",
    "content": "---\nopenapi: 3.0.0\npaths:\n  /user/victor:\n    get:\n      parameters:\n        - name: username\n          in: path\n          required: true\n          example: p\n          schema:\n            type: string\n        - name: X-Request-ID\n          in: header\n          required: false\n          example: h\n          schema:\n            type: string\n        - name: Accept\n          in: header\n          required: false\n          example: \"*/*\"\n          schema:\n            type: string\n        - name: Content-Type\n          in: header\n          required: false\n          example: application/x-www-form-urlencoded; charset=ISO-8859-1\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: \"\"\nservers:\n  - url: http://localhost\ninfo:\n  version: \"\"\n  title: \"\""
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v3/swagger-coverage-output/missed_in_swagger.yaml",
    "content": "---\nopenapi: 3.0.0\npaths:\n  /some/operation/missed/in/swagger:\n    get:\n      parameters:\n        - name: petId\n          in: path\n          required: true\n          example: p\n          schema:\n            type: string\n        - name: X-Request-ID\n          in: header\n          required: false\n          example: h\n          schema:\n            type: string\n        - name: Accept\n          in: header\n          required: false\n          example: \"*/*\"\n          schema:\n            type: string\n        - name: Content-Type\n          in: header\n          required: false\n          example: application/x-www-form-urlencoded; charset=ISO-8859-1\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: \"\"\n        \"400\":\n          description: \"\"\n        \"404\":\n          description: \"\"\nservers:\n  - url: http://localhost\ninfo:\n  version: \"\"\n  title: \"\""
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v3/swagger-coverage-output/missed_in_swagger_without_x_example.yaml",
    "content": "---\nopenapi: 3.0.0\npaths:\n  /some/operation/missed/in/swagger/without/x/example:\n    get:\n      parameters:\n        - name: petId\n          in: path\n          required: true\n          example: p\n          schema:\n            type: string\n        - name: X-Request-ID\n          in: header\n          required: false\n          example: h\n          schema:\n            type: string\n        - name: Accept\n          in: header\n          required: false\n          example: \"*/*\"\n          schema:\n            type: string\n        - name: Content-Type\n          in: header\n          required: false\n          example: application/x-www-form-urlencoded; charset=ISO-8859-1\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema: {}\n      responses:\n        \"200\":\n          description: \"\"\nservers:\n  - url: http://localhost\ninfo:\n  version: \"\"\n  title: \"\""
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v3/swagger-coverage-output/not_200.yaml",
    "content": "---\nopenapi: 3.0.0\npaths:\n  \"/pet/{petId}/uploadImage\":\n    post:\n      parameters:\n        - name: petId\n          in: path\n          required: true\n          example: p\n          schema:\n            type: string\n        - name: X-Request-ID\n          in: header\n          required: false\n          example: h\n          schema:\n            type: string\n        - name: Accept\n          in: header\n          required: false\n          example: \"*/*\"\n          schema:\n            type: string\n        - name: Content-Type\n          in: header\n          required: false\n          example: application/x-www-form-urlencoded; charset=ISO-8859-1\n          schema:\n            type: string\n      responses:\n        \"404\":\n          description: \"\"\nservers:\n  - url: http://localhost\ninfo:\n  version: \"\"\n  title: \"\""
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v3/swagger-coverage-output/one_coverage.yaml",
    "content": "---\nopenapi: 3.0.0\npaths:\n  \"/pet/{petId}\":\n    get:\n      parameters:\n        - name: petId\n          in: path\n          required: true\n          example: p\n          schema:\n            type: string\n        - name: X-Request-ID\n          in: header\n          required: false\n          example: h\n          schema:\n            type: string\n        - name: Accept\n          in: header\n          required: false\n          example: \"*/*\"\n          schema:\n            type: string\n        - name: Content-Type\n          in: header\n          required: false\n          example: application/x-www-form-urlencoded; charset=ISO-8859-1\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: \"\"\n        \"400\":\n          description: \"\"\n        \"404\":\n          description: \"\"\nservers:\n  - url: http://localhost\ninfo:\n  version: \"\"\n  title: \"\""
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v3/swagger-coverage-output/one_parameter.yaml",
    "content": "---\nopenapi: 3.0.0\npaths:\n  \"/user/{username}\":\n    put:\n      parameters:\n        - name: username\n          in: path\n          required: true\n          example: u\n          schema:\n            type: string\n        - name: X-Request-ID\n          in: header\n          required: false\n          example: h\n          schema:\n            type: string\n        - name: Accept\n          in: header\n          required: false\n          example: \"*/*\"\n          schema:\n            type: string\n        - name: Content-Type\n          in: header\n          required: false\n          example: application/x-www-form-urlencoded; charset=ISO-8859-1\n          schema:\n            type: string\n      responses:\n        \"500\":\n          description: \"\"\nservers:\n  - url: http://localhost\ninfo:\n  version: \"\"\n  title: \"\""
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v3/swagger-coverage-output/one_partial_coverage.yaml",
    "content": "---\nopenapi: 3.0.0\npaths:\n  \"/pet/{petId}\":\n    get:\n      parameters:\n        - name: petId\n          in: path\n          required: true\n          example: p\n          schema:\n            type: string\n        - name: X-Request-ID\n          in: header\n          required: false\n          example: h\n          schema:\n            type: string\n        - name: Accept\n          in: header\n          required: false\n          example: \"*/*\"\n          schema:\n            type: string\n        - name: Content-Type\n          in: header\n          required: false\n          example: application/x-www-form-urlencoded; charset=ISO-8859-1\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: \"\"\nservers:\n  - url: http://localhost\ninfo:\n  version: \"\"\n  title: \"\""
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v3/swagger-coverage-output/test_empty_operation.yaml",
    "content": "---\nopenapi: 3.0.0\npaths:\n  /store/inventory:\n    get:\n      responses:\n        \"404\":\n          description: \"\"\nservers:\n  - url: http://localhost\ninfo:\n  version: \"\"\n  title: \"\""
  },
  {
    "path": "swagger-coverage-commandline/src/test/resources/v3/swagger-coverage-output/two_coverage.yaml",
    "content": "---\nopenapi: 3.0.0\npaths:\n  /pet/findByStatus:\n    get:\n      parameters:\n        - name: tags\n          in: query\n          required: true\n          example: p\n          schema:\n            type: string\n        - name: X-Request-ID\n          in: header\n          required: false\n          example: h\n          schema:\n            type: string\n        - name: Accept\n          in: header\n          required: false\n          example: \"*/*\"\n          schema:\n            type: string\n        - name: Content-Type\n          in: header\n          required: false\n          example: application/x-www-form-urlencoded; charset=ISO-8859-1\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: \"\"\nservers:\n  - url: http://localhost\ninfo:\n  version: \"\"\n  title: \"\""
  },
  {
    "path": "swagger-coverage-commons/build.gradle.kts",
    "content": "plugins {\n    java\n    `java-library`\n}\n\ndescription = \"Swagger Coverage Commons\"\n\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    implementation(\"org.freemarker:freemarker\")\n    implementation(\"io.swagger:swagger-models\")\n    //dirty fix https://github.com/viclovsky/swagger-coverage/issues/90\n    implementation(\"io.swagger.core.v3:swagger-core\")\n    implementation(\"io.swagger.core.v3:swagger-models\")\n    implementation(\"org.slf4j:slf4j-api\")\n    implementation(\"com.fasterxml.jackson.core:jackson-core\")\n    implementation(\"com.fasterxml.jackson.core:jackson-databind\")\n    implementation(\"com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.10.1\")\n    testImplementation(\"junit:junit\")\n}\n"
  },
  {
    "path": "swagger-coverage-commons/src/main/java/com/github/viclovsky/swagger/coverage/CoverageOutputReader.java",
    "content": "package com.github.viclovsky.swagger.coverage;\n\nimport java.nio.file.Path;\nimport java.util.Set;\n\npublic interface CoverageOutputReader {\n\n    Set<Path> getOutputs();\n}\n"
  },
  {
    "path": "swagger-coverage-commons/src/main/java/com/github/viclovsky/swagger/coverage/CoverageOutputWriter.java",
    "content": "package com.github.viclovsky.swagger.coverage;\n\nimport io.swagger.models.Swagger;\nimport io.swagger.v3.oas.models.OpenAPI;\n\npublic interface CoverageOutputWriter {\n\n    void write(Swagger swagger);\n\n    void write(OpenAPI openAPI);\n\n}\n"
  },
  {
    "path": "swagger-coverage-commons/src/main/java/com/github/viclovsky/swagger/coverage/FileSystemOutputReader.java",
    "content": "package com.github.viclovsky.swagger.coverage;\n\nimport java.io.IOException;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.util.HashSet;\nimport java.util.Set;\nimport java.util.stream.Stream;\n\npublic class FileSystemOutputReader implements CoverageOutputReader {\n\n    private final Path outputDirectory;\n\n    public FileSystemOutputReader(final Path outputDirectory) {\n        this.outputDirectory = outputDirectory;\n    }\n\n    @Override\n    public Set<Path> getOutputs() {\n        Set<Path> outputs = new HashSet<>();\n        try (Stream<Path> paths = Files.walk(outputDirectory)) {\n            paths.filter(Files::isRegularFile).forEach(outputs::add);\n        } catch (IOException e) {\n            throw new SwaggerCoverageReadException(\"can't read coverage file's\", e);\n        }\n        return outputs;\n    }\n\n}\n"
  },
  {
    "path": "swagger-coverage-commons/src/main/java/com/github/viclovsky/swagger/coverage/FileSystemOutputWriter.java",
    "content": "package com.github.viclovsky.swagger.coverage;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.github.viclovsky.swagger.coverage.model.SwaggerCoverage2ModelJackson;\nimport io.swagger.models.Swagger;\nimport io.swagger.v3.oas.models.OpenAPI;\n\nimport java.io.IOException;\nimport java.io.OutputStream;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\nimport static com.github.viclovsky.swagger.coverage.SwaggerCoverageUtils.generateJsonCoverageOutputName;\nimport static com.github.viclovsky.swagger.coverage.SwaggerCoverageUtils.generateYamlCoverageOutputName;\nimport static java.nio.file.StandardOpenOption.CREATE_NEW;\n\npublic class FileSystemOutputWriter implements CoverageOutputWriter {\n\n    private final Path outputDirectory;\n\n    private final ObjectMapper jsonMapper;\n    private final ObjectMapper yamlMapper;\n\n    public FileSystemOutputWriter(final Path outputDirectory) {\n        this.outputDirectory = outputDirectory;\n        this.jsonMapper = SwaggerCoverage2ModelJackson.createJsonMapper();\n        this.yamlMapper = SwaggerCoverage2ModelJackson.createYamlMapper();\n    }\n\n    private void createDirectories(final Path directory) {\n        try {\n            Files.createDirectories(directory);\n        } catch (IOException e) {\n            throw new SwaggerCoverageWriteException(\"Could not create Swagger output directory\", e);\n        }\n    }\n\n    @Override\n    public void write(Swagger swagger) {\n        final String swaggerResultName = generateJsonCoverageOutputName();\n        createDirectories(outputDirectory);\n        Path file = outputDirectory.resolve(swaggerResultName);\n        try (OutputStream os = Files.newOutputStream(file, CREATE_NEW)) {\n            jsonMapper.writerWithDefaultPrettyPrinter().writeValue(os, swagger);\n        } catch (IOException e) {\n            throw new SwaggerCoverageWriteException(\"Could not write Swagger\", e);\n        }\n    }\n\n    @Override\n    public void write(OpenAPI openAPI) {\n        final String swaggerResultName = generateYamlCoverageOutputName();\n        createDirectories(outputDirectory);\n        Path file = outputDirectory.resolve(swaggerResultName);\n        try (OutputStream os = Files.newOutputStream(file, CREATE_NEW)) {\n            yamlMapper.writerWithDefaultPrettyPrinter().writeValue(os, openAPI);\n        } catch (IOException e) {\n            throw new SwaggerCoverageWriteException(\"Could not write Swagger\", e);\n        }\n    }\n\n}\n"
  },
  {
    "path": "swagger-coverage-commons/src/main/java/com/github/viclovsky/swagger/coverage/SwaggerCoverageConstants.java",
    "content": "package com.github.viclovsky.swagger.coverage;\n\npublic final class SwaggerCoverageConstants {\n\n    public static final String BODY_PARAM_NAME = \"body\";\n    public static final String COVERAGE_HTML_REPORT_NAME = \"swagger-coverage-report.html\";\n    public static final String COVERAGE_RESULTS_NAME = \"swagger-coverage-results.json\";\n\n    public static final String OUTPUT_DIRECTORY = \"swagger-coverage-output\";\n    public static final String COVERAGE_JSON_OUTPUT_FILE_SUFFIX = \"-coverage.json\";\n    public static final String COVERAGE_YAML_OUTPUT_FILE_SUFFIX = \"-coverage.yaml\";\n\n    private SwaggerCoverageConstants() {\n        throw new IllegalStateException(\"Do not instance\");\n    }\n\n}\n"
  },
  {
    "path": "swagger-coverage-commons/src/main/java/com/github/viclovsky/swagger/coverage/SwaggerCoverageReadException.java",
    "content": "package com.github.viclovsky.swagger.coverage;\n\nclass SwaggerCoverageReadException extends RuntimeException {\n    SwaggerCoverageReadException(String message, Throwable cause) {\n        super(message, cause);\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commons/src/main/java/com/github/viclovsky/swagger/coverage/SwaggerCoverageUtils.java",
    "content": "package com.github.viclovsky.swagger.coverage;\n\nimport java.util.UUID;\n\nimport static com.github.viclovsky.swagger.coverage.SwaggerCoverageConstants.COVERAGE_JSON_OUTPUT_FILE_SUFFIX;\nimport static com.github.viclovsky.swagger.coverage.SwaggerCoverageConstants.COVERAGE_YAML_OUTPUT_FILE_SUFFIX;\n\npublic final class SwaggerCoverageUtils {\n\n    SwaggerCoverageUtils() {\n        throw new IllegalStateException(\"Do not instance\");\n    }\n\n    public static String generateJsonCoverageOutputName() {\n        return generateCoverageOutputName(UUID.randomUUID().toString(), COVERAGE_JSON_OUTPUT_FILE_SUFFIX);\n    }\n\n    public static String generateYamlCoverageOutputName() {\n        return generateCoverageOutputName(UUID.randomUUID().toString(), COVERAGE_YAML_OUTPUT_FILE_SUFFIX);\n    }\n\n    private static String generateCoverageOutputName(String uuid, String suffix) {\n        return uuid + suffix;\n    }\n}\n\n"
  },
  {
    "path": "swagger-coverage-commons/src/main/java/com/github/viclovsky/swagger/coverage/SwaggerCoverageWriteException.java",
    "content": "package com.github.viclovsky.swagger.coverage;\n\npublic class SwaggerCoverageWriteException extends RuntimeException {\n    public SwaggerCoverageWriteException(String message, Throwable cause) {\n        super(message, cause);\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-commons/src/main/java/com/github/viclovsky/swagger/coverage/model/SwaggerCoverage2ModelJackson.java",
    "content": "package com.github.viclovsky.swagger.coverage.model;\n\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.dataformat.yaml.YAMLFactory;\n\nimport static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL;\nimport static com.fasterxml.jackson.databind.MapperFeature.USE_WRAPPER_NAME_AS_PROPERTY_NAME;\n\n@SuppressWarnings(\"PMD.ClassNamingConventions\")\npublic final class SwaggerCoverage2ModelJackson {\n\n    private SwaggerCoverage2ModelJackson() {\n        throw new IllegalStateException(\"Do not instance SwaggerCoverage2ModelJackson\");\n    }\n\n    public static ObjectMapper createJsonMapper() {\n        return new ObjectMapper()\n                .configure(USE_WRAPPER_NAME_AS_PROPERTY_NAME, true)\n                .setSerializationInclusion(NON_NULL);\n    }\n\n    public static ObjectMapper createYamlMapper() {\n        return new ObjectMapper(new YAMLFactory())\n                .configure(USE_WRAPPER_NAME_AS_PROPERTY_NAME, true)\n                .setSerializationInclusion(NON_NULL);\n    }\n\n}"
  },
  {
    "path": "swagger-coverage-commons/src/main/java/com/github/viclovsky/swagger/coverage/utils/FreemarkerUtils.java",
    "content": "package com.github.viclovsky.swagger.coverage.utils;\n\nimport freemarker.cache.FileTemplateLoader;\nimport freemarker.template.Configuration;\nimport freemarker.template.Template;\nimport freemarker.template.TemplateException;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.io.*;\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.Properties;\n\nimport static java.nio.charset.StandardCharsets.UTF_8;\n\n/**\n * @author eroshenkoam (Artem Eroshenko).\n */\npublic final class FreemarkerUtils {\n\n    private static final Logger log = LoggerFactory.getLogger(FreemarkerUtils.class);\n\n    private final static String TEMPLATES = \"templates\";\n\n    private FreemarkerUtils() {\n    }\n\n    public static String processTemplate(final String path, final Object object) {\n        return processTemplate(path,\"en\", \"0.###\", object);\n    }\n\n    private static String proccessTemplate(Configuration configuration, String locale, String templateName,\n                                           final Object object) {\n        Map<String, String> messages = readMessages(locale);\n\n        try {\n            final Map<String, Object> data = new HashMap<>();\n            data.put(\"data\", object);\n            data.put(\"messages\", messages);\n\n            final Writer writer = new StringWriter();\n            final Template template = configuration.getTemplate(templateName);\n            template.process(data, writer);\n            return writer.toString();\n        } catch (IOException | TemplateException e) {\n            throw new RuntimeException(e);\n        }\n    }\n\n    public static String processTemplate(final String path, String locale, String numberFormat, final Object object) {\n        final Configuration configuration = new Configuration(Configuration.VERSION_2_3_28);\n\n        configuration.setClassForTemplateLoading(FreemarkerUtils.class, \"/\");\n        configuration.setDefaultEncoding(\"UTF-8\");\n        configuration.setNumberFormat(numberFormat);\n\n        return proccessTemplate(configuration, locale, path, object);\n    }\n\n    public static String processCustomTemplate(final String customTemplatePath, String locale, String numberFormat, Object object)\n            throws IOException {\n        File template = new File(customTemplatePath);\n        final Configuration configuration = new Configuration(Configuration.VERSION_2_3_28);\n\n        configuration.setTemplateLoader(new FileTemplateLoader(template.getParentFile()));\n        configuration.setDefaultEncoding(\"UTF-8\");\n        configuration.setNumberFormat(numberFormat);\n        return proccessTemplate(configuration, locale, template.getName(), object);\n    }\n\n    public static Map<String, String> readMessages(String localeCode){\n        Properties properties = new Properties();\n        HashMap<String, String> mymap= new HashMap<String, String>();\n\n        String resourceName = \"message.\" + localeCode; // could also be a constant\n        log.info(\"read locale from \" + resourceName);\n        ClassLoader loader = Thread.currentThread().getContextClassLoader();\n        try(InputStream resourceStream = loader.getResourceAsStream(resourceName)) {\n            InputStreamReader isr = new InputStreamReader(resourceStream, UTF_8);\n            properties.load(isr);\n        } catch (Exception e) {\n            log.error(\"can't read locale resource\" + e);\n        }\n\n        for (String key : properties.stringPropertyNames()) {\n            String value = properties.getProperty(key);\n            mymap.put(key, value);\n        }\n\n        return mymap;\n    }\n\n}\n"
  },
  {
    "path": "swagger-coverage-commons/src/main/resources/details/condition.ftl",
    "content": "<#import \"operation.ftl\" as operation />\n\n<#macro list coverage prefix>\n    <div class=\"accordion\" id=\"${prefix}-accordion\">\n        <#list coverage as key>\n            <@operation.details\n            name=key\n            operationResult=operationMap[key]\n            target=prefix + \"-\" + key?counter\n            />\n        </#list>\n    </div>\n</#macro>"
  },
  {
    "path": "swagger-coverage-commons/src/main/resources/details/operation.ftl",
    "content": "<#import \"../ui.ftl\" as ui/>\n\n<#macro list coverage prefix>\n    <div class=\"accordion\" id=\"${prefix}-accordion\">\n        <#list coverage as key, value>\n            <div class=\"card\">\n                <div class=\"card-header\">\n                    <div class=\"row\"\n                         data-toggle=\"collapse\"\n                         data-target=\"#${prefix}-${key?index}\"\n                         aria-expanded=\"true\"\n                         aria-controls=\"collapseOne\">\n                        <div class=\"col-9\">\n                            ${key}\n                        </div>\n                        <div class=\"col-3\">\n                            ${i18[\"details.operation.status\"]}: ${value.getResponses()?keys?join(\",\")}\n                        </div>\n                    </div>\n                </div>\n                <div id=\"${prefix}-${key?index}\" class=\"collapse\" aria-labelledby=\"headingOne\">\n                    <div class=\"card-body\">\n                        <div class=\"row\">\n                            <div class=\"col-12\">\n                                ${i18[\"details.operation.parameters\"]}\n                            </div>\n                        </div>\n                        <div class=\"row\">\n                            <div class=\"col-12\">\n                                <table class=\"table table-sm\">\n                                    <thead>\n                                    <tr>\n                                        <th scope=\"col\">${i18[\"details.operation.parameter.type\"]}</th>\n                                        <th scope=\"col\">${i18[\"details.operation.parameter.name\"]}</th>\n                                        <th scope=\"col\">${i18[\"details.operation.parameter.value\"]}</th>\n                                    </tr>\n                                    </thead>\n                                    <tbody>\n                                        <#if value.getParameters()??>\n                                            <#list value.getParameters() as p>\n                                                <tr>\n                                                    <td>${p.getName()}</td>\n                                                    <#if p.getExtensions()??>\n                                                        <#if p.getExtensions()[\"x-example\"]??>\n                                                            <#if p.getExtensions()[\"x-example\"]?is_boolean>\n                                                                <td>${p.getExtensions()[\"x-example\"]?c}</td>\n                                                            <#else>\n                                                                <td>${p.getExtensions()[\"x-example\"]}</td>\n                                                            </#if>\n                                                        </#if>\n                                                    <#elseif p.getExample()??>\n                                                        <#if p.getExample()?is_boolean>\n                                                            <td>${p.getExample()?c}</td>\n                                                        <#else>\n                                                            <td>${p.getExample()}</td>\n                                                        </#if>\n                                                    </#if>\n                                                </tr>\n                                            </#list>\n                                        </#if>\n                                    </tbody>\n                                </table>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </#list>\n        <#if coverage?size == 0>\n            ${i18[\"details.operation.no_data\"]}\n        </#if>\n    </div>\n</#macro>\n\n<#macro details name operationResult target>\n    <div class=\"card\">\n        <div class=\"card-header\">\n            <div class=\"row\"\n                 data-toggle=\"collapse\"\n                 data-target=\"#${target}\"\n                 aria-expanded=\"true\"\n                 aria-controls=\"collapseOne\">\n                <div class=\"col-1\">\n                        <@ui.coverageStateBadget operationResult=operationResult />\n                </div>\n                <div class=\"col-1\">\n                        <button type=\"button\" class=\"btn btn-sm\">${operationResult.operationKey.httpMethod}</button>\n                </div>\n                <div class=\"col-4\">\n                    <span>${operationResult.operationKey.path}</span>\n<#--                    <span><small>${operationResult.description}</small></span>-->\n                </div>\n                <div class=\"col-2\">\n                    ${operationResult.processCount} ${i18[\"details.operation.calls\"]}\n                </div>\n                <div class=\"col-4\">\n                    <@ui.progress\n                    full=operationResult.allConditionCount\n                    current=operationResult.coveredConditionCount\n                    postfix=i18[\"details.conditionprogress.postfix\"]\n                    />\n                </div>\n            </div>\n        </div>\n        <div id=\"${target}\" class=\"collapse\" aria-labelledby=\"headingOne\">\n            <@conditionList list=operationResult.conditions />\n        </div>\n    </div>\n</#macro>\n\n<#macro conditionList list>\n    <div class=\"card-body\">\n        <table class=\"table table-sm\">\n            <thead>\n            <tr>\n                <th scope=\"col\">${i18[\"details.conditionlist.name\"]}</th>\n                <th scope=\"col\">${i18[\"details.conditionlist.details\"]}</th>\n            </tr>\n            </thead>\n            <tbody>\n            <#list list as condition>\n                <#assign trStyle = \"table-danger\">\n\n                <#if condition.covered>\n                    <#assign trStyle = \"table-success\">\n                </#if>\n                <tr class=\"${trStyle}\">\n                    <td>\n                        <#if condition.covered>\n                            <span>\n                                <i class=\"fas fa-check\"></i>\n                            </span>\n                        <#else>\n                            <span>\n                                <i class=\"fas fa-bug\"></i>\n                            </span>\n                        </#if>\n                        &nbsp;${condition.name}\n                    </td>\n                    <td>${condition.reason}</td>\n                </tr>\n            </#list>\n            </tbody>\n        </table>\n    </div>\n</#macro>\n"
  },
  {
    "path": "swagger-coverage-commons/src/main/resources/details/tag.ftl",
    "content": "<#import \"operation.ftl\" as operation />\n<#import \"../ui.ftl\" as ui/>\n\n<#macro list tags>\n    <div class=\"accordion\" id=\"tags-accordion\">\n        <#list tags as tag, tagCoverage>\n            <div class=\"card\">\n                <div class=\"card-header\">\n                    <div class=\"row\"\n                         data-toggle=\"collapse\"\n                         data-target=\"#tag-${tag?index}\"\n                         aria-expanded=\"true\"\n                         aria-controls=\"collapseOne\">\n                        <div class=\"col-4\">\n                            <strong>${tag}<#if tagCoverage.tag.getDescription()??>: ${tagCoverage.tag.getDescription()}</#if></strong>\n                        </div>\n                        <div class=\"col-2\">\n                            ${tagCoverage.operations?size} ${i18[\"details.tag.operations\"]}\n                        </div>\n                        <div class=\"col-2\">\n                            ${tagCoverage.callCounts} ${i18[\"details.operation.calls\"]}\n                        </div>\n                        <div class=\"col-4\">\n                            <@ui.progress\n                            full=tagCoverage.conditionCounter.all\n                            current=tagCoverage.conditionCounter.covered\n                            postfix=i18[\"details.conditionprogress.postfix\"]\n                            />\n                        </div>\n                    </div>\n                </div>\n                <div id=\"tag-${tag?index}\" class=\"collapse\" aria-labelledby=\"headingOne\">\n                    <div class=\"card-body\">\n                        <@ui.coverageBadget counter=tagCoverage.coverageCounter/>\n                        <#list tagCoverage.operations as op>\n                            <@operation.details\n                            name=op\n                            operationResult=operationMap[op]\n                            target=\"tag-\" + tag + \"-\" + op?counter\n                            />\n                        </#list>\n                    </div>\n                </div>\n            </div>\n        </#list>\n    </div>\n</#macro>"
  },
  {
    "path": "swagger-coverage-commons/src/main/resources/message.en",
    "content": "menu.summary=Summary\nmenu.operations=Operations details\nmenu.tags=Tags details\nmenu.condition=Conditions details\nmenu.generation=Generation info\n\ncommon.state.full=Full\ncommon.state.partial=Partial\ncommon.state.empty=Empty\ncommon.state.no_call=No call\ncommon.state.deprecated=Deprecated\n\noperations.all=All\noperations.full=Full\noperations.partial=Partial\noperations.empty=Empty\noperations.no_call=No call\noperations.missed=Missed\noperations.deprecated=Deprecated\n\nsummary.operations=Operations coverage summary\nsummary.operations.all=All operations\nsummary.operations.no_call=Operations without calls\nsummary.operations.missed=Missed request\n\nsummary.conditions=Conditions coverage summary\nsummary.conditions.total=Total\nsummary.conditions.covered=Covered\nsummary.conditions.uncovered=Uncovered\n\nsummary.tags=Tags coverage summary\nsummary.tags.all=All tags\nsummary.tags.no_call=Tags without calls\n\nbadged.full=Full coverage\nbadged.partial=Partial coverage\nbadged.empty=Empty coverage\n\ndetails.operation.calls=calls\ndetails.operation.no_data=No data\ndetails.operation.status=Response status\ndetails.operation.parameters=Parameters\ndetails.operation.parameter.type=Type\ndetails.operation.parameter.name=Name\ndetails.operation.parameter.value=Value\ndetails.conditionlist.name=Condition name\ndetails.conditionlist.details=Details\ndetails.conditionprogress.postfix=condition covered\n\ndetails.tag.operations=operations\ndetails.condition.operation=Operation name\ndetails.condition.conditionname=Condition name\ndetails.condition.details=Details\n\ngeneration.configuration=Configuration\ngeneration.parsed_file_count=Parsed result files\ngeneration.time=Generation time\ngeneration.result_file_created_interval=Result file create interval\ngeneration.report.date=Generation report date\n\npredicate.ParameterValueConditionPredicate.name=All parameter values\npredicate.ParameterValueConditionPredicate.description=Verification that the method is called with all parameters described in the enum\npredicate.NotOnlyParameterListValueConditionPredicate.name=Values not only from the list\npredicate.NotOnlyParameterListValueConditionPredicate.description = Verify that the method was called with a value that is not described in the parameter enum\npredicate.DefaultBodyConditionPredicate.name = Request Body Availability\npredicate.DefaultBodyConditionPredicate.description = Verify that the request body was not empty\npredicate.DefaultStatusConditionPredicate.name = Response Status\npredicate.DefaultStatusConditionPredicate.description = Check that there is an answer with the http status described in responses\npredicate.DefaultParameterConditionPredicate.name = Check parameter value\npredicate.DefaultParameterConditionPredicate.description = Check that the parameter is empty or not empty\npredicate.FullStatusConditionPredicate.name = Only the described statuses\npredicate.FullStatusConditionPredicate.description = Check that no status was received that was not described\n\npredicate.DefaultPropertyConditionPredicate.name = Check property value\npredicate.DefaultPropertyConditionPredicate.description = Check that the property is empty or not empty\npredicate.PropertyValueConditionPredicate.name = All property values\npredicate.PropertyValueConditionPredicate.description = Verification that the method is called with all properties described in the enum\npredicate.PropertyValueNotOnlyConditionPredicate.name = Values not only from the list\npredicate.PropertyValueNotOnlyConditionPredicate.description = Verify that the method was called with a value that is not described in the property enum\n"
  },
  {
    "path": "swagger-coverage-commons/src/main/resources/message.ru",
    "content": "menu.summary=Сводка\nmenu.operations=Методы\nmenu.tags=Группы\nmenu.condition=Варианты\nmenu.generation=Об отчёте\n\ncommon.state.full=Полностью\ncommon.state.partial=Частично\ncommon.state.empty=Не покрыто\ncommon.state.no_call=Пропущено\ncommon.state.deprecated=Не используется\n\noperations.all=Все\noperations.full=Полностью\noperations.partial=Частично\noperations.empty=Не покрыто\noperations.no_call=Пропущено\noperations.missed=Лишние запросы\noperations.deprecated=Не используются\n\nsummary.operations=Сводка по методам\nsummary.operations.all=Всего\nsummary.operations.no_call=Пропущено\nsummary.operations.missed=Лишние запросы\n\nsummary.conditions=Сводка по вариантам\nsummary.conditions.total=Всего\nsummary.conditions.covered=Покрыто\nsummary.conditions.uncovered=Не покрыто\n\nsummary.tags=Сводка по группам\nsummary.tags.all=Всего\nsummary.tags.no_call=Пропущено\n\nbadged.full=Полностью покрыто\nbadged.partial=Частично покрыто\nbadged.empty=Не покрыто\n\ndetails.operation.calls=вызов(ов)\ndetails.operation.no_data=Нет данных\ndetails.operation.status=Статус ответа\ndetails.operation.parameters=Параметры\ndetails.operation.parameter.type=Тип\ndetails.operation.parameter.name=Название\ndetails.operation.parameter.value=Значения\ndetails.conditionlist.name=Вариант\ndetails.conditionlist.details=Подробности\ndetails.conditionprogress.postfix=вариантов покрыто\n\ndetails.tag.operations=методов\ndetails.condition.operation=Метод\ndetails.condition.conditionname=Вариант\ndetails.condition.details=Подробности\n\ngeneration.configuration=Настройки\ngeneration.parsed_file_count=Проверено файлов с результатами\ngeneration.time=Затраченое на отчёт время\ngeneration.result_file_created_interval=Файлы с результатами созданы\ngeneration.report.date=Дата генерации отчёта\n\npredicate.ParameterValueConditionPredicate.name=Все значения параметра\npredicate.ParameterValueConditionPredicate.description=Проверка, что метод вызван со всеми описанным в enum параметра\npredicate.NotOnlyParameterListValueConditionPredicate.name=Значения не только из списка\npredicate.NotOnlyParameterListValueConditionPredicate.description=Проверка, что метод вызывался со значением, которое не описано в enum параметра\npredicate.DefaultBodyConditionPredicate.name=Наличие тела запроса\npredicate.DefaultBodyConditionPredicate.description=Проверка, что тело запроса было не пустым\npredicate.DefaultStatusConditionPredicate.name=Статус ответа\npredicate.DefaultStatusConditionPredicate.description=Проверка, что есть ответ с описанным  в responses http-статусом\npredicate.DefaultParameterConditionPredicate.name=Проверка значения параметра\npredicate.DefaultParameterConditionPredicate.description=Проверка, что параметр пустой или не пустой\npredicate.FullStatusConditionPredicate.name=Только описанные статусы\npredicate.FullStatusConditionPredicate.description=Проверка, что не было получено статусов, которые не описаны\n\npredicate.DefaultPropertyConditionPredicate.name=Проверка значения проперти\npredicate.DefaultPropertyConditionPredicate.description=Проверка, что проперти пустая или не пустая\npredicate.PropertyValueConditionPredicate.name=Все значения проперти\npredicate.PropertyValueConditionPredicate.description=Проверка, что метод вызван со всеми описанным в enum проперти\npredicate.PropertyValueNotOnlyConditionPredicate.name=Значения не только из списка\npredicate.PropertyValueNotOnlyConditionPredicate.description=Проверка, что метод вызывался со значением, которое не описано в enum проперти"
  },
  {
    "path": "swagger-coverage-commons/src/main/resources/report.ftl",
    "content": "<#ftl output_format=\"HTML\">\n\n<#global i18=messages>\n<#global operationMap=data.flatOperations>\n\n<#-- @ftlvariable ftlvariable name=\"data\" type=\"com.github.viclovsky.swagger.coverage.model.SwaggerCoverageResults\" -->\n<#import \"ui.ftl\" as ui/>\n<#import \"sections/summary.ftl\" as summary />\n<#import \"sections/generation.ftl\" as generation />\n<#import \"details/operation.ftl\" as operations />\n<#import \"details/condition.ftl\" as condition />\n<#import \"details/tag.ftl\" as tag />\n\n<head>\n    <meta charset=\"utf-8\">\n    <title>Swagger Coverage</title>\n    <script src=\"https://code.jquery.com/jquery-3.4.1.slim.min.js\"\n            integrity=\"sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n\"\n            crossorigin=\"anonymous\"></script>\n    <script src=\"https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js\"\n            integrity=\"sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo\"\n            crossorigin=\"anonymous\"></script>\n    <script src=\"https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js\"\n            integrity=\"sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6\"\n            crossorigin=\"anonymous\"></script>\n    <link rel=\"stylesheet\" href=\"https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css\"\n          integrity=\"sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO\" crossorigin=\"anonymous\">\n    <script src=\"https://kit.fontawesome.com/0b83173bdb.js\" crossorigin=\"anonymous\"></script>\n    <style>\n        .title {\n            margin-top: 60px;\n        }\n\n        .progress {\n            position: relative;\n        }\n\n        .progress span {\n            position: absolute;\n            display: block;\n            width: 100%;\n            color: black;\n        }\n    </style>\n</head>\n<body>\n\n<nav class=\"navbar navbar-expand-md navbar-dark fixed-top bg-dark\">\n    <div class=\"container\">\n        <div class=\"collapse navbar-collapse\" id=\"navbarCollapse\">\n            <a class=\"navbar-brand\" href=\"#\">${data.info.getTitle()!} ${data.info.getVersion()!}</a>\n            <ul class=\"navbar-nav mr-auto\">\n                <li class=\"nav-item\">\n                    <a class=\"nav-link\" href=\"#summary-section\">${i18[\"menu.summary\"]}</a>\n                </li>\n                <li class=\"nav-item\">\n                    <a class=\"nav-link\" href=\"#details-section\">${i18[\"menu.operations\"]}</a>\n                </li>\n                <li class=\"nav-item\">\n                    <a class=\"nav-link\" href=\"#tag-section\">${i18[\"menu.tags\"]}</a>\n                </li>\n                <li class=\"nav-item\">\n                    <a class=\"nav-link\" href=\"#condition-section\">${i18[\"menu.condition\"]}</a>\n                </li>\n                <li class=\"nav-item\">\n                    <a class=\"nav-link\" href=\"#system-section\">${i18[\"menu.generation\"]}</a>\n                </li>\n            </ul>\n        </div>\n    </div>\n</nav>\n\n<main role=\"main\" class=\"container\">\n    <div class=\"container\">\n        <section id=\"summary-section\">\n            <div class=\"row\">\n                <div class=\"col-12\">\n                    <h2 class=\"title\" id=\"summary\">${i18[\"menu.summary\"]}</h2>\n                </div>\n            </div>\n            <@summary.operations operationCoveredMap=data.coverageOperationMap />\n            <@summary.calls data=data />\n            <@summary.tags tagsDetail=data.tagCoverageMap tagCounter=data.tagCounter />\n            <@summary.conditions counter=data.conditionCounter />\n        </section>\n\n        <section id=\"details-section\">\n            <div class=\"row\">\n                <div class=\"col-12\">\n                    <h2 class=\"title\" id=\"details\">${i18[\"menu.operations\"]}</h2>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-12\">\n                    <ul class=\"nav nav-pills nav-fill\" id=\"detail-tabs\" role=\"tablist\">\n                        <li class=\"nav-item\">\n                            <a class=\"nav-link active\" id=\"condition-tab\" data-toggle=\"tab\" href=\"#condition\" role=\"tab\"\n                               aria-controls=\"condition\" aria-selected=\"true\">\n                                ${i18[\"operations.all\"]}: ${data.operations?size}\n                            </a>\n                        </li>\n                        <li class=\"nav-item\">\n                            <a class=\"nav-link\" id=\"full-tab\" data-toggle=\"tab\" href=\"#full\" role=\"tab\"\n                               aria-controls=\"full\" aria-selected=\"true\">\n                                ${i18[\"operations.full\"]}: ${data.coverageOperationMap.full?size}\n                            </a>\n                        </li>\n                        <li class=\"nav-item\">\n                            <a class=\"nav-link\" id=\"party-tab\" data-toggle=\"tab\" href=\"#party\" role=\"tab\"\n                               aria-controls=\"party\" aria-selected=\"true\">\n                                ${i18[\"operations.partial\"]}: ${data.coverageOperationMap.party?size}\n                            </a>\n                        </li>\n                        <li class=\"nav-item\">\n                            <a class=\"nav-link\" id=\"empty-tab\" data-toggle=\"tab\" href=\"#empty\" role=\"tab\"\n                               aria-controls=\"empty\" aria-selected=\"true\">\n                                ${i18[\"operations.empty\"]}: ${data.coverageOperationMap.empty?size}\n                            </a>\n                        </li>\n                        <li class=\"nav-item\">\n                            <a class=\"nav-link\" id=\"zero-tab\" data-toggle=\"tab\" href=\"#zero\" role=\"tab\"\n                               aria-controls=\"zero\" aria-selected=\"true\">\n                                ${i18[\"operations.no_call\"]}: ${data.zeroCall?size}\n                            </a>\n                        </li>\n                        <li class=\"nav-item\">\n                            <a class=\"nav-link\" id=\"missed-tab\" data-toggle=\"tab\" href=\"#missed\" role=\"tab\"\n                               aria-controls=\"missed\" aria-selected=\"false\">\n                                ${i18[\"operations.missed\"]}: ${data.missed?size}\n                            </a>\n                        </li>\n                        <li class=\"nav-item\">\n                            <a class=\"nav-link\" id=\"deprecated-tab\" data-toggle=\"tab\" href=\"#deprecated\" role=\"tab\"\n                               aria-controls=\"deprecated\" aria-selected=\"false\">\n                                ${i18[\"operations.deprecated\"]}: ${data.deprecated?size}\n                            </a>\n                        </li>\n                    </ul>\n                </div>\n            </div>\n            <br/>\n            <div class=\"row\">\n                <div class=\"col-12\">\n                    <div class=\"tab-content\" id=\"details-content\">\n                        <div class=\"tab-pane fade show active\" id=\"condition\" role=\"tabpanel\" aria-labelledby=\"condition-tab\">\n                            <@condition.list\n                                coverage=data.coverageOperationMap.full + data.coverageOperationMap.party + data.coverageOperationMap.empty\n                                prefix=\"condition\"/>\n                        </div>\n                        <div class=\"tab-pane fade\" id=\"full\" role=\"tabpanel\" aria-labelledby=\"full-tab\">\n                            <@condition.list coverage=data.coverageOperationMap.full prefix=\"full\"/>\n                        </div>\n                        <div class=\"tab-pane fade\" id=\"party\" role=\"tabpanel\" aria-labelledby=\"party-tab\">\n                            <@condition.list coverage=data.coverageOperationMap.party prefix=\"party\"/>\n                        </div>\n                        <div class=\"tab-pane fade\" id=\"empty\" role=\"tabpanel\" aria-labelledby=\"empty-tab\">\n                            <@condition.list coverage=data.coverageOperationMap.empty prefix=\"empty\"/>\n                        </div>\n                        <div class=\"tab-pane fade\" id=\"zero\" role=\"tabpanel\" aria-labelledby=\"zero-tab\">\n                            <@condition.list coverage=data.zeroCall prefix=\"zero\"/>\n                        </div>\n                        <div class=\"tab-pane fade\" id=\"missed\" role=\"tabpanel\" aria-labelledby=\"missed-tab\">\n                            <@operations.list coverage=data.missed prefix=\"missed\"/>\n                        </div>\n                        <div class=\"tab-pane fade\" id=\"deprecated\" role=\"tabpanel\" aria-labelledby=\"deprecated-tab\">\n                            <@operations.list coverage=data.deprecated prefix=\"deprecated\"/>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </section>\n\n        <section id=\"tag-section\">\n            <div class=\"row\">\n                <div class=\"col-12\">\n                    <h2 class=\"title\" id=\"tags\">${i18[\"menu.tags\"]}</h2>\n                </div>\n            </div>\n            <@tag.list tags=data.tagCoverageMap/>\n        </section>\n\n        <section id=\"condition-section\">\n            <div class=\"row\">\n                <div class=\"col-12\">\n                    <h2 class=\"title\" id=\"conditions\">${i18[\"menu.condition\"]}</h2>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"accordion col-12\" id=\"conditions-by-type-accordion\">\n                    <#list data.conditionStatisticsMap as key, value>\n                        <div class=\"card\">\n                            <div class=\"card-header\">\n                                <div class=\"row\"\n                                     data-toggle=\"collapse\"\n                                     data-target=\"#conditions-by-type-${key?index}\"\n                                     aria-expanded=\"true\"\n                                     aria-controls=\"collapseOne\">\n                                    <div class=\"col-8\">\n                                        <#assign nameKey = \"predicate.${key}.name\">\n                                        <#assign descriptionKey = \"predicate.${key}.description\">\n                                        <p><strong>${i18[nameKey]!nameKey}</strong></p>\n                                        <small>${i18[descriptionKey]!descriptionKey}</small>\n                                    </div>\n                                    <div class=\"col-4\">\n                                        <@ui.progress\n                                            full=value.allCount\n                                            current=value.coveredCount\n                                            postfix=i18[\"details.conditionprogress.postfix\"]\n                                        />\n                                    </div>\n                                </div>\n                            </div>\n                            <div id=\"conditions-by-type-${key?index}\" class=\"collapse\" aria-labelledby=\"headingOne\">\n                                <div class=\"card-body\">\n                                    <div class=\"row\">\n                                        <div class=\"col-12\">\n                                            <ul class=\"nav nav-pills nav-fill\" id=\"condition-tabs-${key?index}\" role=\"tablist\">\n                                                <li class=\"nav-item\">\n                                                    <a class=\"nav-link active\" id=\"tab-condition-covered-${key?index}\" data-toggle=\"tab\" href=\"#condition-covered-${key?index}\" role=\"tab\"\n                                                       aria-controls=\"condition-covered-${key?index}\" aria-selected=\"true\">\n                                                        ${i18[\"summary.conditions.covered\"]}: ${value.coveredOperation?size}\n                                                    </a>\n                                                </li>\n                                                <li class=\"nav-item\">\n                                                    <a class=\"nav-link\" id=\"tab-condition-uncovered-${key?index}\" data-toggle=\"tab\" href=\"#condition-uncovered-${key?index}\" role=\"tab\"\n                                                       aria-controls=\"condition-uncovered-${key?index}\" aria-selected=\"true\">\n                                                        ${i18[\"summary.conditions.uncovered\"]}: ${value.uncoveredOperation?size}\n                                                    </a>\n                                                </li>\n                                            </ul>\n                                        </div>\n                                    </div>\n                                    <br>\n                                    <div class=\"row\">\n                                        <div class=\"col-12\">\n                                            <div class=\"tab-content\" id=\"details-content-${key?index}\">\n                                                <div class=\"tab-pane fade show active\" id=\"condition-covered-${key?index}\" role=\"tabpanel\" aria-labelledby=\"tab-condition-covered-${key?index}\">\n                                                    <table class=\"table table-sm\">\n                                                        <thead>\n                                                        <tr>\n                                                            <th scope=\"col\">${i18[\"details.condition.operation\"]}</th>\n                                                            <th scope=\"col\">${i18[\"details.condition.conditionname\"]}e</th>\n                                                            <th scope=\"col\">${i18[\"details.condition.details\"]}</th>\n                                                        </tr>\n                                                        </thead>\n                                                        <tbody>\n                                                        <#list value.coveredOperation as conditionItem>\n                                                            <tr class=\"table-success\">\n                                                                <td>\n                                                                    <span>\n                                                                        <i class=\"fas fa-check\"></i>\n                                                                    </span>\n                                                                    &nbsp;${conditionItem.operation}\n                                                                </td>\n                                                                <td>${conditionItem.condition.name}</td>\n                                                                <td>${conditionItem.condition.reason?no_esc}</td>\n                                                            </tr>\n                                                        </#list>\n                                                        </tbody>\n                                                    </table>\n                                                </div>\n                                                <div class=\"tab-pane fade\" id=\"condition-uncovered-${key?index}\" role=\"tabpanel\" aria-labelledby=\"tab-condition-uncovered-${key?index}\">\n                                                    <table class=\"table table-sm\">\n                                                        <thead>\n                                                        <tr>\n                                                            <th scope=\"col\">${i18[\"details.condition.operation\"]}</th>\n                                                            <th scope=\"col\">${i18[\"details.condition.conditionname\"]}e</th>\n                                                            <th scope=\"col\">${i18[\"details.condition.details\"]}</th>\n                                                        </tr>\n                                                        </thead>\n                                                        <tbody>\n                                                        <#list value.uncoveredOperation as conditionItem>\n                                                            <tr class=\"table-danger\">\n                                                                <td>\n                                                                    <span>\n                                                                        <i class=\"fas fa-bug\"></i>\n                                                                    </span>\n                                                                    &nbsp;${conditionItem.operation}\n                                                                </td>\n                                                                <td>${conditionItem.condition.name}</td>\n                                                                <td>${conditionItem.condition.reason?no_esc}</td>\n                                                            </tr>\n                                                        </#list>\n                                                        </tbody>\n                                                    </table>\n                                                </div>\n                                            </div>\n                                        </div>\n                                    </div>\n                                </div>\n                            </div>\n                        </div>\n                    </#list>\n                </div>\n            </div>\n        </section>\n\n        <section id=\"system-section\">\n            <div class=\"row\">\n                <div class=\"col-12\">\n                    <h2 class=\"title\" id=\"system\">${i18[\"menu.generation\"]}</h2>\n                </div>\n            </div>\n            <@generation.data statistic=data.generationStatistics/>\n            <div class=\"row\">\n                <div class=\"col-12\">\n                    <h4>${i18[\"generation.configuration\"]}</h4>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-12\">\n                    <div class=\"col-sm\">\n                        <div class=\"alert alert-secondary\" role=\"alert\">\n                            <pre>${data.prettyConfiguration} </pre>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </section>\n\n        <footer class=\"page-footer font-small mdb-color lighten-3 pt-4\">\n            <div class=\"footer-copyright text-center py-3\"></div>\n        </footer>\n\n    </div>\n</main>\n\n</body>\n"
  },
  {
    "path": "swagger-coverage-commons/src/main/resources/sections/generation.ftl",
    "content": "<#macro data statistic>\n    <div class=\"row\">\n        <div class=\"col-sm\">\n            <div class=\"col-12\">\n                ${i18[\"generation.parsed_file_count\"]}: ${statistic.resultFileCount}<br>\n                ${i18[\"generation.time\"]}: ${statistic.generationTime} ms<br>\n                ${i18[\"generation.result_file_created_interval\"]}: ${statistic.fileResultDateInterval}<br>\n                ${i18[\"generation.report.date\"]}: ${statistic.generateDate}<br>\n            </div>\n        </div>\n    </div>\n</#macro>"
  },
  {
    "path": "swagger-coverage-commons/src/main/resources/sections/summary.ftl",
    "content": "<#import \"../ui.ftl\" as ui/>\n\n<#macro operations operationCoveredMap>\n    <div class=\"row\">\n        <div class=\"col-12\">\n            <h4>${i18[\"summary.operations\"]}</h4>\n        </div>\n    </div>\n    <@ui.coverageBadget counter=operationCoveredMap.counter/>\n</#macro>\n\n<#macro calls data>\n    <div class=\"row\">\n        <div class=\"col-sm\">\n            <div class=\"alert alert-primary\" role=\"alert\">\n                ${i18[\"summary.operations.all\"]}: ${data.operations?size}\n            </div>\n        </div>\n        <div class=\"col-sm\">\n            <div class=\"alert alert-secondary\" role=\"alert\">\n                ${i18[\"summary.operations.no_call\"]}: ${data.zeroCall?size}\n            </div>\n        </div>\n        <div class=\"col-sm\">\n            <div class=\"alert alert-secondary\" role=\"alert\">\n                ${i18[\"summary.operations.missed\"]}: ${data.missed?size}\n            </div>\n        </div>\n    </div>\n</#macro>\n\n<#macro conditions counter>\n    <div class=\"row\">\n        <div class=\"col-12\">\n            <h4>${i18[\"summary.conditions\"]}</h4>\n        </div>\n    </div>\n    <div class=\"row\">\n        <div class=\"col-sm\">\n            <div class=\"alert alert-primary\" role=\"alert\">\n                <div class=\"row\">\n                    <div class=\"col-12\">\n                        <strong>${i18[\"summary.conditions.total\"]}: ${counter.all}</strong>\n                    </div>\n                </div>\n            </div>\n        </div>\n        <div class=\"col-sm\">\n            <div class=\"alert alert-success\" role=\"alert\">\n                <div class=\"row\">\n                    <div class=\"col-12\">\n                        <#if counter.all gt 0>\n                        <strong>${i18[\"summary.conditions.covered\"]}: ${counter.covered * 100 / counter.all}% (${counter.covered}/${counter.all})</strong>\n                        <#else>\n                        <strong>${i18[\"summary.conditions.covered\"]}: 0% (0)</strong>\n                        </#if>\n                    </div>\n                </div>\n            </div>\n        </div>\n        <div class=\"col-sm\">\n            <div class=\"alert alert-danger\" role=\"alert\">\n                <div class=\"row\">\n                    <div class=\"col-12\">\n                        <#if counter.all gt 0>\n                        <strong>${i18[\"summary.conditions.uncovered\"]}:  ${(counter.all-counter.covered) * 100 / counter.all}% (${counter.all-counter.covered}/${counter.all})</strong>\n                        <#else>\n                        <strong>${i18[\"summary.conditions.uncovered\"]}:  0% (0)</strong>\n                        </#if>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n    <div class=\"row\">\n        <div class=\"col-12\">\n            <#if counter.all gt 0 >\n                <@ui.progressbar current = counter.covered full = counter.all height=50/>\n            </#if>\n        </div>\n    </div>\n</#macro>\n\n<#macro tags tagsDetail tagCounter>\n    <div class=\"row\">\n        <div class=\"col-12\">\n            <h4>${i18[\"summary.tags\"]}</h4>\n        </div>\n    </div>\n    <@ui.coverageBadget counter=tagCounter/>\n    <div class=\"row\">\n        <div class=\"col-sm\">\n            <div class=\"alert alert-primary\" role=\"alert\">\n                ${i18[\"summary.tags.all\"]}: ${tagCounter.all}\n            </div>\n        </div>\n        <div class=\"col-sm\">\n            <div class=\"alert alert-secondary\" role=\"alert\">\n                ${i18[\"summary.tags.no_call\"]}: ${tagsDetail?values?filter(x -> x.callCounts = 0)?size}\n            </div>\n        </div>\n        <div class=\"col-sm\"></div>\n    </div>\n</#macro>\n"
  },
  {
    "path": "swagger-coverage-commons/src/main/resources/ui.ftl",
    "content": "<#macro progressbar current full height=16>\n    <#if full gt 0 >\n        <#assign percentValue = 100*current/(full)>\n        <#assign bgStyle = \"bg-danger\">\n\n        <#if percentValue gt 33>\n            <#assign bgStyle = \"bg-warning\">\n        </#if>\n\n        <#if percentValue gt 66>\n            <#assign bgStyle = \"bg-success\">\n        </#if>\n\n        <div class=\"progress\" style=\"height: ${height}px;\">\n            <div\n                    class=\"progress-bar ${bgStyle}\" role=\"progressbar\"\n                    style=\"width: ${percentValue?c}%\"\n                    aria-valuenow=\"${current}\"\n                    aria-valuemin=\"0\"\n                    aria-valuemax=\"${full}\">\n            </div>\n\n        </div>\n    </#if>\n</#macro>\n\n<#macro progress current full postfix>\n    <div class=\"row\">\n        <div class=\"col-12\">\n            <#if full gt 0 >\n                ${current}/${full}\n                (${100*(current/full)}%)\n            <#else>\n                --\n            </#if>\n            ${postfix}\n        </div>\n    </div>\n    <div class=\"row\">\n        <div class=\"col-12\">\n            <#if full gt 0 >\n                <@progressbar current = current full = full />\n            </#if>\n        </div>\n    </div>\n</#macro>\n\n<#macro coverageBadget counter>\n    <#if counter.all gt 0>\n        <#assign fullValue = counter.full * 100 / counter.all>\n        <#assign partlyValue = counter.party * 100 / counter.all>\n        <#assign emptyValue = counter.empty * 100 / counter.all>\n        <div class=\"card\" style=\"margin-bottom: 16px;\">\n            <div class=\"card-body\">\n                <div class=\"row\">\n                    <div class=\"col-sm\">\n                        <div class=\"alert alert-success\" role=\"alert\">\n                            ${i18[\"badged.full\"]}: ${counter.full * 100 / counter.all}%\n                        </div>\n                    </div>\n                    <div class=\"col-sm\">\n                        <div class=\"alert alert-warning\" role=\"alert\">\n                            ${i18[\"badged.partial\"]}: ${counter.party * 100 / counter.all}%\n                        </div>\n                    </div>\n                    <div class=\"col-sm\">\n                        <div class=\"alert alert-danger\" role=\"alert\">\n                            ${i18[\"badged.empty\"]}: ${counter.empty * 100 / counter.all}%\n                        </div>\n                    </div>\n                </div>\n                <div class=\"row\">\n                    <div class=\"col-12\">\n                        <div class=\"progress\" style=\"height: 16px;\">\n                            <div\n                                    class=\"progress-bar bg-success\" role=\"progressbar\"\n                                    style=\"width: ${fullValue?c}%\"\n                                    aria-valuenow=\"${counter.full}\"\n                                    aria-valuemin=\"0\"\n                                    aria-valuemax=\"${counter.all}\">\n                            </div>\n                            <div\n                                    class=\"progress-bar bg-warning\" role=\"progressbar\"\n                                    style=\"width: ${partlyValue?c}%\"\n                                    aria-valuenow=\"${counter.party}\"\n                                    aria-valuemin=\"0\"\n                                    aria-valuemax=\"${counter.all}\">\n                            </div>\n                            <div\n                                    class=\"progress-bar bg-danger\" role=\"progressbar\"\n                                    style=\"width: ${emptyValue?c}%\"\n                                    aria-valuenow=\"${counter.empty}\"\n                                    aria-valuemin=\"0\"\n                                    aria-valuemax=\"${counter.all}\">\n                            </div>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </#if>\n</#macro>\n\n<#macro coverageStateBadget operationResult>\n    <#if operationResult.processCount == 0>\n        <span class=\"badge badge-dark\">${i18[\"common.state.no_call\"]}</span>\n    <#else>\n        <#switch operationResult.state>\n            <#case \"FULL\">\n                <span class=\"badge badge-success\">${i18[\"common.state.full\"]}</span>\n                <#break>\n            <#case \"PARTY\">\n                <span class=\"badge badge-warning\">${i18[\"common.state.partial\"]}</span>\n                <#break>\n            <#case \"EMPTY\">\n                <span class=\"badge badge-danger\">${i18[\"common.state.empty\"]}</span>\n                <#break>\n            <#default>\n        </#switch>\n    </#if>\n</#macro>\n\n<#macro success text>\n    <svg class=\"bi bi-check-circle text-success\" width=\"20px\"\n         height=\"20px\"\n         viewBox=\"0 0 20 20\" fill=\"currentColor\"\n         xmlns=\"http://www.w3.org/2000/svg\">\n        <path fill-rule=\"evenodd\"\n              d=\"M17.354 4.646a.5.5 0 010 .708l-7 7a.5.5 0 01-.708 0l-3-3a.5.5 0 11.708-.708L10 11.293l6.646-6.647a.5.5 0 01.708 0z\"\n              clip-rule=\"evenodd\"></path>\n        <path fill-rule=\"evenodd\"\n              d=\"M10 4.5a5.5 5.5 0 105.5 5.5.5.5 0 011 0 6.5 6.5 0 11-3.25-5.63.5.5 0 11-.5.865A5.472 5.472 0 0010 4.5z\"\n              clip-rule=\"evenodd\"></path>\n    </svg>\n    ${text}\n</#macro>\n<#macro danger text>\n    <svg class=\"bi bi-alert-circle text-danger\" width=\"20px\"\n         height=\"20px\"\n         viewBox=\"0 0 20 20\" fill=\"currentColor\"\n         xmlns=\"http://www.w3.org/2000/svg\">\n        <path fill-rule=\"evenodd\"\n              d=\"M10 17a7 7 0 100-14 7 7 0 000 14zm0 1a8 8 0 100-16 8 8 0 000 16z\"\n              clip-rule=\"evenodd\"></path>\n        <path d=\"M9.002 13a1 1 0 112 0 1 1 0 01-2 0zM9.1 6.995a.905.905 0 111.8 0l-.35 3.507a.553.553 0 01-1.1 0L9.1 6.995z\"></path>\n    </svg>\n    ${text}\n</#macro>\n<#macro question text>\n    <svg class=\"bi bi-question alert-light\" width=\"20px\"\n         height=\"20px\"\n         viewBox=\"0 0 20 20\" fill=\"currentColor\"\n         xmlns=\"http://www.w3.org/2000/svg\">\n        <path fill-rule=\"evenodd\"\n              d=\"M10 17a7 7 0 100-14 7 7 0 000 14zm8-7a8 8 0 11-16 0 8 8 0 0116 0z\"\n              clip-rule=\"evenodd\"></path>\n        <path d=\"M7.25 8.033h1.32c0-.781.458-1.384 1.36-1.384.685 0 1.313.343 1.313 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.007.463h1.307v-.355c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.326 0-2.786.647-2.754 2.533zm1.562 5.516c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z\"></path>\n    </svg>\n    ${text}\n</#macro>\n"
  },
  {
    "path": "swagger-coverage-karate/README.md",
    "content": "# swagger-coverage for Karate\nThis module provides an integration of swagger-coverage for the [Karate Framework](https://github.com/karatelabs/karate). With the help of a single test runner, the coverage report can thus be generated automatically after the API tests.\n\n## How it Works\nSwagger-coverage for Karate uses the [server-side features](https://github.com/karatelabs/karate/tree/master/karate-netty#karate-netty) of the Karate framework to implement a proxy server which intercepts the HTTP calls, extracts the necessary information, and then redirects the call to the original destination. For this, a local mock server is started on a free port before running the tests to host the proxy. The port number is chosen at runtime and can be accessed by calling `karate.properties['proxy.port']`.\n\nThis approach has the advantage that the tests do not have to be changed and swagger-coverage can also be integrated into existing Karate projects with minimal effort. In addition, multiple Test Runners can be used in parallel. Since you usually don't want to create a report every time you run the tests (e.g. during active test implementation), you can decide individually when to use the Coverage Test Runner.\n\n## Setup and How to Use\nThe Swagger Coverage Runner requires at least [Java](https://www.oracle.com/java/technologies/downloads/) 8 and the use of either JUnit 4 or JUnit 5.  \n\nThe `swagger-coverage-karate` artifact also includes the `swagger-coverage-commons` and the `swagger-coverage-commandline` modules.\nTo add the dependency to your project when using Maven, add the following to your pom.xml:\n```xml\n<dependency>\n    <groupId>com.github.viclovsky</groupId>\n    <artifactId>swagger-coverage-karate</artifactId>\n    <version>${latest-swagger-coverage-version}</version>\n</dependency>\n```\n\nIf you use Gradle instead, add this to your build.gradle file:\n\n```gradle\ntestImplementation \"com.github.viclovsky:swagger-coverage-karate:${latest-swagger-coverage-version}\"\n```\n\n\n### <a name=\"coverageDir\"></a> Coverage Directory and Naming Conventions\nThe easiest way to provide the Test Runner with all the necessary information is to have a folder in the project where the required files are located. If these are named correctly, as in the following, it is only necessary to specify the path to this directory.\n\n> The files can also be specifically set in the [options](#options). If not, the coverage directory is always checked for the files seen below.\n\n```\napi-test-coverage (can be any path and name)\n    |\n    +-- swagger-coverage-config.json\n    +-- swagger-specification.json/yaml\n```\n\nIf specified, the directory will function as the working directory for the swagger-coverage tool. Therefore, not only the `swagger-coverage-output` folder is then created in there, where the generated swagger models of the HTTP calls are stored, but also the final HTML coverage report.  \nIf not specified, the needed file paths must specifically be provided in the arguments of the Test Runner and everything else will be generated within the current working directory (the root of the project, most of the time).\n\n### <a name=\"runner\"></a> The SwaggerCoverageRunner\nThe `SwaggerCoverageRunner` extends the [Karate Runner](https://github.com/karatelabs/karate#junit-4-parallel-execution) class. Therefore, all options which are available there, can also be used with the coverage runner. This enables an easy migration, since it is only neccesary to add the additional builder methods to provide the runner with the needed information for creating the coverage report.\n\nFor example:\n```java\nimport java.net.URI;\nimport com.github.viclovsky.swagger.coverage.karate.SwaggerCoverageRunner;\nimport com.intuit.karate.Results;\nimport org.junit.jupiter.api.Test;\n\npublic class CoverageReportRunner {\n\n    @Test\n    void testAll(){\n        Results results = SwaggerCoverageRunner.path(\"classpath:some/path\")\n                .coverageDir(\"api-test-coverage\")\n                .swaggerSpec(URI.create(\"https://petstore3.swagger.io/api/v3/openapi.json\"))\n                .oas3()\n                .outputJunitXml(true)\n                .karateEnv(\"dev\")\n                .parallel(1);\n    }\n}\n```\n\n#### <a name=\"options\"></a> Available Options\n| Option | Description  |\n|--------|--------------|\n| `.coverageDir(String)` | set the working directory for the swagger-coverage tool. See [Coverage Directory](#coverageDir). |\n| `.swaggerSpec(URI)` | specifically set the path to the Swagger/OpenAPI specification. Can also be a URL to a remote spec, useful for when swagger is hosted on the test environment.|\n| `.swaggerCoverageConfig(String)` | specifically set the path to the [Config File](https://github.com/viclovsky/swagger-coverage#configuration-options). |\n| `.swagger()`  |  use this when the specification uses the [Swagger/OpenAPI 2.0](https://swagger.io/specification/v2/) format. |\n| `.oas3()` | use this when the specification uses the [OpenAPI 3.0](https://swagger.io/specification/) format.  |\n| `.backupCoverageOutput(boolean)`  | backup the `swagger-coverage-output` folder, if one exists from a previous run. Default is set to `false`. |\n\n### Swagger Coverage Options\nThere are a few options you may want to decide on more flexible instead of setting them once at the start of the tests. For that reason, the `scOptions` object is provided and can be used anywhere in the Karate-context. It holds the following functionalities:\n\n#### `scOptions.setDestUrl(arg)`\nThis tells the proxy server where to send the HTTP calls to. Most of the time, it is sufficient to set this once in the `karate-config.js`. But if needed, it can be changed before every single call.\n\n> Note that if your destination URL uses HTTPS, take a look at [The Problem with HTTPS and the Workaround](#https).\n\n#### `scOptions.setPathPattern(arg)`\nOne of the conditions in the coverage report checks, whether a specified param was set in the test. In order for this to happen, the parameter name must be included in the swagger representation of the HTTP call. But unlike query parameters, for example, path parameters in Karate are not specified by their name but only by their value. That's why on the server side you can only get to this parameter name in a certain way. For this the path pattern in the style of `/some/path/{paramName}` is needed. To correctly use the aforementioned condition, this option can be used to specify the needed path pattern.\n\nFor example:\n\n```gherkin\nFeature: using the 'setPathPattern' option\n\nBackground:\n    * url \"http://petstore3.swagger.io\"\n    * eval scOptions.setDestUrl(\"https://petstore3.swagger.io\")\n\nScenario:\n    * eval scOptions.setPathPattern(\"/api/v3/pet/{petId}\")\n    Given path \"api\", \"v3\", \"pet\", 2\n    When method GET\n    Then status 200\n```\n\n#### `scOptions.ignoreNextCall()`\nSometimes you don't want a call to be included in the coverage report, for example when reusing feature files to create entities etc. This options tells the proxy server to simply send the call to the destination URL without extracting any information and thus ignoring it for the coverage report.\n\n## <a name=\"https\"></a> The Problem with HTTPS and the Workaround\nAs of now, the karate proxy server does not support HTTPS calls, as it is unable to unpack them (more information can be found in this [thread](https://github.com/karatelabs/karate/issues/640)). Therefore, the requests must be send as HTTP calls when using the [SwaggerCoverageRunner](#runner), and then the proxy can send them to the HTTPS destination. The following example shows, how a dynamic setup can be achieved in the `karate-config.json`:\n\n```javaScript\nfunction fn(){\n    var env = karate.env;\n    karate.log('karate.env system property was:', env);\n    if (!env){\n        env = 'dev';\n    }\n    \n    var uri = \"://petstore3.swagger.io\";\n    var protocol = \"https\";\n\n    // always set the destination url to use https\n    scOptions.setDestUrl(protocol + uri);\n\n    // if the port is set, that means the proxy server is used. Then use the http protocol.\n    if (karate.properties['proxy.port']){\n        protocol = \"http\";\n    }\n\n    var baseUrl = protocol + uri;\n\n    return {\n        baseUrl : baseUrl\n    }\n}\n```"
  },
  {
    "path": "swagger-coverage-karate/build.gradle.kts",
    "content": "plugins {\n    java\n    `java-library`\n}\n\ndescription = \"Swagger Coverage Karate\"\n\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    api(project(\":swagger-coverage-commons\"))\n    api(project(\":swagger-coverage-commandline\"))\n    implementation(\"io.swagger:swagger-models\")\n    implementation(\"io.swagger.core.v3:swagger-models\")\n    implementation(\"com.intuit.karate:karate-core\")\n\n    //needed for karate runner\n    implementation(\"com.linecorp.armeria:armeria:1.14.1\")\n    implementation(\"io.netty:netty-all:4.1.74.Final\")\n    implementation(\"org.thymeleaf:thymeleaf:3.0.15.RELEASE\")\n    implementation(\"io.github.classgraph:classgraph:4.8.108\")\n    implementation(\"org.antlr:antlr4-runtime:4.9.3\")\n    implementation(\"org.apache.httpcomponents:httpclient:4.5.13\")\n\n    testImplementation(\"junit:junit\")\n    testImplementation(\"org.hamcrest:hamcrest\")\n    testImplementation(\"com.github.tomakehurst:wiremock\")\n}\n\ntasks {\n    test {\n        workingDir(buildDir)\n    }\n}"
  },
  {
    "path": "swagger-coverage-karate/src/main/java/com/github/viclovsky/swagger/coverage/karate/Request.java",
    "content": "package com.github.viclovsky.swagger.coverage.karate;\n\nimport java.util.List;\nimport java.util.Map;\n\npublic class Request {\n    private String baseUrl;\n    private String path;\n    private Map<String, List<String>> requestParams;\n    private Map<String, List<String>> headerParams;\n    private Map<String, List<Map<String, String>>> requestParts;\n    private Map<String, String> pathParams;\n    private Boolean hasBody;\n    private String method;\n    private int statusCode;\n    private Map<String, List<String>> responseHeaders;\n\n    // #region Getter/Setter\n    public String getBaseUrl() {\n        return baseUrl;\n    }\n\n    public void setBaseUrl(String uri) {\n        this.baseUrl = uri;\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 Map<String, List<String>> getRequestParams() {\n        return requestParams;\n    }\n\n    public void setRequestParams(Map<String, List<String>> requestParams) {\n        this.requestParams = requestParams;\n    }\n\n    public Map<String, List<Map<String, String>>> getRequestParts() {\n        return requestParts;\n    }\n\n    public void setRequestParts(Map<String, List<Map<String, String>>> requestParts) {\n        this.requestParts = requestParts;\n    }\n\n    public Map<String, String> getPathParams() {\n        return pathParams;\n    }\n\n    public void setPathParams(Map<String, String> pathParams) {\n        this.pathParams = pathParams;\n    }\n\n    public Map<String, List<String>> getHeaderParams() {\n        return headerParams;\n    }\n\n    public void setHeaderParams(Map<String, List<String>> headerParams) {\n        this.headerParams = headerParams;\n    }\n\n    public Map<String, List<String>> getResponseHeaders() {\n        return responseHeaders;\n    }\n\n    public void setResponseHeaders(Map<String, List<String>> responseHeaders) {\n        this.responseHeaders = responseHeaders;\n    }\n\n    public String getMethod() {\n        return method;\n    }\n\n    public void setMethod(String method) {\n        this.method = method;\n    }\n\n    public int getStatusCode() {\n        return statusCode;\n    }\n\n    public void setStatusCode(int statusCode) {\n        this.statusCode = statusCode;\n    }\n\n    public Boolean hasBody() {\n        return hasBody;\n    }\n\n    public void setHasBody(Boolean hasBody) {\n        this.hasBody = hasBody;\n    }\n    // #endregion\n}\n"
  },
  {
    "path": "swagger-coverage-karate/src/main/java/com/github/viclovsky/swagger/coverage/karate/RequestWriter.java",
    "content": "package com.github.viclovsky.swagger.coverage.karate;\n\nimport static io.swagger.models.Scheme.forValue;\n\nimport java.io.File;\nimport java.net.URI;\nimport java.util.List;\nimport java.util.Map;\n\nimport com.github.viclovsky.swagger.coverage.CoverageOutputWriter;\nimport com.github.viclovsky.swagger.coverage.FileSystemOutputWriter;\nimport com.github.viclovsky.swagger.coverage.SwaggerCoverageConstants;\n\nimport io.swagger.models.*;\nimport io.swagger.models.parameters.*;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.media.Content;\nimport io.swagger.v3.oas.models.media.MediaType;\nimport io.swagger.v3.oas.models.servers.Server;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.parameters.RequestBody;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\nimport io.swagger.v3.oas.models.responses.ApiResponses;\n\npublic class RequestWriter {\n    \n    private CoverageOutputWriter writer;\n\n    public RequestWriter(String workingDir){\n        File dir = new File(workingDir, SwaggerCoverageConstants.OUTPUT_DIRECTORY);\n        writer = new FileSystemOutputWriter(dir.toPath());\n    }\n\n    public void write(Request request, Boolean oas3){\n        if (oas3){\n            writeOAS3(request);\n        }\n        else{\n            writeSwagger(request);\n        }\n    }\n\n    public void writeSwagger(Request request) {\n        Map<String, List<String>> headerParams = request.getHeaderParams();\n        Map<String, List<String>> requestParams = request.getRequestParams();\n        Map<String, List<Map<String, String>>> requestParts = request.getRequestParts();\n        Map<String, List<String>> responseHeaders = request.getResponseHeaders();\n        Map<String, String> pathParams = request.getPathParams();\n        Operation operation = new Operation();\n\n        headerParams.forEach((n, v) -> operation.addParameter(new HeaderParameter().name(n)));\n\n        if (pathParams != null){\n            pathParams.forEach((n, v) -> operation.addParameter(new PathParameter().name(n)));\n        }\n\n        if (request.hasBody()) {\n            operation.addConsumes(getContentType(headerParams));\n            operation.addParameter(new BodyParameter().name(\"body\"));\n            requestParams.forEach((n, v) -> operation.addParameter(new FormParameter().name(n)));\n\n            if (requestParts != null) {\n                requestParts.forEach((n, v) -> operation.addParameter(new FormParameter().name(n)));\n            }\n        } else {\n            requestParams.forEach((n, v) -> operation.addParameter(new QueryParameter().name(n)));\n        }\n\n        if (responseHeaders.containsKey(\"content-type\")) {\n            operation.addProduces(getContentType(responseHeaders));\n        }\n\n        operation.addResponse(Integer.toString(request.getStatusCode()), new Response());\n\n        URI uri = URI.create(request.getBaseUrl());\n        String path = \"/\" + trimAfterChar(request.getPath(), \"?\");\n\n        Swagger swagger = new Swagger().scheme(forValue(uri.getScheme())).host(uri.getHost()).path(path,\n                new Path().set(request.getMethod().toLowerCase(), operation));\n\n        writer.write(swagger);\n    }\n\n    public void writeOAS3(Request request){\n        Map<String, List<String>> headerParams = request.getHeaderParams();\n        Map<String, List<String>> requestParams = request.getRequestParams();\n        Map<String, List<Map<String, String>>> requestParts = request.getRequestParts();\n        Map<String, List<String>> responseHeaders = request.getResponseHeaders();\n        Map<String, String> pathParams = request.getPathParams();\n        io.swagger.v3.oas.models.Operation operation = new io.swagger.v3.oas.models.Operation();\n\n        headerParams.forEach((n, v) -> operation\n                .addParametersItem(new io.swagger.v3.oas.models.parameters.HeaderParameter().name(n)));\n\n        if (pathParams != null){\n            pathParams.forEach((n, v) -> operation\n                .addParametersItem(new io.swagger.v3.oas.models.parameters.PathParameter().name(n)));  \n        }\n\n        if (request.hasBody()) {\n            MediaType mediaType = new MediaType();\n            Schema<Object> schema = new Schema<>();\n            requestParams.forEach((n, v) -> schema.addProperties(n, new Schema<>()));\n\n            if (requestParts != null) {\n                requestParts.forEach((n, v) -> schema.addProperties(n, new Schema<>()));\n            }\n\n            mediaType.setSchema(schema);\n            operation.requestBody(\n                    new RequestBody().content(new Content().addMediaType(getContentType(headerParams), mediaType)));\n        } else {\n            requestParams.forEach((n, v) -> operation\n                    .addParametersItem(new io.swagger.v3.oas.models.parameters.QueryParameter().name(n)));\n        }\n\n        operation.responses(new ApiResponses().addApiResponse(Integer.toString(request.getStatusCode()),\n                new ApiResponse()\n                        .content(new Content().addMediaType(getContentType(responseHeaders), new MediaType()))));\n\n        URI uri = URI.create(request.getBaseUrl());\n        String path = \"/\" + trimAfterChar(request.getPath(), \"?\");\n\n        PathItem pathItem = new PathItem();\n        pathItem.operation(PathItem.HttpMethod.valueOf(request.getMethod().toUpperCase()), operation);\n\n        OpenAPI openAPI = new OpenAPI().addServersItem(new Server().url(uri.getHost()))\n                .path(path, pathItem);\n\n        writer.write(openAPI);\n    }\n\n    private String getContentType(Map<String, List<String>> headerList) {\n        if (!headerList.containsKey(\"content-type\")) {\n            return \"\";\n        }\n\n        String contentType = headerList.get(\"content-type\").get(0);\n        return trimAfterChar(contentType, \";\");\n    }\n\n    private String trimAfterChar(String s, String character) {\n        return s.substring(0, s.contains(character) ? s.lastIndexOf(character) : s.length());\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-karate/src/main/java/com/github/viclovsky/swagger/coverage/karate/SwaggerCoverageOptions.java",
    "content": "package com.github.viclovsky.swagger.coverage.karate;\n\npublic class SwaggerCoverageOptions {\n    private static String destUrl;\n    private static String pathPattern = \"\";\n    private static boolean ignoreCall = false;\n\n    public static void setDestinationURL(String url){\n        destUrl = url;\n    }\n\n    public static String getDestinationURL(){\n        return destUrl;\n    }\n\n    public static void reset(){\n        pathPattern = \"\";\n        ignoreCall = false;\n    }\n\n    public static void setPathPattern(String pattern){\n        pathPattern = pattern;\n    }\n\n    public static String getPathPattern(){\n        return pathPattern;\n    }\n\n    public static void setIgnoreCall(boolean ignore){\n        ignoreCall = ignore;\n    }\n\n    public static boolean getIgnoreCall(){\n        return ignoreCall;\n    }\n}"
  },
  {
    "path": "swagger-coverage-karate/src/main/java/com/github/viclovsky/swagger/coverage/karate/SwaggerCoverageRunner.java",
    "content": "package com.github.viclovsky.swagger.coverage.karate;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.net.URI;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.nio.file.Paths;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.NoSuchElementException;\nimport java.util.Optional;\n\nimport com.github.viclovsky.swagger.coverage.SwaggerCoverageConstants;\nimport com.github.viclovsky.swagger.coverage.core.generator.Generator;\nimport com.intuit.karate.FileUtils;\nimport com.intuit.karate.Logger;\nimport com.intuit.karate.Results;\nimport com.intuit.karate.Runner;\nimport com.intuit.karate.core.MockServer;\nimport com.intuit.karate.job.JobConfig;\n\npublic class SwaggerCoverageRunner extends Runner {\n    private static final Logger logger = new Logger();\n\n    private static MockServer mockServer;\n\n    private static int startProxy(Map<String, Object> args){\n        mockServer = MockServer\n                    .feature(\"classpath:httpProxy.feature\")\n                    .args(args)\n                    .http(0).build();\n\n        return mockServer.getPort();\n    }\n\n    private static void stopProxy(){\n        if (mockServer != null){\n            mockServer.stop();\n        }\n    }\n\n    public static class SwaggerCoverageBuilder extends Builder<SwaggerCoverageBuilder> {\n        final String SPECIFICATION_NAME = \"swagger-specification\";\n        final String CONFIG_NAME = \"swagger-coverage-config.json\";\n\n        boolean oas3;\n        URI specificationPath;\n        String configPath;\n        String inputPath;\n        String coverageDir;\n        boolean backupCoverageOutput;\n\n        private void prepareTests(){\n            if(backupCoverageOutput){\n                backupCoverageOutput();\n            }\n\n            File outputDir = new File(coverageDir, SwaggerCoverageConstants.OUTPUT_DIRECTORY);\n            if (outputDir.exists()) FileUtils.deleteDirectory(outputDir);\n\n            Map<String, Object> args = new HashMap<String, Object>();\n            args.put(\"oas3\", oas3);\n            args.put(\"workingDir\", coverageDir);\n            int proxyPort = startProxy(args);\n            systemProperty(\"proxy.port\", proxyPort + \"\");\n            logger.info(\"Started proxy at port: {}\", proxyPort);\n        }\n        \n        private void backupCoverageOutput(){\n            File file = new File(coverageDir, SwaggerCoverageConstants.OUTPUT_DIRECTORY);\n            if (file.exists()) {\n                File newDir = new File(coverageDir, SwaggerCoverageConstants.OUTPUT_DIRECTORY + \"_\" + System.currentTimeMillis());\n                if (file.renameTo(newDir)){\n                    logger.info(\"backed up existing swagger-coverage-output dir to: {}\", newDir);\n                } else {\n                    logger.warn(\"failed to backup existing swagger-coverage-output dir: {}\", file);\n                }\n            }\n        }\n\n        private void generateReport() {\n            if (coverageDir == null) coverageDir = \"\";\n\n            Path inputPath = Paths.get(coverageDir, SwaggerCoverageConstants.OUTPUT_DIRECTORY);\n\n            if (!inputPath.toFile().exists()){\n                try {\n                    Files.createDirectory(inputPath);\n                } catch (IOException e) {\n                    e.printStackTrace();\n                    logger.warn(\"Failed to create empty directory for coverage input: {}. Report could not be generated.\", inputPath);\n                    return;\n                }\n            }\n\n            Generator generator = new Generator()\n                .setInputPath(inputPath);\n            \n            if (specificationPath != null) {\n                generator.setSpecPath(specificationPath);\n            }\n            else{\n                File specFile = Optional.of(Paths.get(coverageDir, SPECIFICATION_NAME + \".json\").toFile())\n                .filter((file) -> file.exists())\n                .orElseGet(()-> Paths.get(coverageDir, SPECIFICATION_NAME + \".yaml\").toFile());\n                \n                if (!specFile.exists()){\n                    throw new NoSuchElementException();\n                }\n\n                generator.setSpecPath(specFile.toURI()); \n            }\n\n            if (configPath != null){\n                generator.setConfigurationPath(Paths.get(configPath));\n            }\n            else{\n                File configFile = Paths.get(coverageDir, CONFIG_NAME).toFile();\n                if (configFile.exists()){\n                    generator.setConfigurationPath(configFile.toPath());\n                }\n            }\n\n            generator.run();\n        }\n\n        public SwaggerCoverageBuilder swagger(){\n            oas3 = false;\n            return this;\n        }\n\n        public SwaggerCoverageBuilder oas3(){\n            oas3 = true;\n            return this;\n        }\n\n        public SwaggerCoverageBuilder swaggerSpec(URI path){\n            specificationPath = path;\n            return this;\n        }\n        \n        public SwaggerCoverageBuilder swaggerCoverageConfig(String configPath){\n            this.configPath = configPath;\n            return this; \n        }\n\n        public SwaggerCoverageBuilder coverageDir(String coverageDir){\n            this.coverageDir = coverageDir;\n            return this;\n        }\n\n        public SwaggerCoverageBuilder backupCoverageOutput(boolean value){\n            this.backupCoverageOutput = value;\n            return this;\n        }\n\n        @Override\n        public Results parallel(int threadCount){\n            prepareTests();\n            Results results = super.parallel(threadCount);\n            generateReport();\n            stopProxy();\n            return results;\n        }\n\n        @Override\n        public Results jobManager(JobConfig value){\n            prepareTests();\n            Results results = super.jobManager(value);\n            generateReport();\n            stopProxy();\n            return results;\n        }\n    }\n\n    \n    public static SwaggerCoverageBuilder path(String... paths) {\n        SwaggerCoverageBuilder builder = new SwaggerCoverageBuilder();\n        return builder.path(paths);\n    }\n\n    public static SwaggerCoverageBuilder path(List<String> paths) {\n        SwaggerCoverageBuilder builder = new SwaggerCoverageBuilder();\n        return builder.path(paths);\n    }\n\n    public static SwaggerCoverageBuilder builder() {\n        return new SwaggerCoverageBuilder();\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-karate/src/main/resources/httpProxy.feature",
    "content": "@ignore\nFeature: Http Proxy for Swagger-Coverage\n\nBackground:\n    * print 'using oas3:', oas3\n    * print 'working Dir:', workingDir\n\n    * def initWriter = \n    \"\"\"\n        function(dir){\n            var RequestWriter = Java.type('com.github.viclovsky.swagger.coverage.karate.RequestWriter');\n            return new RequestWriter(dir);\n        }\n    \"\"\"\n    * def writer = callonce initWriter workingDir\n    * def scOptions = Java.type(\"com.github.viclovsky.swagger.coverage.karate.SwaggerCoverageOptions\");\n\nScenario: scOptions.getIgnoreCall()\n    * print \"Call ignored for Swagger Coverage Report.\"\n    * karate.proceed(scOptions.getDestinationURL())\n    * scOptions.reset()\n\nScenario:\n    * karate.proceed(scOptions.getDestinationURL())\n    \n    * def pathParams = pathMatches(scOptions.getPathPattern()) ? pathParams : null\n    \n    * def multipart = karate.get('requestParts', null)\n    * if (multipart != null) karate.remove(\"multipart\", \".[*].value\")\n\n    * def reqJson = \n    \"\"\"\n        {\n            baseUrl: '#(requestUrlBase)',\n            path: '#(requestUri)',\n            requestParams: '#(requestParams)',\n            headerParams: '#(requestHeaders)',\n            responseHeaders: '#(responseHeaders)',\n            requestParts: '#(multipart)',\n            pathParams: '#(pathParams)',\n            method: '#(requestMethod)',\n            statusCode: '#(responseStatus)',\n            hasBody: '#(request != null)'\n        }\n    \"\"\"\n\n    * def coverageRequest = karate.toBean(reqJson, 'com.github.viclovsky.swagger.coverage.karate.Request')\n    * eval writer.write(coverageRequest, oas3)\n    * scOptions.reset()\n"
  },
  {
    "path": "swagger-coverage-karate/src/main/resources/karate-base.js",
    "content": "function fn(){\n    var proxyPort = karate.properties['proxy.port'];\n\n    if(proxyPort){\n        karate.configure('proxy', 'http://127.0.0.1:'+ proxyPort);\n    }\n\n    var setDestUrl = function(arg) {\n        var SCO = Java.type(\"com.github.viclovsky.swagger.coverage.karate.SwaggerCoverageOptions\");\n        SCO.setDestinationURL(arg);\n    }\n\n    var setPathPattern = function(arg) {\n        var SCO = Java.type(\"com.github.viclovsky.swagger.coverage.karate.SwaggerCoverageOptions\");\n        SCO.setPathPattern(arg);\n    }\n\n    var ignoreNextCall = function() {\n        var SCO = Java.type(\"com.github.viclovsky.swagger.coverage.karate.SwaggerCoverageOptions\");\n        SCO.setIgnoreCall(true);\n    }\n\n    return {\n        scOptions : {\n            setDestUrl : setDestUrl,\n            setPathPattern : setPathPattern,\n            ignoreNextCall : ignoreNextCall\n        }\n    }\n}"
  },
  {
    "path": "swagger-coverage-karate/src/test/java/com/github/viclovsky/swagger/coverage/karate/RequestWriterTest.java",
    "content": "package com.github.viclovsky.swagger.coverage.karate;\n\nimport static com.github.viclovsky.swagger.coverage.SwaggerCoverageConstants.OUTPUT_DIRECTORY;\nimport static java.util.Optional.ofNullable;\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.iterableWithSize;\nimport static org.hamcrest.Matchers.endsWith;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.nio.charset.StandardCharsets;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.util.List;\nimport java.util.stream.Collectors;\nimport java.util.stream.Stream;\n\nimport com.intuit.karate.JsonUtils;\n\nimport org.junit.Before;\nimport org.junit.Rule;\nimport org.junit.Test;\nimport org.junit.rules.TemporaryFolder;\n\npublic class RequestWriterTest {\n\n    @Rule\n    public TemporaryFolder folder = new TemporaryFolder();\n\n    private Request request = new Request();\n\n    @Before\n    public void setUp() {\n        try {\n            File file = ofNullable(getClass().getClassLoader().getResource(\"request.json\"))\n                    .map(resource -> new File(resource.getFile()))\n                    .orElseThrow(() -> new IllegalArgumentException(\"Unable to read file: request.json\"));\n            String requestJson = new String(Files.readAllBytes(file.toPath()), StandardCharsets.UTF_8);\n            request = JsonUtils.fromJson(requestJson, Request.class);\n        } catch (Exception e) {\n            throw new RuntimeException(\"Can't load request json from resources folder!\");\n        }\n    }\n\n    @Test\n    public void shouldWriteSwaggerJson() throws IOException {\n\n        Path workingDir = folder.newFolder().toPath();\n        RequestWriter writer = new RequestWriter(workingDir.toString());\n        writer.write(request, false);\n\n        assertThat(getPaths(workingDir.resolve(OUTPUT_DIRECTORY)), iterableWithSize(1));\n        assertThat(getPaths(workingDir.resolve(OUTPUT_DIRECTORY)).get(0).toString(), endsWith(\".json\"));\n    }\n\n    @Test\n    public void shouldWriteOas3Yaml() throws IOException {\n        Path workingDir = folder.newFolder().toPath();\n        RequestWriter writer = new RequestWriter(workingDir.toString());\n        writer.write(request, true);\n\n        assertThat(getPaths(workingDir.resolve(OUTPUT_DIRECTORY)), iterableWithSize(1));\n        assertThat(getPaths(workingDir.resolve(OUTPUT_DIRECTORY)).get(0).toString(), endsWith(\".yaml\"));\n    }\n\n    private List<Path> getPaths(Path path) {\n        try (Stream<Path> paths = Files.walk(path)) {\n            return paths.filter(Files::isRegularFile).collect(Collectors.toList());\n        } catch (IOException e) {\n            throw new RuntimeException(\"can't walk files in swagger output directory\");\n        }\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-karate/src/test/java/com/github/viclovsky/swagger/coverage/karate/SwaggerCoverageRunnerTest.java",
    "content": "package com.github.viclovsky.swagger.coverage.karate;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.net.URI;\nimport java.net.URISyntaxException;\nimport java.nio.file.Path;\nimport java.nio.file.Paths;\nimport java.util.Arrays;\n\nimport com.github.tomakehurst.wiremock.junit.WireMockRule;\nimport com.github.viclovsky.swagger.coverage.SwaggerCoverageConstants;\nimport com.intuit.karate.FileUtils;\nimport com.intuit.karate.Results;\n\nimport org.apache.http.HttpStatus;\nimport org.hamcrest.io.FileMatchers;\nimport org.junit.Before;\nimport org.junit.Rule;\nimport org.junit.Test;\nimport org.junit.rules.TemporaryFolder;\n\nimport static com.github.viclovsky.swagger.coverage.SwaggerCoverageConstants.COVERAGE_HTML_REPORT_NAME;\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.junit.Assert.assertEquals;\nimport static org.hamcrest.Matchers.iterableWithSize;\nimport static com.github.tomakehurst.wiremock.client.WireMock.aResponse;\nimport static com.github.tomakehurst.wiremock.client.WireMock.configureFor;\nimport static com.github.tomakehurst.wiremock.client.WireMock.stubFor;\nimport static com.github.tomakehurst.wiremock.client.WireMock.get;\nimport static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;\n\nimport static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options;\n\npublic class SwaggerCoverageRunnerTest {\n\n    private static final String BODY_STRING = \"{ name: MockPet }\";\n\n    @Rule\n    public WireMockRule mock = new WireMockRule(options().dynamicPort().withRootDirectory(getDirFromResources(\"/wiremock\").toString()), false);\n\n    @Rule\n    public TemporaryFolder folder = new TemporaryFolder();\n\n    @Before\n    public void setUp(){\n        configureFor(mock.port());\n        stubFor(get(urlMatching(\"/pet/.*\"))\n                .willReturn(aResponse().withStatus(HttpStatus.SC_OK)\n                        .withBody(BODY_STRING)));\n\n        deleteOutputDirs(getDirFromResources(\"/api-test-coverage-v2\"));\n        deleteOutputDirs(getDirFromResources(\"/api-test-coverage-v3\"));\n    }\n\n    @Test\n    public void shouldGetSpecFromUrlV2() throws IOException{\n        File tempCoverageDir = folder.newFolder();\n        Results results = SwaggerCoverageRunner.path(\"classpath:petv2.feature\")\n                .backupReportDir(false)\n                .coverageDir(tempCoverageDir.toString())\n                .swaggerSpec(URI.create(mock.url(\"/swagger.json\")))\n                .swagger()\n                .systemProperty(\"baseUrl\", mock.baseUrl())\n                .parallel(1);\n\n        assertEquals(results.getErrorMessages(), 0, results.getFailCount());\n        assertThat(Paths.get(COVERAGE_HTML_REPORT_NAME).toFile(), FileMatchers.anExistingFile());\n    }\n\n    @Test\n    public void shouldGetSpecFromUrlV3() throws IOException{\n        File tempCoverageDir = folder.newFolder();\n        Results results = SwaggerCoverageRunner.path(\"classpath:petv3.feature\")\n                .backupReportDir(false)\n                .coverageDir(tempCoverageDir.toString())\n                .swaggerSpec(URI.create(mock.url(\"/openapi.yaml\")))\n                .oas3()\n                .systemProperty(\"baseUrl\", mock.baseUrl())\n                .parallel(1);\n\n        assertEquals(results.getErrorMessages(), 0, results.getFailCount());\n        assertThat(Paths.get(COVERAGE_HTML_REPORT_NAME).toFile(), FileMatchers.anExistingFile());\n    }\n\n    @Test\n    public void shouldGetFilesFromSpecifiedFilesV2(){\n        Path coverageDir = getDirFromResources(\"/api-test-coverage-v2\");\n        Results results = SwaggerCoverageRunner.path(\"classpath:petv2.feature\")\n                .backupReportDir(false)\n                .coverageDir(coverageDir.toString())\n                .swaggerSpec(coverageDir.resolve(\"swagger-specification.json\").toUri())\n                .swaggerCoverageConfig(coverageDir.resolve(\"swagger-coverage-config.json\").toString())\n                .swagger()\n                .systemProperty(\"baseUrl\", mock.baseUrl())\n                .parallel(1);\n\n        assertEquals(results.getErrorMessages(), 0, results.getFailCount());\n        assertThat(Paths.get(COVERAGE_HTML_REPORT_NAME).toFile(), FileMatchers.anExistingFile());\n    }\n\n    @Test\n    public void shouldGetFilesFromSpecifiedFilesV3(){\n        Path coverageDir = getDirFromResources(\"/api-test-coverage-v3\");\n        Results results = SwaggerCoverageRunner.path(\"classpath:petv3.feature\")\n                .backupReportDir(false)\n                .coverageDir(coverageDir.toString())\n                .swaggerSpec(coverageDir.resolve(\"swagger-specification.yaml\").toUri())\n                .swaggerCoverageConfig(coverageDir.resolve(\"swagger-coverage-config.json\").toString())\n                .oas3()\n                .systemProperty(\"baseUrl\", mock.baseUrl())\n                .parallel(1);\n\n        assertEquals(results.getErrorMessages(), 0, results.getFailCount());\n        assertThat(Paths.get(COVERAGE_HTML_REPORT_NAME).toFile(), FileMatchers.anExistingFile());\n    }\n\n\n    @Test\n    public void shouldGetFilesFromSpecifiedDirV2(){\n        Path coverageDir = getDirFromResources(\"/api-test-coverage-v2\");\n        Results results = SwaggerCoverageRunner.path(\"classpath:petv2.feature\")\n                .backupReportDir(false)\n                .coverageDir(coverageDir.toString())\n                .swagger()\n                .systemProperty(\"baseUrl\", mock.baseUrl())\n                .parallel(1);\n\n        assertEquals(results.getErrorMessages(), 0, results.getFailCount());\n        assertThat(Paths.get(COVERAGE_HTML_REPORT_NAME).toFile(), FileMatchers.anExistingFile());\n    }\n\n    @Test\n    public void shouldGetFilesFromSpecifiedDirV3(){\n        Path coverageDir = getDirFromResources(\"/api-test-coverage-v3\");\n        Results results = SwaggerCoverageRunner.path(\"classpath:petv3.feature\")\n                .backupReportDir(false)\n                .coverageDir(coverageDir.toString())\n                .oas3()\n                .systemProperty(\"baseUrl\", mock.baseUrl())\n                .parallel(1);\n\n        assertEquals(results.getErrorMessages(), 0, results.getFailCount());\n        assertThat(Paths.get(COVERAGE_HTML_REPORT_NAME).toFile(), FileMatchers.anExistingFile());\n    }\n\n    @Test\n    public void shouldBackupCoverageOutput() {\n        Path coverageDir = getDirFromResources(\"/api-test-coverage-v3\");\n        Results results = SwaggerCoverageRunner.path(\"classpath:petv3.feature\")\n                .backupReportDir(false)\n                .coverageDir(coverageDir.toString())\n                .oas3()\n                .systemProperty(\"baseUrl\", mock.baseUrl())\n                .parallel(1);\n\n        assertEquals(results.getErrorMessages(), 0, results.getFailCount());\n        assertThat(Paths.get(COVERAGE_HTML_REPORT_NAME).toFile(), FileMatchers.anExistingFile());\n\n        results = SwaggerCoverageRunner.path(\"classpath:petv3.feature\")\n                .backupReportDir(false)\n                .backupCoverageOutput(true)\n                .coverageDir(coverageDir.toString())\n                .oas3()\n                .systemProperty(\"baseUrl\", mock.baseUrl())\n                .parallel(1);\n\n        assertEquals(results.getErrorMessages(), 0, results.getFailCount());\n        assertThat(Paths.get(COVERAGE_HTML_REPORT_NAME).toFile(), FileMatchers.anExistingFile());\n        assertThat(Arrays.asList(coverageDir.toFile().list((dir, name) -> name.contains(SwaggerCoverageConstants.OUTPUT_DIRECTORY))), iterableWithSize(2));\n    }\n\n    private Path getDirFromResources(String name) {\n        try {\n            return Paths.get(this.getClass().getResource(name).toURI());\n        } catch (URISyntaxException e) {\n            return null;\n        }\n    }\n\n    private void deleteOutputDirs(Path coverageDir){\n        String[] dirs = coverageDir.toFile().list((dir, name) -> name.contains(SwaggerCoverageConstants.OUTPUT_DIRECTORY));\n        for (String dir : dirs){\n            FileUtils.deleteDirectory(coverageDir.resolve(dir).toFile());\n        }\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-karate/src/test/resources/api-test-coverage-v2/swagger-coverage-config.json",
    "content": "{\n    \"rules\" : { },\n    \"writers\" : { \n        \"html\": {\n            \"locale\": \"en\",\n            \"filename\":\"swagger-coverage-report.html\",\n            \"numberFormat\": \"0.##\"\n        }\n    }\n} "
  },
  {
    "path": "swagger-coverage-karate/src/test/resources/api-test-coverage-v2/swagger-specification.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 [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    \"version\": \"1.0.3\",\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\": \"petstore.swagger.io\",\n  \"basePath\": \"/v2\",\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    \"https\",\n    \"http\"\n  ],\n  \"paths\": {\n    \"/pet/{petId}\": {\n      \"get\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Find pet by ID\",\n        \"description\": \"Returns a single pet\",\n        \"operationId\": \"getPetById\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet to return\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Pet not found\"\n          }\n        },\n        \"security\": [\n          {\n            \"api_key\": []\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Updates a pet in the store with form data\",\n        \"description\": \"\",\n        \"operationId\": \"updatePetWithForm\",\n        \"consumes\": [\n          \"application/x-www-form-urlencoded\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet that needs to be updated\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          {\n            \"name\": \"name\",\n            \"in\": \"formData\",\n            \"description\": \"Updated name of the pet\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"status\",\n            \"in\": \"formData\",\n            \"description\": \"Updated status of the pet\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      },\n      \"delete\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Deletes a pet\",\n        \"description\": \"\",\n        \"operationId\": \"deletePet\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"api_key\",\n            \"in\": \"header\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"Pet id to delete\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Pet not found\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pet/{petId}/uploadImage\": {\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"uploads an image\",\n        \"description\": \"\",\n        \"operationId\": \"uploadFile\",\n        \"consumes\": [\n          \"multipart/form-data\"\n        ],\n        \"produces\": [\n          \"application/json\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet to update\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          {\n            \"name\": \"additionalMetadata\",\n            \"in\": \"formData\",\n            \"description\": \"Additional data to pass to server\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"file\",\n            \"in\": \"formData\",\n            \"description\": \"file to upload\",\n            \"required\": false,\n            \"type\": \"file\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/ApiResponse\"\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pet\": {\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Add a new pet to the store\",\n        \"description\": \"\",\n        \"operationId\": \"addPet\",\n        \"consumes\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Update an existing pet\",\n        \"description\": \"\",\n        \"operationId\": \"updatePet\",\n        \"consumes\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\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        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pet/findByStatus\": {\n      \"get\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Finds Pets by status\",\n        \"description\": \"Multiple status values can be provided with comma separated strings\",\n        \"operationId\": \"findPetsByStatus\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"status\",\n            \"in\": \"query\",\n            \"description\": \"Status values that need to be considered for filter\",\n            \"required\": true,\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\",\n              \"enum\": [\n                \"available\",\n                \"pending\",\n                \"sold\"\n              ],\n              \"default\": \"available\"\n            },\n            \"collectionFormat\": \"multi\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Pet\"\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid status value\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\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        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"tags\",\n            \"in\": \"query\",\n            \"description\": \"Tags to filter by\",\n            \"required\": true,\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"collectionFormat\": \"multi\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Pet\"\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid tag value\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ],\n        \"deprecated\": true\n      }\n    },\n    \"/store/inventory\": {\n      \"get\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Returns pet inventories by status\",\n        \"description\": \"Returns a map of status codes to quantities\",\n        \"operationId\": \"getInventory\",\n        \"produces\": [\n          \"application/json\"\n        ],\n        \"parameters\": [],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"object\",\n              \"additionalProperties\": {\n                \"type\": \"integer\",\n                \"format\": \"int32\"\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"api_key\": []\n          }\n        ]\n      }\n    },\n    \"/store/order/{orderId}\": {\n      \"get\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Find purchase order by ID\",\n        \"description\": \"For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions\",\n        \"operationId\": \"getOrderById\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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\": \"integer\",\n            \"maximum\": 10,\n            \"minimum\": 1,\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Order not found\"\n          }\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Delete purchase order by ID\",\n        \"description\": \"For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors\",\n        \"operationId\": \"deleteOrder\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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\": \"integer\",\n            \"minimum\": 1,\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Order not found\"\n          }\n        }\n      }\n    },\n    \"/store/order\": {\n      \"post\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Place an order for a pet\",\n        \"description\": \"\",\n        \"operationId\": \"placeOrder\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"order placed for purchasing the pet\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid Order\"\n          }\n        }\n      }\n    },\n    \"/user/{username}\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Get user by user name\",\n        \"description\": \"\",\n        \"operationId\": \"getUserByName\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid username supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      },\n      \"put\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Updated user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"updateUser\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"username\",\n            \"in\": \"path\",\n            \"description\": \"name that need to be updated\",\n            \"required\": true,\n            \"type\": \"string\"\n          },\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Updated user object\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid user supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Delete user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"deleteUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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          \"400\": {\n            \"description\": \"Invalid username supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      }\n    },\n    \"/user/login\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Logs user into the system\",\n        \"description\": \"\",\n        \"operationId\": \"loginUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"username\",\n            \"in\": \"query\",\n            \"description\": \"The user name for login\",\n            \"required\": true,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"password\",\n            \"in\": \"query\",\n            \"description\": \"The password for login in clear text\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"headers\": {\n              \"X-Expires-After\": {\n                \"type\": \"string\",\n                \"format\": \"date-time\",\n                \"description\": \"date in UTC when token expires\"\n              },\n              \"X-Rate-Limit\": {\n                \"type\": \"integer\",\n                \"format\": \"int32\",\n                \"description\": \"calls per hour allowed by the user\"\n              }\n            },\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid username/password supplied\"\n          }\n        }\n      }\n    },\n    \"/user/logout\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Logs out current logged in user session\",\n        \"description\": \"\",\n        \"operationId\": \"logoutUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Create user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"createUser\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Created user object\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user/createWithArray\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Creates list of users with given input array\",\n        \"description\": \"\",\n        \"operationId\": \"createUsersWithArrayInput\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"List of user object\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/User\"\n              }\n            }\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user/createWithList\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Creates list of users with given input array\",\n        \"description\": \"\",\n        \"operationId\": \"createUsersWithListInput\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"List of user object\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/User\"\n              }\n            }\n          }\n        ],\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\": \"https://petstore.swagger.io/oauth/authorize\",\n      \"flow\": \"implicit\",\n      \"scopes\": {\n        \"read:pets\": \"read your pets\",\n        \"write:pets\": \"modify pets in your account\"\n      }\n    }\n  },\n  \"definitions\": {\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    \"Pet\": {\n      \"type\": \"object\",\n      \"required\": [\n        \"name\",\n        \"photoUrls\"\n      ],\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"category\": {\n          \"$ref\": \"#/definitions/Category\"\n        },\n        \"name\": {\n          \"type\": \"string\",\n          \"example\": \"doggie\"\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            \"xml\": {\n              \"name\": \"tag\"\n            },\n            \"$ref\": \"#/definitions/Tag\"\n          }\n        },\n        \"status\": {\n          \"type\": \"string\",\n          \"description\": \"pet status in the store\",\n          \"enum\": [\n            \"available\",\n            \"pending\",\n            \"sold\"\n          ]\n        }\n      },\n      \"xml\": {\n        \"name\": \"Pet\"\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    \"ApiResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"code\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"type\": {\n          \"type\": \"string\"\n        },\n        \"message\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Order\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"petId\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"quantity\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"shipDate\": {\n          \"type\": \"string\",\n          \"format\": \"date-time\"\n        },\n        \"status\": {\n          \"type\": \"string\",\n          \"description\": \"Order Status\",\n          \"enum\": [\n            \"placed\",\n            \"approved\",\n            \"delivered\"\n          ]\n        },\n        \"complete\": {\n          \"type\": \"boolean\"\n        }\n      },\n      \"xml\": {\n        \"name\": \"Order\"\n      }\n    },\n    \"User\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"username\": {\n          \"type\": \"string\"\n        },\n        \"firstName\": {\n          \"type\": \"string\"\n        },\n        \"lastName\": {\n          \"type\": \"string\"\n        },\n        \"email\": {\n          \"type\": \"string\"\n        },\n        \"password\": {\n          \"type\": \"string\"\n        },\n        \"phone\": {\n          \"type\": \"string\"\n        },\n        \"userStatus\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"User Status\"\n        }\n      },\n      \"xml\": {\n        \"name\": \"User\"\n      }\n    }\n  },\n  \"externalDocs\": {\n    \"description\": \"Find out more about Swagger\",\n    \"url\": \"http://swagger.io\"\n  }\n}"
  },
  {
    "path": "swagger-coverage-karate/src/test/resources/api-test-coverage-v3/swagger-coverage-config.json",
    "content": "{\n    \"rules\" : { },\n    \"writers\" : { \n        \"html\": {\n            \"locale\": \"en\",\n            \"filename\":\"swagger-coverage-report.html\",\n            \"numberFormat\": \"0.##\"\n        }\n    }\n} "
  },
  {
    "path": "swagger-coverage-karate/src/test/resources/api-test-coverage-v3/swagger-specification.yaml",
    "content": "openapi: 3.0.2\ninfo:\n  title: Swagger Petstore - OpenAPI 3.0\n  description: \"This is a sample Pet Store Server based on the OpenAPI 3.0 specification.\\\n    \\  You can find out more about\\nSwagger at [http://swagger.io](http://swagger.io).\\\n    \\ In the third iteration of the pet store, we've switched to the design first\\\n    \\ approach!\\nYou can now help us improve the API whether it's by making changes\\\n    \\ to the definition itself or to the code.\\nThat way, with time, we can improve\\\n    \\ the API in general, and expose some of the new features in OAS3.\\n\\nSome useful\\\n    \\ links:\\n- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\\n\\\n    - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)\"\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  version: 1.0.7\nexternalDocs:\n  description: Find out more about Swagger\n  url: http://swagger.io\nservers:\n- url: /api/v3\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: Operations about user\n- name: user\n  description: Access to Petstore orders\n  externalDocs:\n    description: Find out more about our store\n    url: http://swagger.io\npaths:\n  /pet:\n    put:\n      tags:\n      - pet\n      summary: Update an existing pet\n      description: Update an existing pet by Id\n      operationId: updatePet\n      requestBody:\n        description: Update an existent pet in 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          application/x-www-form-urlencoded:\n            schema:\n              $ref: '#/components/schemas/Pet'\n        required: true\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        \"405\":\n          description: Validation exception\n      security:\n      - petstore_auth:\n        - write:pets\n        - read:pets\n    post:\n      tags:\n      - pet\n      summary: Add a new pet to the store\n      description: Add a new pet to the store\n      operationId: addPet\n      requestBody:\n        description: Create a new pet in 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          application/x-www-form-urlencoded:\n            schema:\n              $ref: '#/components/schemas/Pet'\n        required: true\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        \"405\":\n          description: Invalid input\n      security:\n      - petstore_auth:\n        - write:pets\n        - read:pets\n  /pet/findByStatus:\n    get:\n      tags:\n      - pet\n      summary: Finds Pets by status\n      description: Multiple status values can be provided with comma separated strings\n      operationId: findPetsByStatus\n      parameters:\n      - name: status\n        in: query\n        description: Status values that need to be considered for filter\n        required: false\n        explode: true\n        schema:\n          type: string\n          default: available\n          enum:\n          - available\n          - pending\n          - sold\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  /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: false\n        explode: 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      security:\n      - petstore_auth:\n        - write:pets\n        - read:pets\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      security:\n      - api_key: []\n      - petstore_auth:\n        - write:pets\n        - read:pets\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      - name: name\n        in: query\n        description: Name of pet that needs to be updated\n        schema:\n          type: string\n      - name: status\n        in: query\n        description: Status of pet that needs to be updated\n        schema:\n          type: string\n      responses:\n        \"405\":\n          description: Invalid input\n      security:\n      - petstore_auth:\n        - write:pets\n        - read:pets\n    delete:\n      tags:\n      - pet\n      summary: Deletes a pet\n      description: \"\"\n      operationId: deletePet\n      parameters:\n      - name: api_key\n        in: header\n        description: \"\"\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 pet value\n      security:\n      - petstore_auth:\n        - write:pets\n        - read:pets\n  /pet/{petId}/uploadImage:\n    post:\n      tags:\n      - pet\n      summary: uploads an image\n      description: \"\"\n      operationId: uploadFile\n      parameters:\n      - name: petId\n        in: path\n        description: ID of pet to update\n        required: true\n        schema:\n          type: integer\n          format: int64\n      - name: additionalMetadata\n        in: query\n        description: Additional Metadata\n        required: false\n        schema:\n          type: string\n      requestBody:\n        content:\n          application/octet-stream:\n            schema:\n              type: string\n              format: binary\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  /store/inventory:\n    get:\n      tags:\n      - store\n      summary: Returns pet inventories by status\n      description: Returns a map of status codes to quantities\n      operationId: getInventory\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: object\n                additionalProperties:\n                  type: integer\n                  format: int32\n      security:\n      - api_key: []\n  /store/order:\n    post:\n      tags:\n      - store\n      summary: Place an order for a pet\n      description: Place a new order in the store\n      operationId: placeOrder\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/Order'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/Order'\n          application/x-www-form-urlencoded:\n            schema:\n              $ref: '#/components/schemas/Order'\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Order'\n        \"405\":\n          description: Invalid input\n  /store/order/{orderId}:\n    get:\n      tags:\n      - store\n      summary: Find purchase order by ID\n      description: For valid response try integer IDs with value <= 5 or > 10. Other\n        values will generated exceptions\n      operationId: getOrderById\n      parameters:\n      - name: orderId\n        in: path\n        description: ID of order that needs to be fetched\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/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 value < 1000. Anything\n        above 1000 or nonintegers will generate API errors\n      operationId: deleteOrder\n      parameters:\n      - name: orderId\n        in: path\n        description: ID of the order that needs to be deleted\n        required: true\n        schema:\n          type: integer\n          format: int64\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      requestBody:\n        description: Created user object\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/User'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/User'\n          application/x-www-form-urlencoded:\n            schema:\n              $ref: '#/components/schemas/User'\n      responses:\n        default:\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/User'\n  /user/createWithList:\n    post:\n      tags:\n      - user\n      summary: Creates list of users with given input array\n      description: Creates list of users with given input array\n      operationId: createUsersWithListInput\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: array\n              items:\n                $ref: '#/components/schemas/User'\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        default:\n          description: successful operation\n  /user/login:\n    get:\n      tags:\n      - user\n      summary: Logs user into the system\n      description: \"\"\n      operationId: loginUser\n      parameters:\n      - name: username\n        in: query\n        description: The user name for login\n        required: false\n        schema:\n          type: string\n      - name: password\n        in: query\n        description: The password for login in clear text\n        required: false\n        schema:\n          type: string\n      responses:\n        \"200\":\n          description: successful operation\n          headers:\n            X-Rate-Limit:\n              description: calls per hour allowed by the user\n              schema:\n                type: integer\n                format: int32\n            X-Expires-After:\n              description: date in UTC when token expires\n              schema:\n                type: string\n                format: date-time\n          content:\n            application/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: Update user\n      description: This can only be done by the logged in user.\n      operationId: updateUser\n      parameters:\n      - name: username\n        in: path\n        description: name that need to be deleted\n        required: true\n        schema:\n          type: string\n      requestBody:\n        description: Update an existent user in the store\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/User'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/User'\n          application/x-www-form-urlencoded:\n            schema:\n              $ref: '#/components/schemas/User'\n      responses:\n        default:\n          description: successful operation\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\ncomponents:\n  schemas:\n    Order:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n          example: 10\n        petId:\n          type: integer\n          format: int64\n          example: 198772\n        quantity:\n          type: integer\n          format: int32\n          example: 7\n        shipDate:\n          type: string\n          format: date-time\n        status:\n          type: string\n          description: Order Status\n          example: approved\n          enum:\n          - placed\n          - approved\n          - delivered\n        complete:\n          type: boolean\n      xml:\n        name: order\n    Customer:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n          example: 100000\n        username:\n          type: string\n          example: fehguy\n        address:\n          type: array\n          xml:\n            name: addresses\n            wrapped: true\n          items:\n            $ref: '#/components/schemas/Address'\n      xml:\n        name: customer\n    Address:\n      type: object\n      properties:\n        street:\n          type: string\n          example: 437 Lytton\n        city:\n          type: string\n          example: Palo Alto\n        state:\n          type: string\n          example: CA\n        zip:\n          type: string\n          example: \"94301\"\n      xml:\n        name: address\n    Category:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n          example: 1\n        name:\n          type: string\n          example: Dogs\n      xml:\n        name: category\n    User:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n          example: 10\n        username:\n          type: string\n          example: theUser\n        firstName:\n          type: string\n          example: John\n        lastName:\n          type: string\n          example: James\n        email:\n          type: string\n          example: john@email.com\n        password:\n          type: string\n          example: \"12345\"\n        phone:\n          type: string\n          example: \"12345\"\n        userStatus:\n          type: integer\n          description: User Status\n          format: int32\n          example: 1\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      required:\n      - name\n      - photoUrls\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n          example: 10\n        name:\n          type: string\n          example: doggie\n        category:\n          $ref: '#/components/schemas/Category'\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\n          - pending\n          - sold\n      xml:\n        name: pet\n    ApiResponse:\n      type: object\n      properties:\n        code:\n          type: integer\n          format: int32\n        type:\n          type: string\n        message:\n          type: string\n      xml:\n        name: '##default'\n  requestBodies:\n    Pet:\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    UserArray:\n      description: List of user object\n      content:\n        application/json:\n          schema:\n            type: array\n            items:\n              $ref: '#/components/schemas/User'\n  securitySchemes:\n    petstore_auth:\n      type: oauth2\n      flows:\n        implicit:\n          authorizationUrl: https://petstore3.swagger.io/oauth/authorize\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"
  },
  {
    "path": "swagger-coverage-karate/src/test/resources/petv2.feature",
    "content": "Feature: Petstore v2\n\nBackground:\n    * def baseUrl = karate.properties[\"baseUrl\"]\n    * url baseUrl\n    * eval scOptions.setDestUrl(baseUrl)\n\nScenario: Basic Test\n    * eval scOptions.setPathPattern(\"/pet/{id}\")\n    Given path \"pet\", 1\n    When method GET\n    Then status 200"
  },
  {
    "path": "swagger-coverage-karate/src/test/resources/petv3.feature",
    "content": "Feature: Petstore v3\n\nBackground:\n    * def baseUrl = karate.properties[\"baseUrl\"]\n    * url baseUrl\n    * eval scOptions.setDestUrl(baseUrl)\n\nScenario: Basic Test\n    * eval scOptions.setPathPattern(\"/pet/{petId}\")\n    Given path \"pet\", 2\n    When method GET\n    Then status 200 \n"
  },
  {
    "path": "swagger-coverage-karate/src/test/resources/request.json",
    "content": "{\n    \"baseUrl\": \"petstore.swagger.io/v2\",\n    \"path\": \"pet\",\n    \"requestParams\": {\n        \"param1\": [\n            \"value1\"\n        ],\n        \"param2\": [\n            \"23\"\n        ]\n    },\n    \"headerParams\": {\n        \"host\": [\n            \"service-reports.iot.qbeyond.tech\"\n        ],\n        \"accept-encoding\": [\n            \"gzip,deflate\"\n        ]\n    },\n    \"responseHeaders\": {\n        \"content-type\": [\n            \"application/json\"\n        ],\n        \"content-length\": [\n            \"28\"\n        ]\n    },\n    \"requestParts\": {\n        \"file\": [\n          {\n            \"charset\": \"UTF-8\",\n            \"filename\": \"testImage\",\n            \"transferEncoding\": \"binary\",\n            \"name\": \"file\",\n            \"contentType\": \"image/jpeg\"\n          }\n        ]\n    },\n    \"method\": \"POST\",\n    \"statusCode\": 200,\n    \"hasBody\": false\n}"
  },
  {
    "path": "swagger-coverage-karate/src/test/resources/wiremock/__files/openapi.yaml",
    "content": "openapi: 3.0.2\ninfo:\n  title: Swagger Petstore - OpenAPI 3.0\n  description: \"This is a sample Pet Store Server based on the OpenAPI 3.0 specification.\\\n    \\  You can find out more about\\nSwagger at [http://swagger.io](http://swagger.io).\\\n    \\ In the third iteration of the pet store, we've switched to the design first\\\n    \\ approach!\\nYou can now help us improve the API whether it's by making changes\\\n    \\ to the definition itself or to the code.\\nThat way, with time, we can improve\\\n    \\ the API in general, and expose some of the new features in OAS3.\\n\\nSome useful\\\n    \\ links:\\n- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\\n\\\n    - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)\"\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  version: 1.0.7\nexternalDocs:\n  description: Find out more about Swagger\n  url: http://swagger.io\nservers:\n- url: /api/v3\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: Operations about user\n- name: user\n  description: Access to Petstore orders\n  externalDocs:\n    description: Find out more about our store\n    url: http://swagger.io\npaths:\n  /pet:\n    put:\n      tags:\n      - pet\n      summary: Update an existing pet\n      description: Update an existing pet by Id\n      operationId: updatePet\n      requestBody:\n        description: Update an existent pet in 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          application/x-www-form-urlencoded:\n            schema:\n              $ref: '#/components/schemas/Pet'\n        required: true\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        \"405\":\n          description: Validation exception\n      security:\n      - petstore_auth:\n        - write:pets\n        - read:pets\n    post:\n      tags:\n      - pet\n      summary: Add a new pet to the store\n      description: Add a new pet to the store\n      operationId: addPet\n      requestBody:\n        description: Create a new pet in 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          application/x-www-form-urlencoded:\n            schema:\n              $ref: '#/components/schemas/Pet'\n        required: true\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        \"405\":\n          description: Invalid input\n      security:\n      - petstore_auth:\n        - write:pets\n        - read:pets\n  /pet/findByStatus:\n    get:\n      tags:\n      - pet\n      summary: Finds Pets by status\n      description: Multiple status values can be provided with comma separated strings\n      operationId: findPetsByStatus\n      parameters:\n      - name: status\n        in: query\n        description: Status values that need to be considered for filter\n        required: false\n        explode: true\n        schema:\n          type: string\n          default: available\n          enum:\n          - available\n          - pending\n          - sold\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  /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: false\n        explode: 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      security:\n      - petstore_auth:\n        - write:pets\n        - read:pets\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      security:\n      - api_key: []\n      - petstore_auth:\n        - write:pets\n        - read:pets\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      - name: name\n        in: query\n        description: Name of pet that needs to be updated\n        schema:\n          type: string\n      - name: status\n        in: query\n        description: Status of pet that needs to be updated\n        schema:\n          type: string\n      responses:\n        \"405\":\n          description: Invalid input\n      security:\n      - petstore_auth:\n        - write:pets\n        - read:pets\n    delete:\n      tags:\n      - pet\n      summary: Deletes a pet\n      description: \"\"\n      operationId: deletePet\n      parameters:\n      - name: api_key\n        in: header\n        description: \"\"\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 pet value\n      security:\n      - petstore_auth:\n        - write:pets\n        - read:pets\n  /pet/{petId}/uploadImage:\n    post:\n      tags:\n      - pet\n      summary: uploads an image\n      description: \"\"\n      operationId: uploadFile\n      parameters:\n      - name: petId\n        in: path\n        description: ID of pet to update\n        required: true\n        schema:\n          type: integer\n          format: int64\n      - name: additionalMetadata\n        in: query\n        description: Additional Metadata\n        required: false\n        schema:\n          type: string\n      requestBody:\n        content:\n          application/octet-stream:\n            schema:\n              type: string\n              format: binary\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  /store/inventory:\n    get:\n      tags:\n      - store\n      summary: Returns pet inventories by status\n      description: Returns a map of status codes to quantities\n      operationId: getInventory\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: object\n                additionalProperties:\n                  type: integer\n                  format: int32\n      security:\n      - api_key: []\n  /store/order:\n    post:\n      tags:\n      - store\n      summary: Place an order for a pet\n      description: Place a new order in the store\n      operationId: placeOrder\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/Order'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/Order'\n          application/x-www-form-urlencoded:\n            schema:\n              $ref: '#/components/schemas/Order'\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Order'\n        \"405\":\n          description: Invalid input\n  /store/order/{orderId}:\n    get:\n      tags:\n      - store\n      summary: Find purchase order by ID\n      description: For valid response try integer IDs with value <= 5 or > 10. Other\n        values will generated exceptions\n      operationId: getOrderById\n      parameters:\n      - name: orderId\n        in: path\n        description: ID of order that needs to be fetched\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/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 value < 1000. Anything\n        above 1000 or nonintegers will generate API errors\n      operationId: deleteOrder\n      parameters:\n      - name: orderId\n        in: path\n        description: ID of the order that needs to be deleted\n        required: true\n        schema:\n          type: integer\n          format: int64\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      requestBody:\n        description: Created user object\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/User'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/User'\n          application/x-www-form-urlencoded:\n            schema:\n              $ref: '#/components/schemas/User'\n      responses:\n        default:\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/User'\n  /user/createWithList:\n    post:\n      tags:\n      - user\n      summary: Creates list of users with given input array\n      description: Creates list of users with given input array\n      operationId: createUsersWithListInput\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: array\n              items:\n                $ref: '#/components/schemas/User'\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        default:\n          description: successful operation\n  /user/login:\n    get:\n      tags:\n      - user\n      summary: Logs user into the system\n      description: \"\"\n      operationId: loginUser\n      parameters:\n      - name: username\n        in: query\n        description: The user name for login\n        required: false\n        schema:\n          type: string\n      - name: password\n        in: query\n        description: The password for login in clear text\n        required: false\n        schema:\n          type: string\n      responses:\n        \"200\":\n          description: successful operation\n          headers:\n            X-Rate-Limit:\n              description: calls per hour allowed by the user\n              schema:\n                type: integer\n                format: int32\n            X-Expires-After:\n              description: date in UTC when token expires\n              schema:\n                type: string\n                format: date-time\n          content:\n            application/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: Update user\n      description: This can only be done by the logged in user.\n      operationId: updateUser\n      parameters:\n      - name: username\n        in: path\n        description: name that need to be deleted\n        required: true\n        schema:\n          type: string\n      requestBody:\n        description: Update an existent user in the store\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/User'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/User'\n          application/x-www-form-urlencoded:\n            schema:\n              $ref: '#/components/schemas/User'\n      responses:\n        default:\n          description: successful operation\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\ncomponents:\n  schemas:\n    Order:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n          example: 10\n        petId:\n          type: integer\n          format: int64\n          example: 198772\n        quantity:\n          type: integer\n          format: int32\n          example: 7\n        shipDate:\n          type: string\n          format: date-time\n        status:\n          type: string\n          description: Order Status\n          example: approved\n          enum:\n          - placed\n          - approved\n          - delivered\n        complete:\n          type: boolean\n      xml:\n        name: order\n    Customer:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n          example: 100000\n        username:\n          type: string\n          example: fehguy\n        address:\n          type: array\n          xml:\n            name: addresses\n            wrapped: true\n          items:\n            $ref: '#/components/schemas/Address'\n      xml:\n        name: customer\n    Address:\n      type: object\n      properties:\n        street:\n          type: string\n          example: 437 Lytton\n        city:\n          type: string\n          example: Palo Alto\n        state:\n          type: string\n          example: CA\n        zip:\n          type: string\n          example: \"94301\"\n      xml:\n        name: address\n    Category:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n          example: 1\n        name:\n          type: string\n          example: Dogs\n      xml:\n        name: category\n    User:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n          example: 10\n        username:\n          type: string\n          example: theUser\n        firstName:\n          type: string\n          example: John\n        lastName:\n          type: string\n          example: James\n        email:\n          type: string\n          example: john@email.com\n        password:\n          type: string\n          example: \"12345\"\n        phone:\n          type: string\n          example: \"12345\"\n        userStatus:\n          type: integer\n          description: User Status\n          format: int32\n          example: 1\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      required:\n      - name\n      - photoUrls\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n          example: 10\n        name:\n          type: string\n          example: doggie\n        category:\n          $ref: '#/components/schemas/Category'\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\n          - pending\n          - sold\n      xml:\n        name: pet\n    ApiResponse:\n      type: object\n      properties:\n        code:\n          type: integer\n          format: int32\n        type:\n          type: string\n        message:\n          type: string\n      xml:\n        name: '##default'\n  requestBodies:\n    Pet:\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    UserArray:\n      description: List of user object\n      content:\n        application/json:\n          schema:\n            type: array\n            items:\n              $ref: '#/components/schemas/User'\n  securitySchemes:\n    petstore_auth:\n      type: oauth2\n      flows:\n        implicit:\n          authorizationUrl: https://petstore3.swagger.io/oauth/authorize\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"
  },
  {
    "path": "swagger-coverage-karate/src/test/resources/wiremock/__files/swagger.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 [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    \"version\": \"1.0.3\",\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\": \"petstore.swagger.io\",\n  \"basePath\": \"/v2\",\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    \"https\",\n    \"http\"\n  ],\n  \"paths\": {\n    \"/pet/{petId}\": {\n      \"get\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Find pet by ID\",\n        \"description\": \"Returns a single pet\",\n        \"operationId\": \"getPetById\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet to return\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Pet not found\"\n          }\n        },\n        \"security\": [\n          {\n            \"api_key\": []\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Updates a pet in the store with form data\",\n        \"description\": \"\",\n        \"operationId\": \"updatePetWithForm\",\n        \"consumes\": [\n          \"application/x-www-form-urlencoded\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet that needs to be updated\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          {\n            \"name\": \"name\",\n            \"in\": \"formData\",\n            \"description\": \"Updated name of the pet\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"status\",\n            \"in\": \"formData\",\n            \"description\": \"Updated status of the pet\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      },\n      \"delete\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Deletes a pet\",\n        \"description\": \"\",\n        \"operationId\": \"deletePet\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"api_key\",\n            \"in\": \"header\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"Pet id to delete\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Pet not found\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pet/{petId}/uploadImage\": {\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"uploads an image\",\n        \"description\": \"\",\n        \"operationId\": \"uploadFile\",\n        \"consumes\": [\n          \"multipart/form-data\"\n        ],\n        \"produces\": [\n          \"application/json\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet to update\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          {\n            \"name\": \"additionalMetadata\",\n            \"in\": \"formData\",\n            \"description\": \"Additional data to pass to server\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"file\",\n            \"in\": \"formData\",\n            \"description\": \"file to upload\",\n            \"required\": false,\n            \"type\": \"file\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/ApiResponse\"\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pet\": {\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Add a new pet to the store\",\n        \"description\": \"\",\n        \"operationId\": \"addPet\",\n        \"consumes\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Update an existing pet\",\n        \"description\": \"\",\n        \"operationId\": \"updatePet\",\n        \"consumes\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\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        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pet/findByStatus\": {\n      \"get\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Finds Pets by status\",\n        \"description\": \"Multiple status values can be provided with comma separated strings\",\n        \"operationId\": \"findPetsByStatus\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"status\",\n            \"in\": \"query\",\n            \"description\": \"Status values that need to be considered for filter\",\n            \"required\": true,\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\",\n              \"enum\": [\n                \"available\",\n                \"pending\",\n                \"sold\"\n              ],\n              \"default\": \"available\"\n            },\n            \"collectionFormat\": \"multi\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Pet\"\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid status value\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ]\n      }\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        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"tags\",\n            \"in\": \"query\",\n            \"description\": \"Tags to filter by\",\n            \"required\": true,\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"collectionFormat\": \"multi\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Pet\"\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid tag value\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\"\n            ]\n          }\n        ],\n        \"deprecated\": true\n      }\n    },\n    \"/store/inventory\": {\n      \"get\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Returns pet inventories by status\",\n        \"description\": \"Returns a map of status codes to quantities\",\n        \"operationId\": \"getInventory\",\n        \"produces\": [\n          \"application/json\"\n        ],\n        \"parameters\": [],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"object\",\n              \"additionalProperties\": {\n                \"type\": \"integer\",\n                \"format\": \"int32\"\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"api_key\": []\n          }\n        ]\n      }\n    },\n    \"/store/order/{orderId}\": {\n      \"get\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Find purchase order by ID\",\n        \"description\": \"For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions\",\n        \"operationId\": \"getOrderById\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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\": \"integer\",\n            \"maximum\": 10,\n            \"minimum\": 1,\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Order not found\"\n          }\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Delete purchase order by ID\",\n        \"description\": \"For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors\",\n        \"operationId\": \"deleteOrder\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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\": \"integer\",\n            \"minimum\": 1,\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Order not found\"\n          }\n        }\n      }\n    },\n    \"/store/order\": {\n      \"post\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Place an order for a pet\",\n        \"description\": \"\",\n        \"operationId\": \"placeOrder\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"order placed for purchasing the pet\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid Order\"\n          }\n        }\n      }\n    },\n    \"/user/{username}\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Get user by user name\",\n        \"description\": \"\",\n        \"operationId\": \"getUserByName\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid username supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      },\n      \"put\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Updated user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"updateUser\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"username\",\n            \"in\": \"path\",\n            \"description\": \"name that need to be updated\",\n            \"required\": true,\n            \"type\": \"string\"\n          },\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Updated user object\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid user supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Delete user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"deleteUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\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          \"400\": {\n            \"description\": \"Invalid username supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      }\n    },\n    \"/user/login\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Logs user into the system\",\n        \"description\": \"\",\n        \"operationId\": \"loginUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"username\",\n            \"in\": \"query\",\n            \"description\": \"The user name for login\",\n            \"required\": true,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"password\",\n            \"in\": \"query\",\n            \"description\": \"The password for login in clear text\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"headers\": {\n              \"X-Expires-After\": {\n                \"type\": \"string\",\n                \"format\": \"date-time\",\n                \"description\": \"date in UTC when token expires\"\n              },\n              \"X-Rate-Limit\": {\n                \"type\": \"integer\",\n                \"format\": \"int32\",\n                \"description\": \"calls per hour allowed by the user\"\n              }\n            },\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid username/password supplied\"\n          }\n        }\n      }\n    },\n    \"/user/logout\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Logs out current logged in user session\",\n        \"description\": \"\",\n        \"operationId\": \"logoutUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Create user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"createUser\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Created user object\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user/createWithArray\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Creates list of users with given input array\",\n        \"description\": \"\",\n        \"operationId\": \"createUsersWithArrayInput\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"List of user object\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/User\"\n              }\n            }\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user/createWithList\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Creates list of users with given input array\",\n        \"description\": \"\",\n        \"operationId\": \"createUsersWithListInput\",\n        \"consumes\": [\n          \"application/json\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"List of user object\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/User\"\n              }\n            }\n          }\n        ],\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\": \"https://petstore.swagger.io/oauth/authorize\",\n      \"flow\": \"implicit\",\n      \"scopes\": {\n        \"read:pets\": \"read your pets\",\n        \"write:pets\": \"modify pets in your account\"\n      }\n    }\n  },\n  \"definitions\": {\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    \"Pet\": {\n      \"type\": \"object\",\n      \"required\": [\n        \"name\",\n        \"photoUrls\"\n      ],\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"category\": {\n          \"$ref\": \"#/definitions/Category\"\n        },\n        \"name\": {\n          \"type\": \"string\",\n          \"example\": \"doggie\"\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            \"xml\": {\n              \"name\": \"tag\"\n            },\n            \"$ref\": \"#/definitions/Tag\"\n          }\n        },\n        \"status\": {\n          \"type\": \"string\",\n          \"description\": \"pet status in the store\",\n          \"enum\": [\n            \"available\",\n            \"pending\",\n            \"sold\"\n          ]\n        }\n      },\n      \"xml\": {\n        \"name\": \"Pet\"\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    \"ApiResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"code\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"type\": {\n          \"type\": \"string\"\n        },\n        \"message\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Order\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"petId\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"quantity\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"shipDate\": {\n          \"type\": \"string\",\n          \"format\": \"date-time\"\n        },\n        \"status\": {\n          \"type\": \"string\",\n          \"description\": \"Order Status\",\n          \"enum\": [\n            \"placed\",\n            \"approved\",\n            \"delivered\"\n          ]\n        },\n        \"complete\": {\n          \"type\": \"boolean\"\n        }\n      },\n      \"xml\": {\n        \"name\": \"Order\"\n      }\n    },\n    \"User\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"username\": {\n          \"type\": \"string\"\n        },\n        \"firstName\": {\n          \"type\": \"string\"\n        },\n        \"lastName\": {\n          \"type\": \"string\"\n        },\n        \"email\": {\n          \"type\": \"string\"\n        },\n        \"password\": {\n          \"type\": \"string\"\n        },\n        \"phone\": {\n          \"type\": \"string\"\n        },\n        \"userStatus\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"User Status\"\n        }\n      },\n      \"xml\": {\n        \"name\": \"User\"\n      }\n    }\n  },\n  \"externalDocs\": {\n    \"description\": \"Find out more about Swagger\",\n    \"url\": \"http://swagger.io\"\n  }\n}"
  },
  {
    "path": "swagger-coverage-rest-assured/build.gradle.kts",
    "content": "plugins {\n    java\n    `java-library`\n}\n\ndescription = \"Swagger Coverage Rest-Assured\"\n\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    api(project(\":swagger-coverage-commons\"))\n    implementation(\"io.rest-assured:rest-assured\")\n    implementation(\"io.swagger:swagger-models\")\n    implementation(\"io.swagger.core.v3:swagger-models\")\n    testImplementation(\"junit:junit\")\n    testImplementation(\"com.github.tomakehurst:wiremock\")\n    testImplementation(\"org.hamcrest:hamcrest\")\n}\n\ntasks {\n    test {\n        //set the workingDir to the build dir so we don't pollute the main project dir\n        //with generated test files\n        workingDir(buildDir)\n    }\n}"
  },
  {
    "path": "swagger-coverage-rest-assured/src/main/java/com/github/viclovsky/swagger/coverage/SwaggerCoverageRestAssured.java",
    "content": "package com.github.viclovsky.swagger.coverage;\n\nimport io.restassured.filter.FilterContext;\nimport io.restassured.filter.OrderedFilter;\nimport io.restassured.response.Response;\nimport io.restassured.specification.FilterableRequestSpecification;\nimport io.restassured.specification.FilterableResponseSpecification;\nimport io.swagger.models.Operation;\nimport io.swagger.models.Swagger;\nimport io.swagger.models.parameters.BodyParameter;\nimport io.swagger.models.parameters.FormParameter;\nimport io.swagger.models.parameters.HeaderParameter;\nimport io.swagger.models.parameters.PathParameter;\nimport io.swagger.models.parameters.QueryParameter;\n\nimport java.net.URI;\nimport java.nio.file.Paths;\nimport java.util.Objects;\n\nimport static com.github.viclovsky.swagger.coverage.SwaggerCoverageConstants.BODY_PARAM_NAME;\nimport static com.github.viclovsky.swagger.coverage.SwaggerCoverageConstants.OUTPUT_DIRECTORY;\nimport static io.swagger.models.Scheme.forValue;\nimport static java.lang.String.valueOf;\n\npublic class SwaggerCoverageRestAssured implements OrderedFilter {\n\n    private CoverageOutputWriter writer;\n\n    public SwaggerCoverageRestAssured(CoverageOutputWriter writer) {\n        this.writer = writer;\n    }\n\n    public SwaggerCoverageRestAssured() {\n        this.writer = new FileSystemOutputWriter(Paths.get(OUTPUT_DIRECTORY));\n    }\n\n    @Override\n    public int getOrder() {\n        return Integer.MAX_VALUE;\n    }\n\n    @Override\n    public Response filter(FilterableRequestSpecification requestSpec, FilterableResponseSpecification responseSpec, FilterContext ctx) {\n        Operation operation = new Operation();\n        requestSpec.getPathParams().forEach((n, v) -> operation.addParameter(new PathParameter().name(n).example(v)));\n        //Ignore ClassCastException for https://github.com/rest-assured/rest-assured/issues/1232\n        try {\n            requestSpec.getQueryParams().forEach((n, v) -> operation.addParameter(new QueryParameter().name(n).example(v)));\n        } catch (ClassCastException ex) {\n            requestSpec.getQueryParams().keySet().forEach(n -> operation.addParameter(new QueryParameter().name(n)));\n        }\n        try {\n            requestSpec.getFormParams().forEach((n, v) -> operation.addParameter(new FormParameter().name(n).example(v)));\n        } catch (ClassCastException ex) {\n            requestSpec.getFormParams().keySet().forEach((n -> operation.addParameter(new FormParameter().name(n))));\n        }\n        //end\n        requestSpec.getHeaders().forEach(header -> operation.addParameter(new HeaderParameter().name(header.getName())\n                .example(header.getValue())));\n\n        requestSpec.getMultiPartParams().forEach(multiPartSpecification -> operation.addParameter(new FormParameter()\n                .name(multiPartSpecification.getControlName())));\n\n        if (Objects.nonNull(requestSpec.getBody())) {\n            operation.addParameter(new BodyParameter().name(BODY_PARAM_NAME));\n        }\n\n        final Response response = ctx.next(requestSpec, responseSpec);\n\n        operation.addResponse(valueOf(response.statusCode()), new io.swagger.models.Response());\n\n        Swagger swagger = new Swagger()\n                .scheme(forValue(URI.create(requestSpec.getURI()).getScheme()))\n                .host(URI.create(requestSpec.getURI()).getHost())\n                .consumes(requestSpec.getContentType())\n                .produces(response.getContentType())\n                .path(requestSpec.getUserDefinedPath(), new io.swagger.models.Path().set(requestSpec.getMethod().toLowerCase(), operation));\n\n        writer.write(swagger);\n        return response;\n    }\n}"
  },
  {
    "path": "swagger-coverage-rest-assured/src/main/java/com/github/viclovsky/swagger/coverage/SwaggerCoverageV3RestAssured.java",
    "content": "package com.github.viclovsky.swagger.coverage;\n\nimport io.restassured.filter.FilterContext;\nimport io.restassured.filter.OrderedFilter;\nimport io.restassured.response.Response;\nimport io.restassured.specification.FilterableRequestSpecification;\nimport io.restassured.specification.FilterableResponseSpecification;\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.Content;\nimport io.swagger.v3.oas.models.media.MediaType;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.parameters.HeaderParameter;\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 io.swagger.v3.oas.models.responses.ApiResponse;\nimport io.swagger.v3.oas.models.responses.ApiResponses;\nimport io.swagger.v3.oas.models.servers.Server;\n\nimport java.net.URI;\nimport java.nio.file.Paths;\nimport java.util.Objects;\n\nimport static com.github.viclovsky.swagger.coverage.SwaggerCoverageConstants.OUTPUT_DIRECTORY;\nimport static java.lang.String.valueOf;\n\npublic class SwaggerCoverageV3RestAssured implements OrderedFilter {\n\n    private CoverageOutputWriter writer;\n\n    public SwaggerCoverageV3RestAssured(CoverageOutputWriter writer) {\n        this.writer = writer;\n    }\n\n    public SwaggerCoverageV3RestAssured() {\n        this.writer = new FileSystemOutputWriter(Paths.get(OUTPUT_DIRECTORY));\n    }\n\n    @Override\n    public int getOrder() {\n        return Integer.MAX_VALUE;\n    }\n\n    @Override\n    public Response filter(FilterableRequestSpecification requestSpec, FilterableResponseSpecification responseSpec, FilterContext ctx) {\n        Operation operation = new Operation();\n        requestSpec.getPathParams().forEach((n, v) -> operation.addParametersItem(new PathParameter().name(n).example(v)));\n        //Ignore ClassCastException for https://github.com/rest-assured/rest-assured/issues/1232\n        try {\n            requestSpec.getQueryParams().forEach((n, v) -> operation.addParametersItem(new QueryParameter().name(n).example(v)));\n        } catch (ClassCastException ex) {\n            requestSpec.getQueryParams().keySet().forEach(n -> operation.addParametersItem(new QueryParameter().name(n)));\n        }\n        requestSpec.getHeaders().forEach(header -> operation.addParametersItem(new HeaderParameter().name(header.getName())\n                .example(header.getValue())));\n\n        final Response response = ctx.next(requestSpec, responseSpec);\n\n        if (Objects.nonNull(requestSpec.getBody())) {\n            MediaType mediaType = new MediaType();\n            mediaType.setSchema(new Schema());\n            //Ignore ClassCastException for https://github.com/rest-assured/rest-assured/issues/1232\n            try {\n                requestSpec.getFormParams().forEach((n, v) -> mediaType.getSchema().addProperties(n, new Schema().example(v)));\n            } catch (ClassCastException ex) {\n                requestSpec.getFormParams().keySet().forEach((n -> mediaType.getSchema().addProperties(n, new Schema())));\n            }\n            requestSpec.getMultiPartParams().forEach(multiPartSpecification -> mediaType.getSchema().addProperties(multiPartSpecification.getControlName(), new Schema()));\n            operation.requestBody(\n                    new RequestBody().content(new Content().addMediaType(requestSpec.getContentType(), mediaType)));\n\n        }\n\n        operation.responses(new ApiResponses()\n                .addApiResponse(valueOf(response.statusCode()),\n                        new ApiResponse().content(new Content().addMediaType(response.getContentType(), new MediaType()))));\n\n        PathItem pathItem = new PathItem();\n        pathItem.operation(PathItem.HttpMethod.valueOf(requestSpec.getMethod().toUpperCase()), operation);\n        OpenAPI openAPI = new OpenAPI()\n                .addServersItem(new Server().url(URI.create(requestSpec.getURI()).getHost()))\n                .path(requestSpec.getUserDefinedPath(), pathItem);\n\n        writer.write(openAPI);\n        return response;\n    }\n}"
  },
  {
    "path": "swagger-coverage-rest-assured/src/test/java/com/github/viclovsky/swagger/coverage/RequestLoggerFilterTest.java",
    "content": "package com.github.viclovsky.swagger.coverage;\n\nimport com.github.tomakehurst.wiremock.junit.WireMockRule;\nimport io.restassured.RestAssured;\nimport io.restassured.http.Header;\nimport org.apache.http.HttpStatus;\nimport org.hamcrest.io.FileMatchers;\nimport org.junit.Before;\nimport org.junit.Rule;\nimport org.junit.Test;\nimport org.junit.rules.TemporaryFolder;\n\nimport java.io.IOException;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.nio.file.Paths;\nimport java.util.List;\nimport java.util.stream.Collectors;\nimport java.util.stream.Stream;\n\nimport static com.github.tomakehurst.wiremock.client.WireMock.aResponse;\nimport static com.github.tomakehurst.wiremock.client.WireMock.anyUrl;\nimport static com.github.tomakehurst.wiremock.client.WireMock.configureFor;\nimport static com.github.tomakehurst.wiremock.client.WireMock.get;\nimport static com.github.tomakehurst.wiremock.client.WireMock.stubFor;\nimport static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options;\nimport static com.github.viclovsky.swagger.coverage.SwaggerCoverageConstants.OUTPUT_DIRECTORY;\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.iterableWithSize;\n\npublic class RequestLoggerFilterTest {\n\n    private static final String BODY_STRING = \"Hello world!\";\n\n    @Rule\n    public WireMockRule mock = new WireMockRule(options().dynamicPort());\n\n    @Rule\n    public TemporaryFolder folder = new TemporaryFolder();\n\n    private List<Path> getPaths(Path path) {\n        try (Stream<Path> paths = Files.walk(path)) {\n            return paths.filter(Files::isRegularFile).collect(Collectors.toList());\n        } catch (IOException e) {\n            throw new RuntimeException(\"can'n walk files in swagger output directory\");\n        }\n    }\n\n    @Before\n    public void setUp() {\n        configureFor(mock.port());\n        stubFor(get(anyUrl())\n                .willReturn(aResponse().withStatus(HttpStatus.SC_OK)\n                        .withBody(BODY_STRING)));\n    }\n\n    @Test\n    public void shouldCreateDefaultOutputFolder() {\n        RestAssured.given().filter(new SwaggerCoverageRestAssured())\n                .get(mock.url(\"/hello\"));\n        assertThat(Paths.get(OUTPUT_DIRECTORY).toFile(), FileMatchers.anExistingDirectory());\n    }\n\n    @Test\n    public void shouldDumpSwaggerFile() throws IOException {\n        Path output = folder.newFolder().toPath();\n\n        RestAssured.given().filter(new SwaggerCoverageRestAssured(new FileSystemOutputWriter(output)))\n                .multiPart(\"file\", \"{}\")\n                .header(new Header(\"X-Request-ID\", \"h\"))\n                .formParam(\"form_param\", \"f\")\n                .queryParam(\"query_param\", \"q\")\n                .pathParam(\"path_param\", \"p\")\n                .get(mock.url(\"/hello/{path_param}\"));\n\n        assertThat(getPaths(output), iterableWithSize(1));\n    }\n\n\n    @Test\n    public void shouldCatchExceptionRestAssuredIssue1232() throws IOException {\n        Path output = folder.newFolder().toPath();\n\n        RestAssured.given().filter(new SwaggerCoverageRestAssured(new FileSystemOutputWriter(output)))\n                .multiPart(\"file\", \"{}\")\n                .header(new Header(\"X-Request-ID\", \"h\"))\n                .formParam(\"form_param\", \"f\", \"f2\")\n                .queryParam(\"query_param\", \"q\", \"q2\")\n                .pathParam(\"path_param\", \"p\")\n                .get(mock.url(\"/hello/{path_param}\"));\n\n        assertThat(getPaths(output), iterableWithSize(1));\n    }\n}\n"
  },
  {
    "path": "swagger-coverage-rest-assured/src/test/java/com/github/viclovsky/swagger/coverage/RequestLoggerV3FilterTest.java",
    "content": "package com.github.viclovsky.swagger.coverage;\n\nimport com.github.tomakehurst.wiremock.junit.WireMockRule;\nimport io.restassured.RestAssured;\nimport io.restassured.http.Header;\nimport org.apache.http.HttpStatus;\nimport org.hamcrest.io.FileMatchers;\nimport org.junit.Before;\nimport org.junit.Rule;\nimport org.junit.Test;\nimport org.junit.rules.TemporaryFolder;\n\nimport java.io.IOException;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.nio.file.Paths;\nimport java.util.List;\nimport java.util.stream.Collectors;\nimport java.util.stream.Stream;\n\nimport static com.github.tomakehurst.wiremock.client.WireMock.aResponse;\nimport static com.github.tomakehurst.wiremock.client.WireMock.anyUrl;\nimport static com.github.tomakehurst.wiremock.client.WireMock.configureFor;\nimport static com.github.tomakehurst.wiremock.client.WireMock.get;\nimport static com.github.tomakehurst.wiremock.client.WireMock.stubFor;\nimport static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options;\nimport static com.github.viclovsky.swagger.coverage.SwaggerCoverageConstants.OUTPUT_DIRECTORY;\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.iterableWithSize;\n\npublic class RequestLoggerV3FilterTest {\n\n    private static final String BODY_STRING = \"Hello world!\";\n\n    @Rule\n    public WireMockRule mock = new WireMockRule(options().dynamicPort());\n\n    @Rule\n    public TemporaryFolder folder = new TemporaryFolder();\n\n    private List<Path> getPaths(Path path) {\n        try (Stream<Path> paths = Files.walk(path)) {\n            return paths.filter(Files::isRegularFile).collect(Collectors.toList());\n        } catch (IOException e) {\n            throw new RuntimeException(\"can'n walk files in swagger output directory\");\n        }\n    }\n\n    @Before\n    public void setUp() {\n        configureFor(mock.port());\n        stubFor(get(anyUrl())\n                .willReturn(aResponse().withStatus(HttpStatus.SC_OK)\n                        .withBody(BODY_STRING)));\n    }\n\n    @Test\n    public void shouldCreateDefaultOutputFolder() {\n        RestAssured.given().filter(new SwaggerCoverageV3RestAssured())\n                .get(mock.url(\"/hello\"));\n        assertThat(Paths.get(OUTPUT_DIRECTORY).toFile(), FileMatchers.anExistingDirectory());\n    }\n\n    @Test\n    public void shouldDumpSwaggerFile() throws IOException {\n        Path output = folder.newFolder().toPath();\n\n        RestAssured.given().filter(new SwaggerCoverageV3RestAssured(new FileSystemOutputWriter(output)))\n                .multiPart(\"file\", \"{}\")\n                .header(new Header(\"X-Request-ID\", \"h\"))\n                .formParam(\"form_param\", \"f\")\n                .queryParam(\"query_param\", \"q\")\n                .pathParam(\"path_param\", \"p\")\n                .get(mock.url(\"/hello/{path_param}\"));\n        assertThat(getPaths(output), iterableWithSize(1));\n    }\n\n\n    @Test\n    public void shouldCatchExceptionRestAssuredIssue1232() throws IOException {\n        Path output = folder.newFolder().toPath();\n\n        RestAssured.given().filter(new SwaggerCoverageV3RestAssured(new FileSystemOutputWriter(output)))\n                .multiPart(\"file\", \"{}\")\n                .header(new Header(\"X-Request-ID\", \"h\"))\n                .formParam(\"form_param\", \"f\", \"f2\")\n                .queryParam(\"query_param\", \"q\", \"q2\")\n                .pathParam(\"path_param\", \"p\")\n                .get(mock.url(\"/hello/{path_param}\"));\n\n        assertThat(getPaths(output), iterableWithSize(1));\n    }\n}\n"
  }
]