├── .editorconfig ├── .github ├── actions │ └── action.yml ├── dependabot.yml ├── topissuebot.yml └── workflows │ ├── codeql-analysis.yml │ ├── dependency-review.yml │ ├── maven-pulls.yml │ ├── maven-v1-pulls.yml │ ├── maven-v1.yml │ ├── maven.yml │ ├── next-snapshot-v1.yml │ ├── next-snapshot.yml │ ├── prepare-release-v1.yml │ ├── prepare-release.yml │ ├── release-v1.yml │ └── release.yml ├── .gitignore ├── .whitesource ├── CI ├── CI.md ├── ghApiClient.py ├── lastRelease.py ├── lastReleaseV1.py ├── post-nextsnap-v1.sh ├── post-nextsnap.sh ├── post-release-v1.sh ├── post-release.sh ├── pre-release-v1.sh ├── pre-release.sh ├── prepare-release-v1.sh ├── prepare-release.sh ├── publishRelease.py ├── publishReleaseV1.py ├── releaseNotes.py └── releaseNotesV1.py ├── LICENSE ├── NOTICE ├── README.md ├── appveyor.yml ├── modules ├── swagger-parser-cli │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── io │ │ │ └── swagger │ │ │ └── v3 │ │ │ └── parser │ │ │ └── SwaggerParser.java │ │ └── test │ │ ├── java │ │ └── SwaggerParserCLITest.java │ │ └── resources │ │ ├── fileWithNoErrorMessages.yaml │ │ ├── fileWithValidationErrorMessages.yaml │ │ └── internal-references-in-external-files │ │ ├── external.yaml │ │ └── main.yaml ├── swagger-parser-core │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── io │ │ └── swagger │ │ └── v3 │ │ └── parser │ │ └── core │ │ ├── extensions │ │ └── SwaggerParserExtension.java │ │ └── models │ │ ├── AuthorizationValue.java │ │ ├── ParseOptions.java │ │ └── SwaggerParseResult.java ├── swagger-parser-safe-url-resolver │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── io │ │ │ └── swagger │ │ │ └── v3 │ │ │ └── parser │ │ │ └── urlresolver │ │ │ ├── PermittedUrlsChecker.java │ │ │ ├── exceptions │ │ │ └── HostDeniedException.java │ │ │ ├── matchers │ │ │ └── UrlPatternMatcher.java │ │ │ ├── models │ │ │ └── ResolvedUrl.java │ │ │ └── utils │ │ │ └── NetUtils.java │ │ └── test │ │ └── java │ │ └── io │ │ └── swagger │ │ └── v3 │ │ └── parser │ │ └── urlresolver │ │ ├── PermittedUrlsCheckerTest.java │ │ ├── matchers │ │ └── UrlPatternMatcherTest.java │ │ └── utils │ │ └── NetUtilsTest.java ├── swagger-parser-v2-converter │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── io │ │ │ │ └── swagger │ │ │ │ └── v3 │ │ │ │ └── parser │ │ │ │ └── converter │ │ │ │ ├── SwaggerConverter.java │ │ │ │ └── SwaggerInventory.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── io.swagger.v3.parser.core.extensions.SwaggerParserExtension │ │ └── test │ │ ├── java │ │ └── io │ │ │ └── swagger │ │ │ └── parser │ │ │ └── test │ │ │ └── V2ConverterTest.java │ │ └── resources │ │ ├── issue-1032.yaml │ │ ├── issue-11.json │ │ ├── issue-1113.yaml │ │ ├── issue-1164.yaml │ │ ├── issue-1261.yaml │ │ ├── issue-13.json │ │ ├── issue-1359.yaml │ │ ├── issue-14.json │ │ ├── issue-15.json │ │ ├── issue-1529.json │ │ ├── issue-16.json │ │ ├── issue-17.json │ │ ├── issue-1715.yaml │ │ ├── issue-1767.yaml │ │ ├── issue-1796.yaml │ │ ├── issue-18.json │ │ ├── issue-19.json │ │ ├── issue-2.json │ │ ├── issue-20.json │ │ ├── issue-21.json │ │ ├── issue-22.json │ │ ├── issue-23.json │ │ ├── issue-25.json │ │ ├── issue-26.json │ │ ├── issue-27.json │ │ ├── issue-28.json │ │ ├── issue-3.json │ │ ├── issue-30.json │ │ ├── issue-31.json │ │ ├── issue-32.json │ │ ├── issue-33.json │ │ ├── issue-34.json │ │ ├── issue-35.json │ │ ├── issue-36.json │ │ ├── issue-4.json │ │ ├── issue-455.json │ │ ├── issue-540.json │ │ ├── issue-597.json │ │ ├── issue-599.json │ │ ├── issue-6.json │ │ ├── issue-600.json │ │ ├── issue-647.yaml │ │ ├── issue-662.yaml │ │ ├── issue-672.json │ │ ├── issue-673.yaml │ │ ├── issue-676.json │ │ ├── issue-708.yaml │ │ ├── issue-740.yaml │ │ ├── issue-745.yaml │ │ ├── issue-755.yaml │ │ ├── issue-756.json │ │ ├── issue-758.json │ │ ├── issue-762.json │ │ ├── issue-765.yaml │ │ ├── issue-786.json │ │ ├── issue-8.json │ │ ├── issue-820.yaml │ │ ├── parameter-conversion.json │ │ ├── petstore.json │ │ ├── petstore.yaml │ │ └── swagger.json ├── swagger-parser-v3 │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── io │ │ │ └── swagger │ │ │ └── v3 │ │ │ └── parser │ │ │ ├── ObjectMapperFactory.java │ │ │ ├── OpenAPIResolver.java │ │ │ ├── OpenAPIV3Parser.java │ │ │ ├── ResolverCache.java │ │ │ ├── exception │ │ │ ├── EncodingNotSupportedException.java │ │ │ └── ReadContentException.java │ │ │ ├── extensions │ │ │ └── JsonSchemaParserExtension.java │ │ │ ├── models │ │ │ ├── RefFormat.java │ │ │ └── RefType.java │ │ │ ├── processors │ │ │ ├── CallbackProcessor.java │ │ │ ├── ComponentsProcessor.java │ │ │ ├── ExampleProcessor.java │ │ │ ├── ExternalRefProcessor.java │ │ │ ├── HeaderProcessor.java │ │ │ ├── LinkProcessor.java │ │ │ ├── OperationProcessor.java │ │ │ ├── ParameterProcessor.java │ │ │ ├── PathsProcessor.java │ │ │ ├── RequestBodyProcessor.java │ │ │ ├── ResponseProcessor.java │ │ │ ├── SchemaProcessor.java │ │ │ └── SecuritySchemeProcessor.java │ │ │ ├── reference │ │ │ ├── AbstractVisitor.java │ │ │ ├── DereferencerContext.java │ │ │ ├── DereferencersFactory.java │ │ │ ├── IdsTraverser.java │ │ │ ├── OpenAPI31Traverser.java │ │ │ ├── OpenAPIDereferencer.java │ │ │ ├── OpenAPIDereferencer31.java │ │ │ ├── Reference.java │ │ │ ├── ReferenceUtils.java │ │ │ ├── ReferenceVisitor.java │ │ │ ├── Traverser.java │ │ │ └── Visitor.java │ │ │ └── util │ │ │ ├── ClasspathHelper.java │ │ │ ├── DeserializationUtils.java │ │ │ ├── InlineModelResolver.java │ │ │ ├── ManagedValue.java │ │ │ ├── OpenAPIDeserializer.java │ │ │ ├── PathUtils.java │ │ │ ├── RefUtils.java │ │ │ ├── ReferenceValidator.java │ │ │ ├── RemoteUrl.java │ │ │ ├── ResolverFully.java │ │ │ └── SchemaTypeUtil.java │ │ └── test │ │ ├── java │ │ └── io │ │ │ └── swagger │ │ │ └── v3 │ │ │ └── parser │ │ │ ├── ObjectMapperTest.java │ │ │ ├── processors │ │ │ ├── ComponentsProcessorTest.java │ │ │ ├── ExternalRefProcessorTest.java │ │ │ ├── OperationProcessorTest.java │ │ │ ├── ParameterProcessorTest.java │ │ │ ├── PathsProcessorTest.java │ │ │ ├── ResponseProcessorTest.java │ │ │ └── SchemaProcessorTest.java │ │ │ ├── test │ │ │ ├── AnchorTest.java │ │ │ ├── CustomOpenAPIDereferencer.java │ │ │ ├── FileReferenceTest.java │ │ │ ├── JsonToYamlFileDuplicator.java │ │ │ ├── LocalReferenceTest.java │ │ │ ├── NetworkReferenceTest.java │ │ │ ├── OAI31DeserializationTest.java │ │ │ ├── OAIDeserializationTest.java │ │ │ ├── OpenAPIResolverTest.java │ │ │ ├── OpenAPIV31ParserExampleTest.java │ │ │ ├── OpenAPIV31ParserFSFullTest.java │ │ │ ├── OpenAPIV31ParserFullFlattenTest.java │ │ │ ├── OpenAPIV31ParserFullResolveFullyTest.java │ │ │ ├── OpenAPIV31ParserFullTest.java │ │ │ ├── OpenAPIV31ParserParameterIndirectTest.java │ │ │ ├── OpenAPIV31ParserParameterTest.java │ │ │ ├── OpenAPIV31ParserPathItemResolveFullyTest.java │ │ │ ├── OpenAPIV31ParserPathItemTest.java │ │ │ ├── OpenAPIV31ParserSchemaIndirectTest.java │ │ │ ├── OpenAPIV31ParserSchemaTest.java │ │ │ ├── OpenAPIV31ParserUriTest.java │ │ │ ├── OpenAPIV3ParserDynamicRefTest.java │ │ │ ├── OpenAPIV3ParserRemoteResolvingTest.java │ │ │ ├── OpenAPIV3ParserTest.java │ │ │ ├── OpenAPIV3RefTest.java │ │ │ ├── RelativeReferenceTest.java │ │ │ ├── ResolverCacheTest.java │ │ │ └── ResponseResolverTest.java │ │ │ └── util │ │ │ ├── ClasspathHelperTest.java │ │ │ ├── InlineModelResolverTest.java │ │ │ ├── OpenAPIDeserializerTest.java │ │ │ ├── PathUtilTest.java │ │ │ ├── RefUtilsTest.java │ │ │ └── RemoteUrlTest.java │ │ └── resources │ │ ├── 3.1.0 │ │ ├── basic.yaml │ │ ├── dereference │ │ │ ├── custom │ │ │ │ ├── dereferenced.yaml │ │ │ │ └── root.json │ │ │ ├── examples │ │ │ │ ├── dereferenced.yaml │ │ │ │ ├── ex.json │ │ │ │ ├── ex1.json │ │ │ │ ├── ex1a.json │ │ │ │ ├── ex1schema.json │ │ │ │ ├── ex2.json │ │ │ │ ├── ex2schema.json │ │ │ │ ├── ex3schema.json │ │ │ │ ├── example.json │ │ │ │ ├── exampleindirect.json │ │ │ │ ├── nested │ │ │ │ │ ├── domain.yaml │ │ │ │ │ ├── ex2a.json │ │ │ │ │ └── ex3a.json │ │ │ │ ├── param.json │ │ │ │ └── root.json │ │ │ ├── full │ │ │ │ ├── dereferenced.yaml │ │ │ │ ├── dereferencedflatten.yaml │ │ │ │ ├── dereferencedfully.yaml │ │ │ │ ├── ex.json │ │ │ │ ├── ex1.json │ │ │ │ ├── ex1a.json │ │ │ │ ├── ex1schema.json │ │ │ │ ├── ex2.json │ │ │ │ ├── ex2schema.json │ │ │ │ ├── ex3schema.json │ │ │ │ ├── nested │ │ │ │ │ ├── domain.yaml │ │ │ │ │ ├── ex2a.json │ │ │ │ │ └── ex3a.json │ │ │ │ └── root.json │ │ │ ├── fullFS │ │ │ │ ├── dereferenced.yaml │ │ │ │ ├── dereferencedflatten.yaml │ │ │ │ ├── dereferencedfully.yaml │ │ │ │ ├── ex.json │ │ │ │ ├── ex1.json │ │ │ │ ├── ex1a.json │ │ │ │ ├── ex1schema.json │ │ │ │ ├── ex2.json │ │ │ │ ├── ex2schema.json │ │ │ │ ├── ex3schema.json │ │ │ │ ├── nested │ │ │ │ │ ├── domain.yaml │ │ │ │ │ ├── ex2a.json │ │ │ │ │ └── ex3a.json │ │ │ │ └── root.json │ │ │ ├── parameter │ │ │ │ ├── dereferenced.yaml │ │ │ │ ├── ex.json │ │ │ │ ├── ex1.json │ │ │ │ ├── ex1a.json │ │ │ │ ├── ex1schema.json │ │ │ │ ├── ex2.json │ │ │ │ ├── ex2schema.json │ │ │ │ ├── ex3schema.json │ │ │ │ ├── nested │ │ │ │ │ ├── domain.yaml │ │ │ │ │ ├── ex2a.json │ │ │ │ │ └── ex3a.json │ │ │ │ └── root.json │ │ │ ├── parameterindirect │ │ │ │ ├── dereferenced.yaml │ │ │ │ ├── ex.json │ │ │ │ ├── ex1.json │ │ │ │ ├── ex1a.json │ │ │ │ ├── ex1schema.json │ │ │ │ ├── ex2.json │ │ │ │ ├── ex2schema.json │ │ │ │ ├── ex3schema.json │ │ │ │ ├── nested │ │ │ │ │ ├── domain.yaml │ │ │ │ │ ├── ex2a.json │ │ │ │ │ └── ex3a.json │ │ │ │ └── root.json │ │ │ ├── pathItem │ │ │ │ ├── additional-fields │ │ │ │ │ ├── dereferenced.json │ │ │ │ │ └── root.json │ │ │ │ ├── basic │ │ │ │ │ ├── dereferenced.yaml │ │ │ │ │ ├── nested │ │ │ │ │ │ └── domain.yaml │ │ │ │ │ └── root.yaml │ │ │ │ ├── callback-object │ │ │ │ │ ├── dereferenced.json │ │ │ │ │ └── root.json │ │ │ │ ├── components-path-items-external │ │ │ │ │ ├── nested │ │ │ │ │ │ └── domain.yaml │ │ │ │ │ └── root.yaml │ │ │ │ ├── components-path-items │ │ │ │ │ ├── dereferenced.json │ │ │ │ │ └── root.json │ │ │ │ ├── direct-external-circular │ │ │ │ │ ├── dereferenced.yaml │ │ │ │ │ ├── ex.json │ │ │ │ │ └── root.json │ │ │ │ ├── direct-internal-circular │ │ │ │ │ ├── dereferenced.yaml │ │ │ │ │ └── root.json │ │ │ │ ├── external-indirections │ │ │ │ │ ├── dereferenced.json │ │ │ │ │ ├── dereferenced.yaml │ │ │ │ │ ├── ex1.json │ │ │ │ │ ├── ex2.json │ │ │ │ │ └── root.json │ │ │ │ ├── external-internal-nested │ │ │ │ │ ├── dereferenced.yaml │ │ │ │ │ ├── nested │ │ │ │ │ │ └── domain.yaml │ │ │ │ │ └── root.yaml │ │ │ │ ├── external-only │ │ │ │ │ ├── dereferenced.json │ │ │ │ │ ├── dereferenced.yaml │ │ │ │ │ ├── ex.json │ │ │ │ │ └── root.json │ │ │ │ ├── ignore-external │ │ │ │ │ ├── dereferenced.json │ │ │ │ │ ├── ex.json │ │ │ │ │ └── root.json │ │ │ │ ├── indirect-external-circular │ │ │ │ │ ├── ex1.json │ │ │ │ │ ├── ex2.json │ │ │ │ │ └── root.json │ │ │ │ ├── indirect-internal-circular │ │ │ │ │ └── root.json │ │ │ │ ├── internal-external │ │ │ │ │ ├── dereferenced.json │ │ │ │ │ ├── dereferenced.yaml │ │ │ │ │ ├── ex.json │ │ │ │ │ └── root.json │ │ │ │ ├── internal-indirections │ │ │ │ │ ├── dereferenced.json │ │ │ │ │ └── root.json │ │ │ │ ├── internal-only │ │ │ │ │ ├── dereferenced.json │ │ │ │ │ └── root.json │ │ │ │ ├── invalid-pointer │ │ │ │ │ └── root.json │ │ │ │ ├── max-depth │ │ │ │ │ ├── ex1.json │ │ │ │ │ ├── ex2.json │ │ │ │ │ └── root.json │ │ │ │ ├── unresolvable-path-item │ │ │ │ │ └── root.json │ │ │ │ └── webhooks │ │ │ │ │ ├── dereferenced.json │ │ │ │ │ └── root.json │ │ │ ├── schema │ │ │ │ ├── $anchor-external │ │ │ │ │ ├── dereferenced.json │ │ │ │ │ ├── ex.json │ │ │ │ │ └── root.json │ │ │ │ ├── $anchor-internal-simple │ │ │ │ │ ├── dereferenced.json │ │ │ │ │ └── root.json │ │ │ │ ├── $anchor-internal │ │ │ │ │ ├── dereferenced.json │ │ │ │ │ └── root.json │ │ │ │ ├── $anchor-not-found │ │ │ │ │ ├── dereferenced.json │ │ │ │ │ └── root.json │ │ │ │ ├── $id-unresolvable │ │ │ │ │ ├── dereferenced.json │ │ │ │ │ └── root.json │ │ │ │ ├── $id-uri-direct │ │ │ │ │ ├── dereferenced.json │ │ │ │ │ ├── nested │ │ │ │ │ │ └── ex.json │ │ │ │ │ └── root.json │ │ │ │ ├── $id-uri-enclosing │ │ │ │ │ ├── dereferenced.json │ │ │ │ │ ├── nested │ │ │ │ │ │ └── ex.json │ │ │ │ │ └── root.json │ │ │ │ └── $id-uri-external │ │ │ │ │ ├── dereferenced.json │ │ │ │ │ ├── nested │ │ │ │ │ ├── ex.json │ │ │ │ │ └── nested │ │ │ │ │ │ └── ex.json │ │ │ │ │ └── root.json │ │ │ └── schemaindirect │ │ │ │ ├── dereferenced.yaml │ │ │ │ ├── ex.json │ │ │ │ ├── ex1.json │ │ │ │ ├── ex1a.json │ │ │ │ ├── ex1schema.json │ │ │ │ ├── ex2.json │ │ │ │ ├── ex2schema.json │ │ │ │ ├── ex3schema.json │ │ │ │ ├── nested │ │ │ │ ├── domain.yaml │ │ │ │ ├── ex2a.json │ │ │ │ └── ex3a.json │ │ │ │ └── root.json │ │ ├── issue-1801.yaml │ │ ├── issue-1821.yaml │ │ ├── issue-1975.yaml │ │ ├── oas3.1.yaml │ │ ├── petstore-3.1.yaml │ │ ├── petstore-3.1_more.yaml │ │ ├── resolve │ │ │ ├── basicref.yaml │ │ │ ├── domain.yaml │ │ │ ├── nested │ │ │ │ ├── domain.yaml │ │ │ │ └── domainref.yaml │ │ │ └── nestedref.yaml │ │ ├── schemaSiblings.yaml │ │ ├── securitySchemes31.yaml │ │ ├── siblings31.yaml │ │ └── test │ │ │ ├── basicOAS30.yaml │ │ │ └── basicOAS31.yaml │ │ ├── FlattenComposedSchemasAtComponents.yaml │ │ ├── Issue1316.yaml │ │ ├── Issue_931.json │ │ ├── Issue_948.json │ │ ├── META-INF │ │ └── services │ │ │ └── io.swagger.v3.parser.reference.OpenAPIDereferencer │ │ ├── Pet.yaml │ │ ├── additionalPropertiesFlatten.yaml │ │ ├── allOf-example │ │ └── allOf.yaml │ │ ├── allOf-properties-ext-ref │ │ ├── models │ │ │ ├── pet.json │ │ │ ├── purebred_pet.json │ │ │ └── swagger.json │ │ └── swagger.json │ │ ├── allOf-relative-file-references │ │ ├── definitions.yaml │ │ ├── models │ │ │ ├── fancy_pet.json │ │ │ └── pet.json │ │ ├── parent.yaml │ │ └── swagger.yaml │ │ ├── allOfAndRef.yaml │ │ ├── anyOf_OneOf.yaml │ │ ├── bad_format.yaml │ │ ├── billion_laughs_snake_yaml.yaml │ │ ├── blankQueryParameter.yaml │ │ ├── booleanAdditionalProperties.json │ │ ├── callbacks-issue │ │ ├── domain.yaml │ │ └── swagger.yaml │ │ ├── cant-read-deep-properties.yaml │ │ ├── classpathTest.txt │ │ ├── codegen-issue-8601.yaml │ │ ├── codegen-issue-9773 │ │ ├── domain.yaml │ │ └── openapi.yaml │ │ ├── codegen-remote-responses │ │ ├── Responses │ │ │ └── 1.0.0 │ │ │ │ └── domain.yaml │ │ └── openapi.yaml │ │ ├── composed.yaml │ │ ├── composedSchemaRef.yaml │ │ ├── definitions.yaml │ │ ├── discriminator-mapping-resolution │ │ ├── Cat.yaml │ │ ├── Dog.yaml │ │ ├── main-external-mapping-3files.yaml │ │ ├── main-external-mapping.yaml │ │ ├── main-internal-mapping.yaml │ │ ├── main-no-mapping-oneof.yaml │ │ ├── main-no-mapping.yaml │ │ ├── main-plain-mapping.yaml │ │ ├── parent-external-mapping.yaml │ │ ├── pet-internal-mapping.yaml │ │ ├── pet-no-mapping-oneof.yaml │ │ ├── pet-no-mapping.yaml │ │ ├── pet-plain-mapping.yaml │ │ ├── single-file-internal-mapping.yaml │ │ ├── single-file-no-mapping.yaml │ │ └── single-file-plain-mapping.yaml │ │ ├── domain-issue-1335.yaml │ │ ├── domain.yaml │ │ ├── duplicateHttpStatusCodes.json │ │ ├── duplicateHttpStatusCodes.yaml │ │ ├── dynamicRef │ │ └── dynamicref-example.yaml │ │ ├── empty-oas.yaml │ │ ├── empty-strings.yaml │ │ ├── emptyQueryParameter.yaml │ │ ├── example0 │ │ ├── api.json │ │ ├── config.json │ │ └── models │ │ │ ├── combination.json │ │ │ ├── combinations.json │ │ │ └── common │ │ │ ├── error.json │ │ │ └── link.json │ │ ├── exampleFlag.yaml │ │ ├── extensions-responses.yaml │ │ ├── file-reference-to-recursive-defs │ │ ├── a.yaml │ │ └── b.yaml │ │ ├── file-reference-with-vendor-ext │ │ ├── a.yaml │ │ └── b.yaml │ │ ├── flatten.json │ │ ├── flatten31.json │ │ ├── flattenArrayItems.yaml │ │ ├── flattenComposedSchemaComplete.json │ │ ├── int64example.yaml │ │ ├── integerDefault.yaml │ │ ├── internal-references-in-external-files │ │ ├── external.yaml │ │ └── main.yaml │ │ ├── internal-refs.yaml │ │ ├── issue-1015.json │ │ ├── issue-1040 │ │ ├── api.yaml │ │ └── lib │ │ │ └── lib.yaml │ │ ├── issue-1063 │ │ ├── api.yaml │ │ ├── openapi.yaml │ │ └── references.oas3.yaml │ │ ├── issue-1071-false.yaml │ │ ├── issue-1071-true.yaml │ │ ├── issue-1071.yaml │ │ ├── issue-1078 │ │ ├── api.yaml │ │ └── common.yaml │ │ ├── issue-1081 │ │ └── spec2.yaml │ │ ├── issue-1090.yaml │ │ ├── issue-1094 │ │ ├── common.yaml │ │ └── swagger.yaml │ │ ├── issue-1103 │ │ ├── domain.yaml │ │ ├── remote-parameter-swagger.yaml │ │ └── remote-pathItem-swagger.yaml │ │ ├── issue-1105 │ │ ├── domain.yaml │ │ └── swagger-api.yaml │ │ ├── issue-1108.yaml │ │ ├── issue-1119.yaml │ │ ├── issue-1147 │ │ ├── common.yaml │ │ └── issue1147.yaml │ │ ├── issue-1157 │ │ ├── allOf-example.yaml │ │ ├── anyOf-example.yaml │ │ └── oneOf-example.yaml │ │ ├── issue-1161 │ │ ├── common.yaml │ │ └── swagger.yaml │ │ ├── issue-1170 │ │ ├── common.yaml │ │ └── swagger.yaml │ │ ├── issue-1177 │ │ ├── common │ │ │ ├── common-types.yaml │ │ │ └── responses │ │ │ │ └── common-responses.yaml │ │ ├── headers │ │ │ └── common-headers.yaml │ │ └── swagger.yaml │ │ ├── issue-1211.json │ │ ├── issue-1228.json │ │ ├── issue-1261.yaml │ │ ├── issue-1266 │ │ ├── issue-1266-resolved.yaml │ │ └── issue-1266.yaml │ │ ├── issue-1292 │ │ ├── pets │ │ │ ├── def.yml │ │ │ └── pets.yml │ │ └── petstore.yml │ │ ├── issue-1309.yaml │ │ ├── issue-1319.yaml │ │ ├── issue-1352.json │ │ ├── issue-1367.yaml │ │ ├── issue-1518 │ │ ├── api.json │ │ └── models │ │ │ ├── analemmata.json │ │ │ └── common │ │ │ ├── essot.json │ │ │ ├── stunts.json │ │ │ └── tashotSipe.json │ │ ├── issue-1540 │ │ └── a.json │ │ ├── issue-1543 │ │ ├── openapi.yaml │ │ └── schemas │ │ │ ├── PingResponse.yaml │ │ │ └── _index.yaml │ │ ├── issue-1561 │ │ ├── exceptions.yml │ │ └── swagger.yaml │ │ ├── issue-1592.jar │ │ ├── issue-1621 │ │ ├── example.get.yaml │ │ ├── example.openapi.yaml │ │ └── example.post.yaml │ │ ├── issue-1658 │ │ ├── api2.yaml │ │ ├── apis.yaml │ │ └── issue1658.yaml │ │ ├── issue-1706 │ │ └── SimpleRequestResponseRef.json │ │ ├── issue-1733 │ │ ├── api.yaml │ │ └── test-endpoints.yaml │ │ ├── issue-1746 │ │ ├── pets │ │ │ ├── def.yml │ │ │ └── pets.yml │ │ └── petstore.yml │ │ ├── issue-1761.yaml │ │ ├── issue-1777 │ │ └── issue1777.yaml │ │ ├── issue-1802 │ │ └── issue1802.yaml │ │ ├── issue-1865 │ │ ├── apis │ │ │ └── foo.yaml │ │ ├── examples │ │ │ └── foo.example.yaml │ │ ├── models │ │ │ └── foo.model.yaml │ │ └── openapi30.yaml │ │ ├── issue-1878 │ │ └── test.txt │ │ ├── issue-1886 │ │ ├── components.yaml │ │ ├── openapi.yaml │ │ ├── paths │ │ │ ├── array-types-ids.yaml │ │ │ ├── array-types.yaml │ │ │ ├── map-types-ids.yaml │ │ │ ├── map-types.yaml │ │ │ ├── set-types-ids.yaml │ │ │ ├── set-types.yaml │ │ │ ├── simple-types-ids.yaml │ │ │ └── simple-types.yaml │ │ └── schemas │ │ │ ├── additional-properties.yaml │ │ │ ├── array-pojo.yaml │ │ │ ├── enum1.yaml │ │ │ ├── locale-translation-item.yaml │ │ │ ├── map-pojo.yaml │ │ │ ├── set-pojo.yaml │ │ │ ├── simple-pojo.yaml │ │ │ └── translation-item.yaml │ │ ├── issue-1891-shared-types.yaml │ │ ├── issue-1891 │ │ ├── openapi.yaml │ │ └── types │ │ │ └── local-types.yaml │ │ ├── issue-2037 │ │ ├── openapi.yaml │ │ └── paths │ │ │ └── get.yaml │ │ ├── issue-2071 │ │ ├── definitions.yaml │ │ └── openapi.yaml │ │ ├── issue-2104 │ │ ├── depth1 │ │ │ └── depth2 │ │ │ │ ├── definitions.yaml │ │ │ │ └── product │ │ │ │ └── definitions.yaml │ │ └── openapi.yaml │ │ ├── issue-289-b.yaml │ │ ├── issue-289.yaml │ │ ├── issue-339.yaml │ │ ├── issue-407 │ │ ├── full │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── index.css │ │ │ ├── index.html │ │ │ ├── oauth2-redirect.html │ │ │ ├── pets │ │ │ │ ├── def.yml │ │ │ │ ├── def2.yml │ │ │ │ ├── pets.yml │ │ │ │ └── response.yml │ │ │ ├── petstore.yml │ │ │ ├── swagger-initializer.js │ │ │ ├── swagger-ui-bundle.js │ │ │ ├── swagger-ui-bundle.js.map │ │ │ ├── swagger-ui-es-bundle-core.js │ │ │ ├── swagger-ui-es-bundle-core.js.map │ │ │ ├── swagger-ui-es-bundle.js │ │ │ ├── swagger-ui-es-bundle.js.map │ │ │ ├── swagger-ui-standalone-preset.js │ │ │ ├── swagger-ui-standalone-preset.js.map │ │ │ ├── swagger-ui.css │ │ │ ├── swagger-ui.css.map │ │ │ ├── swagger-ui.js │ │ │ └── swagger-ui.js.map │ │ ├── pets │ │ │ ├── def.yml │ │ │ ├── def2.yml │ │ │ ├── pets.yml │ │ │ └── response.yml │ │ └── petstore.yml │ │ ├── issue-480.yaml │ │ ├── issue-505 │ │ ├── pets │ │ │ ├── def.yml │ │ │ └── pets.yml │ │ └── petstore.yml │ │ ├── issue-705.yaml │ │ ├── issue-742.json │ │ ├── issue-822-b.yaml │ │ ├── issue-822.yaml │ │ ├── issue-834 │ │ ├── components │ │ │ ├── response1.yaml │ │ │ ├── response2.yaml │ │ │ └── schema.yaml │ │ └── index.yaml │ │ ├── issue-837-853-1131 │ │ ├── components.yaml │ │ ├── external-operation.yaml │ │ └── main.yaml │ │ ├── issue-901 │ │ ├── ref.yaml │ │ ├── ref2.yaml │ │ ├── spec.yaml │ │ └── spec2.yaml │ │ ├── issue-913 │ │ ├── BO │ │ │ ├── Common │ │ │ │ └── BasicComponents.json │ │ │ └── Resource │ │ │ │ └── ApiSpecificationBO.json │ │ └── BS │ │ │ └── ApiSpecification.yaml │ │ ├── issue-975 │ │ ├── contract │ │ │ └── openapi.yaml │ │ └── types │ │ │ ├── responses.yaml │ │ │ └── types.yaml │ │ ├── issue-983-domain.yaml │ │ ├── issue-983.yaml │ │ ├── issue-984-simple.yaml │ │ ├── issue1148.yaml │ │ ├── issue1169-noSplit.yaml │ │ ├── issue1169.yaml │ │ ├── issue1190 │ │ └── issue1190.yaml │ │ ├── issue1335.yaml │ │ ├── issue1398.yaml │ │ ├── issue1630.yaml │ │ ├── issue1637.yaml │ │ ├── issue1644.yaml │ │ ├── issue1758.yaml │ │ ├── issue1902 │ │ └── 1902-string-example-in-component.yaml │ │ ├── issue203 │ │ └── issue203AllOf.yaml │ │ ├── issue2081 │ │ └── openapi.yaml │ │ ├── issue251.yaml │ │ ├── issue99.yaml │ │ ├── issue_1039.yaml │ │ ├── issue_108.yaml │ │ ├── issue_146.yaml │ │ ├── issue_16.yaml │ │ ├── issue_2125.yaml │ │ ├── issue_277.yaml │ │ ├── issue_286.yaml │ │ ├── issue_286_Allergy.yaml │ │ ├── issue_286_Pet.yaml │ │ ├── issue_286_PetList.yaml │ │ ├── issue_357.yaml │ │ ├── issue_358.yaml │ │ ├── issue_360.yaml │ │ ├── issue_469.yaml │ │ ├── issue_643.yaml │ │ ├── issue_855.yaml │ │ ├── issue_877.yaml │ │ ├── issue_884.yaml │ │ ├── issue_911.yaml │ │ ├── issue_918.yaml │ │ ├── issue_998.yaml │ │ ├── linkIssue.yaml │ │ ├── main.yaml │ │ ├── media-type-null-example.yaml │ │ ├── nested-file-references │ │ ├── book.yaml │ │ ├── common │ │ │ ├── common2 │ │ │ │ ├── bar.yaml │ │ │ │ └── issue-328-bar.yaml │ │ │ ├── issue-328-paging.yaml │ │ │ ├── issue-336-currency_code.json │ │ │ ├── issue-336-error.json │ │ │ ├── issue-336-error_details.json │ │ │ ├── issue-336-link_description.json │ │ │ ├── issue-421-defns.yaml │ │ │ ├── issue-421-parms.yaml │ │ │ ├── paging.yaml │ │ │ ├── paging2.yaml │ │ │ └── pagingWithFolderRef.yaml │ │ ├── common2 │ │ │ └── bar.yaml │ │ ├── components │ │ │ └── entities.yaml │ │ ├── events.yaml │ │ ├── eventsCase9.yaml │ │ ├── eventsWithItems.yaml │ │ ├── eventsWithPaging.yaml │ │ ├── issue-304.json │ │ ├── issue-304_child.json │ │ ├── issue-304_parent.json │ │ ├── issue-306.yaml │ │ ├── issue-308.yaml │ │ ├── issue-310.yaml │ │ ├── issue-312.yaml │ │ ├── issue-314.yaml │ │ ├── issue-316.yaml │ │ ├── issue-323.yaml │ │ ├── issue-328-events.yaml │ │ ├── issue-328.yaml │ │ ├── issue-335-bar.json │ │ ├── issue-335.json │ │ ├── issue-336.json │ │ ├── issue-340-Bar.json │ │ ├── issue-340.json │ │ ├── issue-421.yaml │ │ ├── paging.yaml │ │ └── title │ │ │ ├── issue-336-copy.json │ │ │ ├── issue-336-datatypes.json │ │ │ ├── issue-336-reservation.json │ │ │ └── issue-336-title.json │ │ ├── nested-items-references │ │ ├── a.yaml │ │ └── b.yaml │ │ ├── nested-network-references │ │ ├── common │ │ │ ├── issue-330-entities.yaml │ │ │ ├── issue-330-paging.yaml │ │ │ └── issue-330-users.yaml │ │ ├── issue-330.yaml │ │ ├── issue-411-remote2.yaml │ │ ├── issue-411-server.yaml │ │ ├── issue-454-components.yaml │ │ └── issue-454.yaml │ │ ├── nested-references-2 │ │ ├── main.yaml │ │ └── schemas │ │ │ ├── greeting-message.yaml │ │ │ ├── greeting-response.yaml │ │ │ └── shared-defs.yaml │ │ ├── nested-references-3 │ │ ├── greeting-message.yaml │ │ ├── greeting-response.yaml │ │ ├── main.yaml │ │ └── shared-defs.yaml │ │ ├── nested-references-4 │ │ ├── main.yaml │ │ └── schemas │ │ │ ├── shared-defs.yaml │ │ │ └── sub │ │ │ ├── greeting-message.yaml │ │ │ └── greeting-response.yaml │ │ ├── nested-references │ │ ├── a.yaml │ │ └── b.yaml │ │ ├── null-example.yaml │ │ ├── null-full-example-resolved.yaml │ │ ├── null-full-example.yaml │ │ ├── oapi-reference-test │ │ ├── components │ │ │ ├── referent.yaml │ │ │ ├── response-with-reference.yaml │ │ │ └── schema-with-reference.yaml │ │ └── index.yaml │ │ ├── oapi-reference-test2 │ │ ├── components │ │ │ ├── referent.yaml │ │ │ └── schema-with-reference.yaml │ │ └── index.yaml │ │ ├── oas.yaml │ │ ├── oas2.yaml.template │ │ ├── oas3-refs-test │ │ ├── components │ │ │ ├── callbacks │ │ │ │ └── pets.id.order-vaccination │ │ │ │ │ └── post │ │ │ │ │ └── vaccination_complete.json │ │ │ ├── examples │ │ │ │ └── parameter │ │ │ │ │ └── header │ │ │ │ │ └── correlation_id.json │ │ │ ├── parameters │ │ │ │ └── header │ │ │ │ │ └── adopt │ │ │ │ │ └── correlation_id.json │ │ │ └── schemas │ │ │ │ ├── adoption_request.json │ │ │ │ ├── adoption_request_for_bird.json │ │ │ │ ├── adoption_request_for_cat.json │ │ │ │ ├── adoption_request_for_dog.json │ │ │ │ ├── adoption_request_for_fish.json │ │ │ │ ├── adoption_request_for_lizard.json │ │ │ │ ├── alias_array.json │ │ │ │ ├── animal_type.json │ │ │ │ ├── correlation_id.json │ │ │ │ ├── date_no_time.json │ │ │ │ ├── error.json │ │ │ │ ├── error_details.json │ │ │ │ ├── full_name.json │ │ │ │ ├── link_description.json │ │ │ │ ├── link_schema.json │ │ │ │ ├── links.json │ │ │ │ ├── vaccination_order.json │ │ │ │ ├── vaccination_record.json │ │ │ │ ├── vaccinations.json │ │ │ │ ├── vaccine.json │ │ │ │ ├── vaccine_id.json │ │ │ │ └── vaccine_name.json │ │ ├── openapi.json │ │ └── paths │ │ │ └── adopt.json │ │ ├── oas3.yaml.template │ │ ├── oas31.yaml.template │ │ ├── oas4.yaml │ │ ├── objectExample.yaml │ │ ├── odin.yaml │ │ ├── oneof-anyof.yaml │ │ ├── oneof_name_conflict │ │ ├── oneOf-external-ref-name-conflict.yaml │ │ └── relative_ref │ │ │ └── OtherPets.yaml │ │ ├── over-quoted-example.yaml │ │ ├── parametersAsNumbers │ │ ├── domain.yaml │ │ └── swagger.yaml │ │ ├── petstore-codegen.yaml │ │ ├── petstore.yaml │ │ ├── recursive.yaml │ │ ├── recursive2.yaml │ │ ├── ref-without-component │ │ ├── a.yaml │ │ └── b.yaml │ │ ├── refComponents.yaml │ │ ├── refEnum.yaml │ │ ├── referenceFiles │ │ ├── TS29510_Nnrf_NFManagement.yaml │ │ ├── TS29571_CommonData.yaml │ │ └── nbsf-management.yaml │ │ ├── refs-name-conflict │ │ ├── a.yaml │ │ ├── b.yaml │ │ └── c.yaml │ │ ├── relative-file-references │ │ ├── json │ │ │ ├── models │ │ │ │ ├── conflict.json │ │ │ │ ├── error.json │ │ │ │ ├── example.json │ │ │ │ ├── foo.json │ │ │ │ ├── health.json │ │ │ │ ├── localreference.json │ │ │ │ ├── pet.json │ │ │ │ └── reflex.json │ │ │ ├── parameters │ │ │ │ └── params.json │ │ │ ├── parent.json │ │ │ ├── paths │ │ │ │ └── healthPath.json │ │ │ └── responses │ │ │ │ └── errorResponses.json │ │ └── yaml │ │ │ ├── models │ │ │ ├── conflict.yaml │ │ │ ├── error.yaml │ │ │ ├── example.yaml │ │ │ ├── foo.yaml │ │ │ ├── health.yaml │ │ │ ├── localreference.yaml │ │ │ ├── pet.yaml │ │ │ └── reflex.yaml │ │ │ ├── parameters │ │ │ └── params.yaml │ │ │ ├── parent.yaml │ │ │ ├── paths │ │ │ └── healthPath.yaml │ │ │ └── responses │ │ │ └── errorResponses.yaml │ │ ├── relative-issue │ │ ├── api.yaml │ │ └── subfolder │ │ │ └── domain.yaml │ │ ├── relative-references-example │ │ ├── _responses │ │ │ └── UnexpectedError.yaml │ │ ├── _schemas │ │ │ └── error.yaml │ │ ├── openapi.yaml │ │ └── security │ │ │ ├── _resources │ │ │ ├── authorize.yaml │ │ │ └── login.yaml │ │ │ └── _schemas │ │ │ └── usernamepasswordcredentials.yaml │ │ ├── relative-upper-directory │ │ ├── Paths │ │ │ └── Address.yaml │ │ ├── Schemas │ │ │ └── schema.yaml │ │ └── swagger.yaml │ │ ├── relative-with-url │ │ ├── relative-with-local.yaml │ │ └── relative-with-url.yaml │ │ ├── relative │ │ ├── additionalProperties.yaml │ │ └── globals.yaml │ │ ├── relativeParent │ │ ├── root │ │ │ └── root.yaml │ │ └── specs │ │ │ └── specs.yaml │ │ ├── relativeTest.yaml │ │ ├── remote_references │ │ ├── remote_callback.yaml │ │ ├── remote_example.yaml │ │ ├── remote_link.yaml │ │ ├── remote_parameter.yaml.template │ │ ├── remote_pathItem.yaml.template │ │ ├── remote_ref_json.json │ │ ├── remote_ref_yaml.yaml │ │ ├── remote_requestBody.yaml │ │ ├── remote_responses.yaml.template │ │ ├── remote_schema.yaml │ │ └── remote_securityScheme.yaml │ │ ├── resolve-external-ref │ │ ├── failedToResolveExternalRefs.yaml │ │ ├── pathItems.yaml │ │ └── schemas.yaml │ │ ├── resolve-flatten-SH-configuration-test.yaml │ │ ├── resolve-fully-map.yaml │ │ ├── resolve-responses-test.yaml │ │ ├── resolverIssue │ │ ├── Beta-1-swagger.yaml │ │ └── DOCUMENTATION_DOMAIN-3.0.0-domain.yaml │ │ ├── resources │ │ └── urn_jsonschema_com_issinc_odin_display_CreatePlan.json │ │ ├── safeResolving │ │ ├── oas30SafeUrlResolvingWithLocalhost.yaml │ │ ├── oas30SafeUrlResolvingWithPetstore.yaml │ │ ├── oas31SafeUrlResolvingWithLocalhost.yaml │ │ └── oas31SafeUrlResolvingWithPetstore.yaml │ │ ├── same-refs-different-model-domain.yaml │ │ ├── same-refs-different-model-valid.yaml │ │ ├── same-refs-different-model.yaml │ │ ├── sample │ │ ├── SwaggerPetstore.yaml │ │ ├── pets.yaml │ │ └── schema.yaml │ │ ├── sampleWithMinimumValues.yaml │ │ ├── schemas-default-value │ │ ├── default.yaml │ │ ├── defaultNull.yaml │ │ ├── defaultNullAndNullableFalse.yaml │ │ └── defaultNullAndNullableTrue.yaml │ │ ├── simple.yaml │ │ ├── simpleAllOf.yaml │ │ ├── skipMatches.yaml │ │ ├── space in name │ │ └── issue-1572.yaml │ │ ├── style-explode.yaml │ │ ├── swagger.json │ │ ├── swos-443 │ │ ├── ref.yaml │ │ └── root.yaml │ │ ├── test.yaml │ │ ├── test2.yaml │ │ ├── testPattern.yaml │ │ ├── testRegressionIssue1236.yaml │ │ ├── thing.yaml │ │ ├── troublesome.yaml │ │ ├── unexpectedNullValues.yaml │ │ ├── validation │ │ └── path-parameter-validation.yaml │ │ ├── version-missing.yaml │ │ └── xyz.yaml └── swagger-parser │ ├── pom.xml │ └── src │ ├── main │ └── java │ │ └── io │ │ └── swagger │ │ └── parser │ │ └── OpenAPIParser.java │ └── test │ ├── java │ └── io │ │ └── swagger │ │ └── parser │ │ └── OpenAPIParserTest.java │ └── resources │ ├── Issue-783 │ ├── issue-783-b.yaml │ └── issue-783.yaml │ ├── apiWithMultipleTags.json │ ├── definitions.yaml │ ├── duplicateOperationId.json │ ├── dynamicRef │ └── dynamicref-example.yaml │ ├── exampleSpecs │ └── specs │ │ ├── common │ │ ├── confirmMessageType_v01.json │ │ ├── confirmMessageType_v02.json │ │ ├── dateType_v01.json │ │ ├── linkType_v01.json │ │ └── simpleIDType_v01.json │ │ ├── issue1553.yaml │ │ └── my-domain │ │ └── test-api │ │ └── v1 │ │ ├── schemas │ │ ├── test-api-schema_v01.json │ │ └── test-api-schema_v02.json │ │ └── test-api-swagger_v1.json │ ├── issue-1143.json │ ├── issue-901 │ └── CDK-Global-Int │ │ └── Domain-Service │ │ └── 2.0.0.yaml │ ├── issue-934.yaml │ ├── issue1070.yaml │ ├── issue1086.yaml │ ├── issue1608.json │ ├── issue1685.json │ ├── issue749-main.yaml │ ├── issue749-reference.yaml │ ├── issue768-main.yaml │ ├── issue768-reference.yaml │ ├── issue799.json │ ├── issue892-main.yaml │ ├── issue895.yaml │ ├── issue959.json │ ├── issue959PathLevelDuplication.json │ ├── issue_1433-resolve-schema-without-type.yaml │ ├── issue_879.yaml │ ├── petstore.yaml │ ├── reusableParametersWithExternalRef.json │ ├── spec.yaml │ └── specs2 │ ├── common │ ├── confirmMessageType_v01.json │ ├── dateType_v01.json │ ├── linkType_v01.json │ └── simpleIDType_v01.json │ └── my-domain │ └── test-api │ └── v1 │ ├── schemas │ └── test-api-schema_v01.json │ └── test-api-swagger_v1.json └── pom.xml /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | # A special property that should be specified at the top of the file outside of 4 | # any sections. Set to true to stop .editor config file search on current file 5 | root = true 6 | 7 | [*] 8 | # Indentation style 9 | # Possible values - tab, space 10 | indent_style = space 11 | 12 | # File character encoding 13 | # Possible values - latin1, utf-8, utf-16be, utf-16le 14 | charset = utf-8 15 | 16 | [modules/swagger-parser-v3/src/test/resources/**/*.json] 17 | trim_trailing_whitespace = false 18 | insert_final_newline = false 19 | [modules/swagger-parser-v3/src/test/resources/**/*.yaml] 20 | trim_trailing_whitespace = false 21 | insert_final_newline = false 22 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "maven" 4 | directory: "/" 5 | schedule: 6 | interval: "daily" 7 | ignore: 8 | - dependency-name: "*" 9 | update-types: ["version-update:semver-major"] 10 | -------------------------------------------------------------------------------- /.github/topissuebot.yml: -------------------------------------------------------------------------------- 1 | labelName: ":thumbsup: Top Issue!" 2 | labelColor: "f442c2" 3 | numberOfIssuesToLabel: 5 4 | -------------------------------------------------------------------------------- /.github/workflows/dependency-review.yml: -------------------------------------------------------------------------------- 1 | name: 'Dependency Review' 2 | on: [pull_request] 3 | 4 | permissions: 5 | contents: read 6 | 7 | jobs: 8 | dependency-review: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: 'Checkout Repository' 12 | uses: actions/checkout@v4 13 | - name: Dependency Review 14 | uses: actions/dependency-review-action@v3 15 | with: 16 | fail-on-severity: high 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | *.ipr 3 | *.iws 4 | atlassian-ide-plugin.xml 5 | .idea/ 6 | target/ 7 | .DS_Store 8 | .classpath 9 | .project 10 | .settings/ 11 | modules/swagger-parser/src/test/resources/relative-file-references/yaml 12 | **/test-output/* 13 | dependency-reduced-pom.xml 14 | *.pyc 15 | /bin/ 16 | -------------------------------------------------------------------------------- /.whitesource: -------------------------------------------------------------------------------- 1 | { 2 | "settingsInheritedFrom": "swagger-api/whitesource-config@main", 3 | "scanSettings": { 4 | "baseBranches": ["master", "v1"] 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /CI/lastRelease.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import ghApiClient 4 | 5 | def getLastReleaseTag(): 6 | content = ghApiClient.readUrl('repos/swagger-api/swagger-parser/releases') 7 | for l in content: 8 | draft = l["draft"] 9 | tag = l["tag_name"] 10 | if str(draft) != 'True' and tag.startswith("v2"): 11 | return tag[1:] 12 | 13 | # main 14 | def main(): 15 | result = getLastReleaseTag() 16 | print(result) 17 | 18 | # here start main 19 | main() 20 | 21 | -------------------------------------------------------------------------------- /CI/lastReleaseV1.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import ghApiClient 4 | 5 | def getLastReleaseTag(): 6 | content = ghApiClient.readUrl('repos/swagger-api/swagger-parser/releases') 7 | for l in content: 8 | draft = l["draft"] 9 | tag = l["tag_name"] 10 | if str(draft) != 'True' and tag.startswith("v1"): 11 | return tag[1:] 12 | 13 | # main 14 | def main(): 15 | result = getLastReleaseTag() 16 | print(result) 17 | 18 | # here start main 19 | main() 20 | 21 | -------------------------------------------------------------------------------- /CI/post-nextsnap-v1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CUR=$(pwd) 4 | TMPDIR="$(dirname -- "${0}")" 5 | 6 | SC_RELEASE_TAG="v$SC_VERSION" 7 | 8 | ##################### 9 | ### update the version to next snapshot in maven project with set version 10 | ##################### 11 | mvn versions:set -DnewVersion="${SC_NEXT_VERSION}-SNAPSHOT" 12 | mvn versions:commit 13 | -------------------------------------------------------------------------------- /CI/post-nextsnap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CUR=$(pwd) 4 | TMPDIR="$(dirname -- "${0}")" 5 | 6 | SC_RELEASE_TAG="v$SC_VERSION" 7 | 8 | ##################### 9 | ### update the version to next snapshot in maven project with set version 10 | ##################### 11 | mvn versions:set -DnewVersion="${SC_NEXT_VERSION}-SNAPSHOT" 12 | mvn versions:commit 13 | -------------------------------------------------------------------------------- /CI/post-release-v1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CUR=$(pwd) 4 | TMPDIR="$(dirname -- "${0}")" 5 | 6 | SC_RELEASE_TAG="v$SC_VERSION" 7 | 8 | ##################### 9 | ### publish pre-prepared release (tag is created) 10 | ##################### 11 | python $CUR/CI/publishReleaseV1.py "$SC_RELEASE_TAG" 12 | 13 | ##################### 14 | ### update the version to next snapshot in maven project with set version 15 | ##################### 16 | mvn versions:set -DnewVersion="${SC_NEXT_VERSION}-SNAPSHOT" 17 | mvn versions:commit 18 | -------------------------------------------------------------------------------- /CI/post-release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CUR=$(pwd) 4 | TMPDIR="$(dirname -- "${0}")" 5 | 6 | SC_RELEASE_TAG="v$SC_VERSION" 7 | 8 | ##################### 9 | ### publish pre-prepared release (tag is created) 10 | ##################### 11 | python $CUR/CI/publishRelease.py "$SC_RELEASE_TAG" 12 | 13 | ##################### 14 | ### update the version to next snapshot in maven project with set version 15 | ##################### 16 | mvn versions:set -DnewVersion="${SC_NEXT_VERSION}-SNAPSHOT" 17 | mvn versions:commit 18 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | # http://www.appveyor.com/docs/appveyor-yml 2 | environment: 3 | matrix: 4 | - JAVA_HOME: C:\Program Files\Java\jdk1.8.0 5 | install: 6 | # Log versions for debugging 7 | - java -version 8 | - mvn --version 9 | build_script: 10 | - mvn --batch-mode -DskipTests package 11 | test_script: 12 | - mvn --batch-mode test verify install 13 | cache: 14 | - C:\Users\appveyor\.m2 15 | -------------------------------------------------------------------------------- /modules/swagger-parser-cli/src/test/resources/internal-references-in-external-files/external.yaml: -------------------------------------------------------------------------------- 1 | common: 2 | allOf: 3 | - $ref: "#/core" 4 | - type: object 5 | properties: 6 | attribute: 7 | type: string 8 | direct: 9 | $ref: "#/core" 10 | referenced: 11 | type: array 12 | items: 13 | $ref: "#/core" 14 | 15 | core: 16 | type: object 17 | properties: 18 | coreAttribute: 19 | type: string 20 | inner: 21 | $ref: "#/innerCore" 22 | 23 | innerCore: 24 | type: object 25 | properties: 26 | innerCoreAttribute: 27 | type: string 28 | -------------------------------------------------------------------------------- /modules/swagger-parser-core/src/main/java/io/swagger/v3/parser/core/extensions/SwaggerParserExtension.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.parser.core.extensions; 2 | 3 | import io.swagger.v3.parser.core.models.AuthorizationValue; 4 | import io.swagger.v3.parser.core.models.ParseOptions; 5 | import io.swagger.v3.parser.core.models.SwaggerParseResult; 6 | 7 | import java.util.List; 8 | 9 | public interface SwaggerParserExtension { 10 | SwaggerParseResult readLocation(String url, List auth, ParseOptions options); 11 | 12 | SwaggerParseResult readContents(String swaggerAsString, List auth, ParseOptions options); 13 | } 14 | -------------------------------------------------------------------------------- /modules/swagger-parser-safe-url-resolver/src/main/java/io/swagger/v3/parser/urlresolver/exceptions/HostDeniedException.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.parser.urlresolver.exceptions; 2 | 3 | public class HostDeniedException extends Exception { 4 | public HostDeniedException(String message) { 5 | super(message); 6 | } 7 | 8 | public HostDeniedException(String message, Throwable e) { 9 | super(message, e); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /modules/swagger-parser-v2-converter/src/main/resources/META-INF/services/io.swagger.v3.parser.core.extensions.SwaggerParserExtension: -------------------------------------------------------------------------------- 1 | io.swagger.v3.parser.converter.SwaggerConverter -------------------------------------------------------------------------------- /modules/swagger-parser-v2-converter/src/test/resources/issue-1032.yaml: -------------------------------------------------------------------------------- 1 | swagger: '2.0' 2 | basePath: "/" 3 | info: 4 | version: "1" 5 | title: "x" 6 | 7 | schemes: 8 | - https 9 | consumes: 10 | - application/json 11 | produces: 12 | - application/json 13 | paths: 14 | /data: 15 | get: 16 | operationId: "getData" 17 | parameters: 18 | - $ref: '#/parameters/unixTimestampQuery' 19 | responses: 20 | '403': 21 | description: Forbidden 22 | parameters: 23 | unixTimestampQuery: 24 | in: query 25 | name: unixTimestamp 26 | type: integer 27 | format: int64 28 | -------------------------------------------------------------------------------- /modules/swagger-parser-v2-converter/src/test/resources/issue-11.json: -------------------------------------------------------------------------------- 1 | { 2 | "swagger": "2.0", 3 | "info": { 4 | "version": "1.0", 5 | "title": "Minimal Example" 6 | }, 7 | "host": "api.example.com", 8 | "schemes": [ 9 | "http" 10 | ], 11 | "paths": {} 12 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v2-converter/src/test/resources/issue-1113.yaml: -------------------------------------------------------------------------------- 1 | swagger: '2.0' 2 | info: 3 | title: Test for Issue 1113 4 | version: 1.0.0 5 | basePath: /test 6 | paths: 7 | /ping: 8 | get: 9 | summary: test 10 | description: 'test' 11 | operationId: pingOp 12 | responses: 13 | '200': 14 | description: OK 15 | -------------------------------------------------------------------------------- /modules/swagger-parser-v2-converter/src/test/resources/issue-1261.yaml: -------------------------------------------------------------------------------- 1 | swagger: '2.0' 2 | info: 3 | title: Conversion test 4 | version: '1.0.0' 5 | paths: {} 6 | 7 | definitions: 8 | Foo: 9 | type: object 10 | properties: 11 | foo: 12 | type: string 13 | Bar: 14 | type: object 15 | properties: 16 | bar1: 17 | $ref: '#/definitions/Foo' # This $ref is converted properly to `#/components/schemas` 18 | bar2: 19 | allOf: 20 | - $ref: '#/definitions/Foo' # This $ref remains as `#/definitions` -------------------------------------------------------------------------------- /modules/swagger-parser-v2-converter/src/test/resources/issue-13.json: -------------------------------------------------------------------------------- 1 | { 2 | "swagger": "2.0", 3 | "info": { 4 | "version": "1.0", 5 | "title": "Minimal Example" 6 | }, 7 | "externalDocs": { 8 | "description": "Learn more about this API", 9 | "url": "http://docs.example.com" 10 | }, 11 | "host": "api.example.com", 12 | "schemes": [ 13 | "http" 14 | ], 15 | "paths": {} 16 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v2-converter/src/test/resources/issue-1715.yaml: -------------------------------------------------------------------------------- 1 | swagger: '2.0' 2 | info: 3 | title: Test for Issue 1715 4 | version: 1.0.0 5 | paths: 6 | /foo: 7 | post: 8 | operationId: doFoo 9 | parameters: 10 | - in: body 11 | name: body 12 | schema: 13 | $ref: '#/definitions/SomeObj' 14 | required: true 15 | x-foo: bar 16 | responses: 17 | '200': 18 | description: OK 19 | definitions: 20 | SomeObj: 21 | type: string 22 | minLength: 1 23 | maxLength: 3 24 | pattern: ^[0-9]+$ -------------------------------------------------------------------------------- /modules/swagger-parser-v2-converter/src/test/resources/issue-1796.yaml: -------------------------------------------------------------------------------- 1 | swagger: "2.0" 2 | info: 3 | title: composed model conversion test 4 | version: 1.0.0 5 | paths: 6 | /composed: 7 | get: 8 | operationId: composed 9 | responses: 10 | "200": 11 | description: OK 12 | schema: 13 | $ref: "#/definitions/ComposedModel" 14 | definitions: 15 | BaseModel: 16 | type: object 17 | required: 18 | - uuid 19 | properties: 20 | uuid: 21 | type: string 22 | ComposedModel: 23 | type: object 24 | required: 25 | - name 26 | allOf: 27 | - $ref: "#/definitions/BaseModel" 28 | properties: 29 | name: 30 | type: string 31 | -------------------------------------------------------------------------------- /modules/swagger-parser-v2-converter/src/test/resources/issue-18.json: -------------------------------------------------------------------------------- 1 | { 2 | "swagger": "2.0", 3 | "info": { 4 | "version": "1.0", 5 | "title": "Operation with externalDocs" 6 | }, 7 | "paths": { 8 | "/pets": { 9 | "get": { 10 | "externalDocs": { 11 | "description": "Learn more about `GET /something`", 12 | "url": "http://docs.example.com" 13 | }, 14 | "responses": { 15 | "200": { 16 | "description": "OK" 17 | } 18 | } 19 | } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v2-converter/src/test/resources/issue-21.json: -------------------------------------------------------------------------------- 1 | { 2 | "swagger": "2.0", 3 | "info": { 4 | "version": "1.0", 5 | "title": "File response" 6 | }, 7 | "paths": { 8 | "/file": { 9 | "get": { 10 | "produces": [ 11 | "application/pdf" 12 | ], 13 | "responses": { 14 | "200": { 15 | "description": "OK", 16 | "schema": { 17 | "type": "file" 18 | } 19 | } 20 | } 21 | } 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v2-converter/src/test/resources/issue-22.json: -------------------------------------------------------------------------------- 1 | { 2 | "swagger": "2.0", 3 | "info": { 4 | "version": "1.0", 5 | "title": "Response references" 6 | }, 7 | "host": "httpbin.org", 8 | "paths": {} 9 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v2-converter/src/test/resources/issue-23.json: -------------------------------------------------------------------------------- 1 | { 2 | "swagger": "2.0", 3 | "info": { 4 | "version": "1.0", 5 | "title": "test" 6 | }, 7 | "paths": {}, 8 | "definitions": { 9 | "MapOfObjects": { 10 | "type": "object", 11 | "additionalProperties": { 12 | "$ref": "#/definitions/Object" 13 | } 14 | }, 15 | "Object": { 16 | "type": "object" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v2-converter/src/test/resources/issue-25.json: -------------------------------------------------------------------------------- 1 | { 2 | "swagger": "2.0", 3 | "info": { 4 | "version": "1.0", 5 | "title": "test" 6 | }, 7 | "paths": { 8 | "/foo": { 9 | "get": { 10 | "responses": { 11 | "200": { 12 | "description": "OK" 13 | } 14 | } 15 | } 16 | }, 17 | "/foo2": { 18 | "$ref": "#/paths/~1foo" 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v2-converter/src/test/resources/issue-27.json: -------------------------------------------------------------------------------- 1 | { 2 | "swagger": "2.0", 3 | "info": { 4 | "version": "1.0", 5 | "title": "Model with discriminator" 6 | }, 7 | "paths": {}, 8 | "definitions": { 9 | "Pet": { 10 | "type": "object", 11 | "discriminator": "petType", 12 | "properties": { 13 | "name": { 14 | "type": "string" 15 | }, 16 | "petType": { 17 | "type": "string" 18 | } 19 | }, 20 | "required": [ 21 | "name", 22 | "petType" 23 | ] 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v2-converter/src/test/resources/issue-3.json: -------------------------------------------------------------------------------- 1 | { 2 | "swagger": "2.0", 3 | "info": { 4 | "title": "test", 5 | "version": "0.0.0" 6 | }, 7 | "host": "petstore.swagger.io", 8 | "basePath": "/api", 9 | "schemes": [ 10 | "http" 11 | ], 12 | "paths": {} 13 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v2-converter/src/test/resources/issue-31.json: -------------------------------------------------------------------------------- 1 | { 2 | "swagger": "2.0", 3 | "info": { 4 | "title": "test", 5 | "version": "0.0.0" 6 | }, 7 | "paths": {} 8 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v2-converter/src/test/resources/issue-647.yaml: -------------------------------------------------------------------------------- 1 | swagger: '2.0' 2 | info: 3 | title: some title 4 | version: '1.0' 5 | host: 'localhost:8000' 6 | schemes: 7 | - http 8 | - https 9 | paths: {} 10 | definitions: 11 | A: 12 | type: string 13 | parameters: 14 | b: 15 | name: e 16 | in: body 17 | schema: 18 | $ref: '#/definitions/A' 19 | -------------------------------------------------------------------------------- /modules/swagger-parser-v2-converter/src/test/resources/issue-662.yaml: -------------------------------------------------------------------------------- 1 | swagger: "2.0" 2 | info: 3 | version: "1.0" 4 | title: "Examples" 5 | paths: 6 | -------------------------------------------------------------------------------- /modules/swagger-parser-v2-converter/src/test/resources/issue-745.yaml: -------------------------------------------------------------------------------- 1 | swagger: '2.0' 2 | info: 3 | description: 'Test' 4 | version: 1.0.0 5 | title: OpenAPI Test 6 | license: 7 | name: Apache-2.0 8 | url: 'http://www.apache.org/licenses/LICENSE-2.0.html' 9 | host: petstore.swagger.io 10 | basePath: /v2 -------------------------------------------------------------------------------- /modules/swagger-parser-v2-converter/src/test/resources/issue-755.yaml: -------------------------------------------------------------------------------- 1 | swagger: '2.0' 2 | host: petstore.swagger.io 3 | basePath: /v2 4 | schemes: 5 | - http 6 | paths: 7 | /ping: 8 | post: 9 | summary: test 10 | description: 'test it' 11 | operationId: pingOp 12 | responses: 13 | '200': 14 | description: OK -------------------------------------------------------------------------------- /modules/swagger-parser-v2-converter/src/test/resources/issue-758.json: -------------------------------------------------------------------------------- 1 | { 2 | "swagger" : "2.0", 3 | "info" : { 4 | "version" : "1", 5 | "title" : "EchoSoap" 6 | }, 7 | "paths" : { 8 | "/echo" : { 9 | "post" : { 10 | "parameters" : [ { 11 | "name": "sort", 12 | "in": "query", 13 | "required": false, 14 | "enum": [ 15 | "forks", 16 | "stars", 17 | "updated" 18 | ], 19 | "description": "If not provided, results are sorted by best match." 20 | }], 21 | "responses" : { 22 | "200" : { 23 | "description" : "Dummy response" 24 | } 25 | } 26 | } 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/exception/EncodingNotSupportedException.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.parser.exception; 2 | 3 | public class EncodingNotSupportedException extends RuntimeException { 4 | private static final long serialVersionUID = 3686905713011188803L; 5 | 6 | public EncodingNotSupportedException(String encoding) { 7 | super(String.format("Encoding `%s` is not supported by JRE", encoding)); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/exception/ReadContentException.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.parser.exception; 2 | 3 | /** 4 | * Happens when it's unable to read content from file or other resource 5 | */ 6 | public class ReadContentException extends RuntimeException { 7 | private static final long serialVersionUID = 4720926576862628428L; 8 | 9 | public ReadContentException(String message, Throwable cause) { 10 | super(message, cause); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/models/RefFormat.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.parser.models; 2 | 3 | /** 4 | * Created by gracekarina on 16/06/17. 5 | */ 6 | public enum RefFormat { 7 | URL, 8 | RELATIVE, 9 | INTERNAL 10 | } 11 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/models/RefType.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.parser.models; 2 | 3 | /** 4 | * Created by gracekarina on 16/06/17. 5 | */ 6 | public enum RefType { 7 | COMPONENTS("#/components/"), 8 | SCHEMAS("#/components/schemas/"), 9 | PATH("#/paths/"); 10 | 11 | private final String internalPrefix; 12 | 13 | RefType(final String prefix) { 14 | this.internalPrefix = prefix; 15 | } 16 | 17 | /** 18 | * The prefix in an internal reference of this type. 19 | */ 20 | public String getInternalPrefix() { 21 | return internalPrefix; 22 | } 23 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/reference/OpenAPIDereferencer.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.parser.reference; 2 | import java.util.Iterator; 3 | 4 | public interface OpenAPIDereferencer { 5 | 6 | boolean canDereference(DereferencerContext context); 7 | void dereference(DereferencerContext context, Iterator chain); 8 | 9 | Traverser buildTraverser(DereferencerContext context); 10 | 11 | public Visitor buildReferenceVisitor(DereferencerContext context, Reference reference, Traverser traverser); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/reference/Traverser.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.parser.reference; 2 | 3 | import io.swagger.v3.oas.models.OpenAPI; 4 | 5 | public interface Traverser { 6 | OpenAPI traverse(OpenAPI openAPI, Visitor visitor) throws Exception; 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/util/ManagedValue.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.parser.util; 2 | 3 | import java.net.URL; 4 | 5 | public interface ManagedValue { 6 | 7 | boolean process(URL url); 8 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/java/io/swagger/v3/parser/ObjectMapperTest.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.parser; 2 | 3 | import com.fasterxml.jackson.databind.ObjectMapper; 4 | import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; 5 | import org.junit.Assert; 6 | import org.junit.Test; 7 | 8 | public class ObjectMapperTest { 9 | @Test 10 | public void testJavaTimeModule() { 11 | ObjectMapper mapper = ObjectMapperFactory.createJson(); 12 | Assert.assertTrue("JavaTimeModule found?", 13 | mapper.getRegisteredModuleIds().contains(new JavaTimeModule().getTypeId())); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/custom/dereferenced.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.1.0 2 | servers: 3 | - url: / 4 | paths: 5 | /externalref: 6 | get: 7 | description: ExternalRef domain 8 | operationId: ExternalRef PathItem 9 | responses: 10 | "200": 11 | description: OK 12 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/custom/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "paths": { 4 | "/externalref": { 5 | "$ref": "http://example.com/custom/nested/domain.yaml#/components/pathItems/ExternalRef" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/examples/ex.json: -------------------------------------------------------------------------------- 1 | { 2 | "externalParameter": { 3 | "name": "externalParameter", 4 | "in": "query", 5 | "description": "this is parameter stored in external file", 6 | "required": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/examples/ex1.json: -------------------------------------------------------------------------------- 1 | { 2 | "$ref": "./ex2.json#/~1path3" 3 | } 4 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/examples/ex1a.json: -------------------------------------------------------------------------------- 1 | { 2 | "indirection3": { 3 | "$ref": "./nested/ex2a.json#/indirection3" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/examples/ex1schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$defs": { 3 | "Indirection": { 4 | "$ref": "./ex2schema.json#/$defs/Indirection" 5 | }, 6 | "IndirectionSiblings": { 7 | "$ref": "./ex2schema.json#/$defs/IndirectionSiblings", 8 | "description": "overwritten desc IndirectionSiblings ex1schema" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/examples/ex2.json: -------------------------------------------------------------------------------- 1 | { 2 | "/path3": { 3 | "summary": "path item summary", 4 | "description": "path item description", 5 | "get": {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/examples/ex2schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$defs": { 3 | "Indirection": { 4 | "$ref": "./ex3schema.json" 5 | }, 6 | "IndirectionSiblings": { 7 | "$ref": "./ex3schema.json", 8 | "description": "overwritten desc IndirectionSiblings ex2schema" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/examples/ex3schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "description": "desc IndirectionSiblings ex3schema", 4 | "properties": { 5 | "prop1": { 6 | "type": "string" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/examples/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "externalDirectExample": { 3 | "summary": "externalDirectExample", 4 | "description": "example.json", 5 | "value": { 6 | "foo": "bar" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/examples/exampleindirect.json: -------------------------------------------------------------------------------- 1 | { 2 | "externalIndirectExample": { 3 | "summary": "externalIndirectExample", 4 | "description": "exampleindirect.json", 5 | "value": { 6 | "foo": "bar" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/examples/nested/ex2a.json: -------------------------------------------------------------------------------- 1 | { 2 | "indirection3": { 3 | "$ref": "./ex3a.json#/externalParameter3" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/examples/nested/ex3a.json: -------------------------------------------------------------------------------- 1 | { 2 | "externalParameter3": { 3 | "name": "externalParameter3", 4 | "in": "query", 5 | "description": "this is parameter stored in external file 3", 6 | "required": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/examples/param.json: -------------------------------------------------------------------------------- 1 | { 2 | "externalDirectParameter": { 3 | "name": "externalDirectParameter", 4 | "in": "query", 5 | "description": "this is externalDirectParameter stored in external file", 6 | "required": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/full/ex.json: -------------------------------------------------------------------------------- 1 | { 2 | "externalParameter": { 3 | "name": "externalParameter", 4 | "in": "query", 5 | "description": "externalParameter ex", 6 | "required": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/full/ex1.json: -------------------------------------------------------------------------------- 1 | { 2 | "$ref": "./ex2.json#/~1path3" 3 | } 4 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/full/ex1a.json: -------------------------------------------------------------------------------- 1 | { 2 | "indirection3": { 3 | "$ref": "./nested/ex2a.json#/indirection3" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/full/ex1schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$defs": { 3 | "Indirection": { 4 | "$ref": "./ex2schema.json#/$defs/Indirection" 5 | }, 6 | "IndirectionSiblings": { 7 | "$ref": "./ex2schema.json#/$defs/IndirectionSiblings", 8 | "description": "IndirectionSiblings ex1schema" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/full/ex2.json: -------------------------------------------------------------------------------- 1 | { 2 | "/path3": { 3 | "summary": "path item summary", 4 | "description": "/path3 ex2", 5 | "get": {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/full/ex2schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$defs": { 3 | "Indirection": { 4 | "$ref": "./ex3schema.json" 5 | }, 6 | "IndirectionSiblings": { 7 | "$ref": "./ex3schema.json", 8 | "description": "IndirectionSiblings ex2schema" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/full/ex3schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "description": "VALUE ex3schema", 4 | "properties": { 5 | "prop1": { 6 | "type": "string" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/full/nested/ex2a.json: -------------------------------------------------------------------------------- 1 | { 2 | "indirection3": { 3 | "$ref": "./ex3a.json#/externalParameter3" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/full/nested/ex3a.json: -------------------------------------------------------------------------------- 1 | { 2 | "externalParameter3": { 3 | "name": "externalParameter3", 4 | "in": "query", 5 | "description": "externalParameter3 nested/ex3a", 6 | "required": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/fullFS/ex.json: -------------------------------------------------------------------------------- 1 | { 2 | "externalParameter": { 3 | "name": "externalParameter", 4 | "in": "query", 5 | "description": "externalParameter ex", 6 | "required": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/fullFS/ex1.json: -------------------------------------------------------------------------------- 1 | { 2 | "$ref": "./ex2.json#/~1path3" 3 | } 4 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/fullFS/ex1a.json: -------------------------------------------------------------------------------- 1 | { 2 | "indirection3": { 3 | "$ref": "./nested/ex2a.json#/indirection3" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/fullFS/ex1schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$defs": { 3 | "Indirection": { 4 | "$ref": "./ex2schema.json#/$defs/Indirection" 5 | }, 6 | "IndirectionSiblings": { 7 | "$ref": "./ex2schema.json#/$defs/IndirectionSiblings", 8 | "description": "IndirectionSiblings ex1schema" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/fullFS/ex2.json: -------------------------------------------------------------------------------- 1 | { 2 | "/path3": { 3 | "summary": "path item summary", 4 | "description": "/path3 ex2", 5 | "get": {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/fullFS/ex2schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$defs": { 3 | "Indirection": { 4 | "$ref": "./ex3schema.json" 5 | }, 6 | "IndirectionSiblings": { 7 | "$ref": "./ex3schema.json", 8 | "description": "IndirectionSiblings ex2schema" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/fullFS/ex3schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "description": "VALUE ex3schema", 4 | "properties": { 5 | "prop1": { 6 | "type": "string" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/fullFS/nested/ex2a.json: -------------------------------------------------------------------------------- 1 | { 2 | "indirection3": { 3 | "$ref": "./ex3a.json#/externalParameter3" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/fullFS/nested/ex3a.json: -------------------------------------------------------------------------------- 1 | { 2 | "externalParameter3": { 3 | "name": "externalParameter3", 4 | "in": "query", 5 | "description": "externalParameter3 nested/ex3a", 6 | "required": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/parameter/ex.json: -------------------------------------------------------------------------------- 1 | { 2 | "externalParameter": { 3 | "name": "externalParameter", 4 | "in": "query", 5 | "description": "this is parameter stored in external file", 6 | "required": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/parameter/ex1.json: -------------------------------------------------------------------------------- 1 | { 2 | "$ref": "./ex2.json#/~1path3" 3 | } 4 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/parameter/ex1a.json: -------------------------------------------------------------------------------- 1 | { 2 | "indirection3": { 3 | "$ref": "./nested/ex2a.json#/indirection3" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/parameter/ex1schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$defs": { 3 | "Indirection": { 4 | "$ref": "./ex2schema.json#/$defs/Indirection" 5 | }, 6 | "IndirectionSiblings": { 7 | "$ref": "./ex2schema.json#/$defs/IndirectionSiblings", 8 | "description": "overwritten desc IndirectionSiblings ex1schema" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/parameter/ex2.json: -------------------------------------------------------------------------------- 1 | { 2 | "/path3": { 3 | "summary": "path item summary", 4 | "description": "path item description", 5 | "get": {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/parameter/ex2schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$defs": { 3 | "Indirection": { 4 | "$ref": "./ex3schema.json" 5 | }, 6 | "IndirectionSiblings": { 7 | "$ref": "./ex3schema.json", 8 | "description": "overwritten desc IndirectionSiblings ex2schema" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/parameter/ex3schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "description": "desc IndirectionSiblings ex3schema", 4 | "properties": { 5 | "prop1": { 6 | "type": "string" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/parameter/nested/ex2a.json: -------------------------------------------------------------------------------- 1 | { 2 | "indirection3": { 3 | "$ref": "./ex3a.json#/externalParameter3" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/parameter/nested/ex3a.json: -------------------------------------------------------------------------------- 1 | { 2 | "externalParameter3": { 3 | "name": "externalParameter3", 4 | "in": "query", 5 | "description": "this is parameter stored in external file 3", 6 | "required": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/parameterindirect/dereferenced.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.1.0 2 | servers: 3 | - url: / 4 | components: 5 | parameters: 6 | externalRef: 7 | name: externalParameter 8 | in: query 9 | description: externalRef root 10 | required: true 11 | style: form 12 | explode: true 13 | externalRefIndirectPointer: 14 | description: externalRefIndirectPointer root 15 | $ref: "#/components/parameters/externalRefIndirect3" 16 | externalRefIndirect3: 17 | name: externalParameter3 18 | in: query 19 | description: externalRefIndirect3 root 20 | required: true 21 | style: form 22 | explode: true 23 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/parameterindirect/ex.json: -------------------------------------------------------------------------------- 1 | { 2 | "externalParameter": { 3 | "name": "externalParameter", 4 | "in": "query", 5 | "description": "externalParameter ex", 6 | "required": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/parameterindirect/ex1.json: -------------------------------------------------------------------------------- 1 | { 2 | "$ref": "./ex2.json#/~1path3" 3 | } 4 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/parameterindirect/ex1a.json: -------------------------------------------------------------------------------- 1 | { 2 | "indirection3": { 3 | "$ref": "./nested/ex2a.json#/indirection3" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/parameterindirect/ex1schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$defs": { 3 | "Indirection": { 4 | "$ref": "./ex2schema.json#/$defs/Indirection" 5 | }, 6 | "IndirectionSiblings": { 7 | "$ref": "./ex2schema.json#/$defs/IndirectionSiblings", 8 | "description": "IndirectionSiblings ex1schema" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/parameterindirect/ex2.json: -------------------------------------------------------------------------------- 1 | { 2 | "/path3": { 3 | "summary": "path item summary", 4 | "description": "path item description", 5 | "get": {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/parameterindirect/ex2schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$defs": { 3 | "Indirection": { 4 | "$ref": "./ex3schema.json" 5 | }, 6 | "IndirectionSiblings": { 7 | "$ref": "./ex3schema.json", 8 | "description": "IndirectionSiblings ex2schema" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/parameterindirect/ex3schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "description": "VALUE ex3schema", 4 | "properties": { 5 | "prop1": { 6 | "type": "string" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/parameterindirect/nested/ex2a.json: -------------------------------------------------------------------------------- 1 | { 2 | "indirection3": { 3 | "$ref": "./ex3a.json#/externalParameter3" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/parameterindirect/nested/ex3a.json: -------------------------------------------------------------------------------- 1 | { 2 | "externalParameter3": { 3 | "name": "externalParameter3", 4 | "in": "query", 5 | "description": "this is parameter stored in external file 3", 6 | "required": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/additional-fields/dereferenced.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "openapi": "3.1.0", 4 | "paths": { 5 | "/path1": { 6 | "summary": "path1 item summary", 7 | "description": "path item description", 8 | "get": {} 9 | }, 10 | "/path2": { 11 | "summary": "path2 item summary", 12 | "description": "path item description", 13 | "get": {} 14 | } 15 | } 16 | } 17 | ] 18 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/additional-fields/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "paths": { 4 | "/path1": { 5 | "$ref": "#/paths/~1path2", 6 | "summary": "path1 item summary" 7 | }, 8 | "/path2": { 9 | "summary": "path2 item summary", 10 | "description": "path item description", 11 | "get": {} 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/basic/dereferenced.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swagger-api/swagger-parser/3a4ad2eceeb3b39679abc722f2f2b62e8f7cb6f1/modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/basic/dereferenced.yaml -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/callback-object/dereferenced.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "openapi": "3.1.0", 4 | "components": { 5 | "callbacks": { 6 | "callback1": { 7 | "{$method}": { 8 | "description": "description of callback2" 9 | } 10 | }, 11 | "callback2": { 12 | "{$method}": { 13 | "description": "description of callback2" 14 | } 15 | } 16 | } 17 | } 18 | } 19 | ] 20 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/callback-object/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "components": { 4 | "callbacks": { 5 | "callback1": { 6 | "$ref": "#/components/callbacks/callback2" 7 | }, 8 | "callback2": { 9 | "{$method}": { 10 | "description": "description of callback2" 11 | } 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/components-path-items/dereferenced.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "openapi": "3.1.0", 4 | "components": { 5 | "pathItems": { 6 | "pathItem1": { 7 | "description": "description of path item 1" 8 | }, 9 | "pathItem2": { 10 | "description": "description of path item 1" 11 | } 12 | } 13 | } 14 | } 15 | ] 16 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/components-path-items/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "components": { 4 | "pathItems": { 5 | "pathItem1": { 6 | "description": "description of path item 1" 7 | }, 8 | "pathItem2": { 9 | "$ref": "#/components/pathItems/pathItem1" 10 | } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/direct-external-circular/dereferenced.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swagger-api/swagger-parser/3a4ad2eceeb3b39679abc722f2f2b62e8f7cb6f1/modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/direct-external-circular/dereferenced.yaml -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/direct-external-circular/ex.json: -------------------------------------------------------------------------------- 1 | { 2 | "$ref": "./root.json#/paths/~1path1" 3 | } 4 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/direct-external-circular/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "paths": { 4 | "/path1": { 5 | "$ref": "./ex.json" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/direct-internal-circular/dereferenced.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swagger-api/swagger-parser/3a4ad2eceeb3b39679abc722f2f2b62e8f7cb6f1/modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/direct-internal-circular/dereferenced.yaml -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/direct-internal-circular/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "paths": { 4 | "/path1": { 5 | "$ref": "#/paths/~1path2" 6 | }, 7 | "/path2": { 8 | "$ref": "#/paths/~1path1" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/external-indirections/dereferenced.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "openapi": "3.1.0", 4 | "paths": { 5 | "/path1": { 6 | "summary": "path item summary", 7 | "description": "path item description", 8 | "get": {} 9 | } 10 | } 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/external-indirections/dereferenced.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swagger-api/swagger-parser/3a4ad2eceeb3b39679abc722f2f2b62e8f7cb6f1/modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/external-indirections/dereferenced.yaml -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/external-indirections/ex1.json: -------------------------------------------------------------------------------- 1 | { 2 | "$ref": "./ex2.json#/~1path3" 3 | } 4 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/external-indirections/ex2.json: -------------------------------------------------------------------------------- 1 | { 2 | "/path3": { 3 | "summary": "path item summary", 4 | "description": "path item description", 5 | "get": {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/external-indirections/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "paths": { 4 | "/path1": { 5 | "$ref": "./ex1.json" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/external-internal-nested/dereferenced.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swagger-api/swagger-parser/3a4ad2eceeb3b39679abc722f2f2b62e8f7cb6f1/modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/external-internal-nested/dereferenced.yaml -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/external-only/dereferenced.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "openapi": "3.1.0", 4 | "paths": { 5 | "/path1": { 6 | "summary": "path item summary", 7 | "description": "path item description", 8 | "get": {} 9 | } 10 | } 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/external-only/dereferenced.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swagger-api/swagger-parser/3a4ad2eceeb3b39679abc722f2f2b62e8f7cb6f1/modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/external-only/dereferenced.yaml -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/external-only/ex.json: -------------------------------------------------------------------------------- 1 | { 2 | "/path2": { 3 | "summary": "path item summary", 4 | "description": "path item description", 5 | "get": {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/external-only/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "paths": { 4 | "/path1": { 5 | "$ref": "./ex.json#/~1path2" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/ignore-external/dereferenced.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "openapi": "3.1.0", 4 | "paths": { 5 | "/path1": { 6 | "$ref": "./ex.json#/~1path2" 7 | } 8 | } 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/ignore-external/ex.json: -------------------------------------------------------------------------------- 1 | { 2 | "/path2": { 3 | "summary": "path item summary", 4 | "description": "path item description", 5 | "get": {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/ignore-external/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "paths": { 4 | "/path1": { 5 | "$ref": "./ex.json#/~1path2" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/indirect-external-circular/ex1.json: -------------------------------------------------------------------------------- 1 | { 2 | "$ref": "./ex2.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/indirect-external-circular/ex2.json: -------------------------------------------------------------------------------- 1 | { 2 | "$ref": "./root.json#/paths/~1path1" 3 | } 4 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/indirect-external-circular/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "paths": { 4 | "/path1": { 5 | "$ref": "./ex1.json" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/indirect-internal-circular/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "paths": { 4 | "/path1": { 5 | "$ref": "#/paths/~1path2" 6 | }, 7 | "/path2": { 8 | "$ref": "#/paths/~1path3" 9 | }, 10 | "/path3": { 11 | "$ref": "#/paths/~1path1" 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/internal-external/dereferenced.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "openapi": "3.1.0", 4 | "paths": { 5 | "/path1": { 6 | "summary": "path item summary", 7 | "description": "path item description", 8 | "get": {} 9 | }, 10 | "/path3": { 11 | "summary": "path item summary", 12 | "description": "path item description", 13 | "get": {} 14 | }, 15 | "/path4": { 16 | "summary": "path item summary", 17 | "description": "path item description", 18 | "get": {} 19 | } 20 | } 21 | } 22 | ] 23 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/internal-external/dereferenced.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swagger-api/swagger-parser/3a4ad2eceeb3b39679abc722f2f2b62e8f7cb6f1/modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/internal-external/dereferenced.yaml -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/internal-external/ex.json: -------------------------------------------------------------------------------- 1 | { 2 | "/path2": { 3 | "summary": "path item summary", 4 | "description": "path item description", 5 | "get": {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/internal-external/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "paths": { 4 | "/path1": { 5 | "$ref": "./ex.json#/~1path2" 6 | }, 7 | "/path3": { 8 | "$ref": "#/paths/~1path4" 9 | }, 10 | "/path4": { 11 | "summary": "path item summary", 12 | "description": "path item description", 13 | "get": {} 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/internal-indirections/dereferenced.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "openapi": "3.1.0", 4 | "paths": { 5 | "/path1": { 6 | "summary": "path item summary", 7 | "description": "path item description", 8 | "get": {} 9 | }, 10 | "/path2": { 11 | "summary": "path item summary", 12 | "description": "path item description", 13 | "get": {} 14 | }, 15 | "/path3": { 16 | "summary": "path item summary", 17 | "description": "path item description", 18 | "get": {} 19 | } 20 | } 21 | } 22 | ] 23 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/internal-indirections/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "paths": { 4 | "/path1": { 5 | "$ref": "#/paths/~1path2" 6 | }, 7 | "/path2": { 8 | "$ref": "#/paths/~1path3" 9 | }, 10 | "/path3": { 11 | "summary": "path item summary", 12 | "description": "path item description", 13 | "get": {} 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/internal-only/dereferenced.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "openapi": "3.1.0", 4 | "paths": { 5 | "/path1": { 6 | "summary": "path item summary", 7 | "description": "path item description", 8 | "get": {} 9 | }, 10 | "/path2": { 11 | "summary": "path item summary", 12 | "description": "path item description", 13 | "get": {} 14 | } 15 | } 16 | } 17 | ] 18 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/internal-only/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "paths": { 4 | "/path1": { 5 | "$ref": "#/paths/~1path2" 6 | }, 7 | "/path2": { 8 | "summary": "path item summary", 9 | "description": "path item description", 10 | "get": {} 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/invalid-pointer/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "paths": { 4 | "/path1": { 5 | "$ref": "invalid-pointer" 6 | }, 7 | "/path2": { 8 | "summary": "path item summary", 9 | "description": "path item description", 10 | "get": {} 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/max-depth/ex1.json: -------------------------------------------------------------------------------- 1 | { 2 | "$ref": "./ex2.json#/~1path3" 3 | } 4 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/max-depth/ex2.json: -------------------------------------------------------------------------------- 1 | { 2 | "/path3": { 3 | "summary": "path item summary", 4 | "description": "path item description", 5 | "get": {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/max-depth/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "paths": { 4 | "/path1": { 5 | "$ref": "./ex1.json" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/unresolvable-path-item/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "paths": { 4 | "/path1": { 5 | "$ref": "#/paths/invalid-pointer" 6 | }, 7 | "/path2": { 8 | "summary": "path item summary", 9 | "description": "path item description", 10 | "get": {} 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/webhooks/dereferenced.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "openapi": "3.1.0", 4 | "webhooks": { 5 | "hook": { 6 | "description": "description of path item 1" 7 | } 8 | }, 9 | "components": { 10 | "pathItems": { 11 | "pathItem1": { 12 | "description": "description of path item 1" 13 | } 14 | } 15 | } 16 | } 17 | ] 18 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/pathItem/webhooks/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "webhooks": { 4 | "hook": { 5 | "$ref": "#/components/pathItems/pathItem1" 6 | } 7 | }, 8 | "components": { 9 | "pathItems": { 10 | "pathItem1": { 11 | "description": "description of path item 1" 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schema/$anchor-external/ex.json: -------------------------------------------------------------------------------- 1 | { 2 | "$defs": { 3 | "UserProfile": { 4 | "$anchor": "user-profile", 5 | "properties": { 6 | "firstName": { 7 | "type": "string" 8 | }, 9 | "lastName": { 10 | "type": "string" 11 | } 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schema/$anchor-external/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "components": { 4 | "schemas": { 5 | "User": { 6 | "type": "object", 7 | "properties": { 8 | "login": { 9 | "type": "string" 10 | }, 11 | "password": { 12 | "type": "string" 13 | }, 14 | "profile": { 15 | "$ref": "./ex.json#user-profile" 16 | } 17 | } 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schema/$anchor-internal-simple/dereferenced.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "openapi": "3.1.0", 4 | "components": { 5 | "schemas": { 6 | "User": { 7 | "type": "object", 8 | "properties": { 9 | "profile": { 10 | "$ref": "#user-profile" 11 | } 12 | } 13 | }, 14 | "UserProfile": { 15 | "$anchor": "user-profile", 16 | "type": "string" 17 | } 18 | } 19 | } 20 | } 21 | ] 22 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schema/$anchor-internal-simple/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "components": { 4 | "schemas": { 5 | "User": { 6 | "type": "object", 7 | "properties": { 8 | "profile": { 9 | "$ref": "#user-profile" 10 | } 11 | } 12 | }, 13 | "UserProfile": { 14 | "$anchor": "user-profile", 15 | "type": "string" 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schema/$anchor-not-found/dereferenced.json: -------------------------------------------------------------------------------- 1 | { 2 | "components" : { 3 | "schemas" : { 4 | "User" : { 5 | "type" : "object", 6 | "properties" : { 7 | "login" : { 8 | "type" : "string" 9 | }, 10 | "password" : { 11 | "type" : "string" 12 | }, 13 | "profile" : { 14 | "$ref" : "#user-profile" 15 | } 16 | } 17 | } 18 | } 19 | }, 20 | "openapi" : "3.1.0", 21 | "servers" : [ { 22 | "url" : "/" 23 | } ] 24 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schema/$anchor-not-found/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "components": { 4 | "schemas": { 5 | "User": { 6 | "type": "object", 7 | "properties": { 8 | "login": { 9 | "type": "string" 10 | }, 11 | "password": { 12 | "type": "string" 13 | }, 14 | "profile": { 15 | "$ref": "#user-profile" 16 | } 17 | } 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schema/$id-unresolvable/dereferenced.json: -------------------------------------------------------------------------------- 1 | { 2 | "components" : { 3 | "schemas" : { 4 | "User" : { 5 | "type" : "object", 6 | "$id" : "./schemas/", 7 | "properties" : { 8 | "login" : { 9 | "type" : "string" 10 | }, 11 | "password" : { 12 | "type" : "string" 13 | }, 14 | "profile" : { 15 | "$id" : "./nested/", 16 | "$ref" : "./ex.json" 17 | } 18 | } 19 | } 20 | } 21 | }, 22 | "openapi" : "3.1.0", 23 | "servers" : [ { 24 | "url" : "/" 25 | } ] 26 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schema/$id-unresolvable/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "components": { 4 | "schemas": { 5 | "User": { 6 | "$id": "./schemas/", 7 | "type": "object", 8 | "properties": { 9 | "login": { 10 | "type": "string" 11 | }, 12 | "password": { 13 | "type": "string" 14 | }, 15 | "profile": { 16 | "$id": "./nested/", 17 | "$ref": "./ex.json" 18 | } 19 | } 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schema/$id-uri-direct/nested/ex.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "properties": { 4 | "avatar": { 5 | "type": "string" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schema/$id-uri-direct/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "components": { 4 | "schemas": { 5 | "User": { 6 | "type": "object", 7 | "properties": { 8 | "login": { 9 | "type": "string" 10 | }, 11 | "password": { 12 | "type": "string" 13 | }, 14 | "profile": { 15 | "$id": "./nested/", 16 | "$ref": "./ex.json" 17 | } 18 | } 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schema/$id-uri-enclosing/nested/ex.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "properties": { 4 | "avatar": { 5 | "type": "string" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schema/$id-uri-enclosing/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "components": { 4 | "schemas": { 5 | "User": { 6 | "$id": "./nested/", 7 | "type": "object", 8 | "properties": { 9 | "login": { 10 | "type": "string" 11 | }, 12 | "password": { 13 | "type": "string" 14 | }, 15 | "profile": { 16 | "$ref": "./ex.json" 17 | } 18 | } 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schema/$id-uri-external/dereferenced.json: -------------------------------------------------------------------------------- 1 | { 2 | "components" : { 3 | "schemas" : { 4 | "User" : { 5 | "type" : "object", 6 | "properties" : { 7 | "profile" : { 8 | "type" : "object", 9 | "$id" : "./nested/", 10 | "properties" : { 11 | "avatar" : { 12 | "type" : "string" 13 | } 14 | } 15 | } 16 | } 17 | } 18 | } 19 | }, 20 | "openapi" : "3.1.0", 21 | "servers" : [ { 22 | "url" : "/" 23 | } ] 24 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schema/$id-uri-external/nested/ex.json: -------------------------------------------------------------------------------- 1 | { 2 | "$defs": { 3 | "UserProfile": { 4 | "$id": "./nested/", 5 | "$ref": "./ex.json" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schema/$id-uri-external/nested/nested/ex.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "properties": { 4 | "avatar": { 5 | "type": "string" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schema/$id-uri-external/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "components": { 4 | "schemas": { 5 | "User": { 6 | "type": "object", 7 | "properties": { 8 | "profile": { 9 | "$ref": "./nested/ex.json#/$defs/UserProfile" 10 | } 11 | } 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schemaindirect/dereferenced.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.1.0 2 | servers: 3 | - url: / 4 | components: 5 | schemas: 6 | Indirection: 7 | type: object 8 | description: desc ex3schema 9 | properties: 10 | prop1: 11 | type: string 12 | IndirectionSiblings: 13 | type: object 14 | description: overwritten desc IndirectionSiblings root 15 | properties: 16 | prop1: 17 | type: string 18 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schemaindirect/ex.json: -------------------------------------------------------------------------------- 1 | { 2 | "externalParameter": { 3 | "name": "externalParameter", 4 | "in": "query", 5 | "description": "this is parameter stored in external file", 6 | "required": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schemaindirect/ex1.json: -------------------------------------------------------------------------------- 1 | { 2 | "$ref": "./ex2.json#/~1path3" 3 | } 4 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schemaindirect/ex1a.json: -------------------------------------------------------------------------------- 1 | { 2 | "indirection3": { 3 | "$ref": "./nested/ex2a.json#/indirection3" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schemaindirect/ex1schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$defs": { 3 | "Indirection": { 4 | "$ref": "./ex2schema.json#/$defs/Indirection" 5 | }, 6 | "IndirectionSiblings": { 7 | "$ref": "./ex2schema.json#/$defs/IndirectionSiblings", 8 | "description": "overwritten desc IndirectionSiblings ex1schema" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schemaindirect/ex2.json: -------------------------------------------------------------------------------- 1 | { 2 | "/path3": { 3 | "summary": "path item summary", 4 | "description": "path item description", 5 | "get": {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schemaindirect/ex2schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$defs": { 3 | "Indirection": { 4 | "$ref": "./ex3schema.json" 5 | }, 6 | "IndirectionSiblings": { 7 | "$ref": "./ex3schema.json", 8 | "description": "overwritten desc IndirectionSiblings ex2schema" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schemaindirect/ex3schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "description": "desc ex3schema", 4 | "properties": { 5 | "prop1": { 6 | "type": "string" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schemaindirect/nested/ex2a.json: -------------------------------------------------------------------------------- 1 | { 2 | "indirection3": { 3 | "$ref": "./ex3a.json#/externalParameter3" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schemaindirect/nested/ex3a.json: -------------------------------------------------------------------------------- 1 | { 2 | "externalParameter3": { 3 | "name": "externalParameter3", 4 | "in": "query", 5 | "description": "this is parameter stored in external file 3", 6 | "required": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/schemaindirect/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.1.0", 3 | "components": { 4 | "schemas": { 5 | "Indirection": { 6 | "$ref": "./ex3schema.json" 7 | }, 8 | "IndirectionSiblings": { 9 | "$ref": "./ex3schema.json", 10 | "description": "overwritten desc IndirectionSiblings root" 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/issue-1801.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.1.0 2 | servers: 3 | - url: https://someserver.com/v1 4 | info: 5 | title: openapi 3.1.0 sample spec 6 | version: 0.0.1 7 | description: sample spec for testing openapi functionality, built from json schema 8 | tests for draft2020-12 9 | tags: [] 10 | paths: {} 11 | components: 12 | schemas: 13 | AllofWithTheLastEmptySchema: 14 | $schema: https://json-schema.org/draft/2020-12/schema 15 | allOf: 16 | - type: number 17 | - {} 18 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/issue-1821.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.1.0 2 | paths: {} 3 | components: 4 | schemas: 5 | Rule: 6 | type: object 7 | properties: 8 | id: 9 | type: string 10 | format: uuid 11 | name: 12 | type: string 13 | condition: 14 | type: string 15 | order: 16 | type: integer 17 | enabled: 18 | type: boolean 19 | version: 20 | type: integer 21 | description: Version counter 22 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/resolve/domain.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.1.0 2 | info: 3 | title: Parser Test 4 | version: '1.0' 5 | components: 6 | schemas: 7 | Parse: 8 | $ref: "#/components/schemas/ParseEnum" 9 | description: Overwritten description 10 | ParseEnum: 11 | title: Parse It 12 | description: Can it parse it? 13 | type: 14 | - string 15 | - object 16 | enum: 17 | - Yes 18 | - No 19 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/resolve/nested/domain.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.1.0 2 | info: 3 | title: Parser Test 4 | version: '1.0' 5 | components: 6 | schemas: 7 | Parse: 8 | $ref: "#/components/schemas/ParseEnum" 9 | description: Overwritten description 10 | ParseEnum: 11 | title: Parse It 12 | description: Can it parse it? 13 | type: 14 | - string 15 | - object 16 | enum: 17 | - Yes 18 | - No 19 | NestedRef: 20 | $ref: './domainref.yaml#/components/schemas/Parse' 21 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/3.1.0/resolve/nested/domainref.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.1.0 2 | info: 3 | title: Parser Test 4 | version: '1.0' 5 | components: 6 | schemas: 7 | NestedParse: 8 | $ref: "#/components/schemas/NestedParseEnum" 9 | description: Overwritten description 10 | NestedParseEnum: 11 | title: Parse It 12 | description: Can it parse it? 13 | type: 14 | - string 15 | - object 16 | enum: 17 | - Yes 18 | - No 19 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/Issue1316.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | openapi: 3.0.1 3 | info: 4 | title: Encoding Issue 5 | version: 0.0.2 6 | paths: 7 | "/uploads": 8 | post: 9 | tags: 10 | - Uploads 11 | requestBody: 12 | content: 13 | multipart/form-data: 14 | schema: 15 | type: object 16 | properties: 17 | file: 18 | type: string 19 | format: binary 20 | encoding: 21 | file: 22 | style: form 23 | responses: 24 | '200': 25 | description: Success 26 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/META-INF/services/io.swagger.v3.parser.reference.OpenAPIDereferencer: -------------------------------------------------------------------------------- 1 | io.swagger.v3.parser.test.CustomOpenAPIDereferencer 2 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/Pet.yaml: -------------------------------------------------------------------------------- 1 | Pet: 2 | type: object 3 | properties: 4 | name: 5 | type: string 6 | id: 7 | type: integer 8 | format: int64 -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/allOf-properties-ext-ref/models/pet.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "properties": { 4 | "color": { 5 | "type": "string" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/allOf-properties-ext-ref/models/purebred_pet.json: -------------------------------------------------------------------------------- 1 | { 2 | "allOf": [ 3 | { 4 | "$ref": "pet.json" 5 | }, 6 | { 7 | "type": "object", 8 | "properties": { 9 | "breed": { 10 | "type": "string", 11 | "sample": "Labrador" 12 | }, 13 | "mother": { 14 | "$ref": "pet.json" 15 | }, 16 | "siblings": { 17 | "type": "array", 18 | "items": { 19 | "$ref": "pet.json" 20 | } 21 | } 22 | } 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/allOf-properties-ext-ref/models/swagger.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.0.0", 3 | "info": { 4 | "title": "flat", 5 | "version": "1.0.0" 6 | }, 7 | "components": { 8 | "schemas": { 9 | "record": { 10 | "$ref": "purebred_pet.json" 11 | } 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/allOf-properties-ext-ref/swagger.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.0.0", 3 | "info": { 4 | "title": "flat", 5 | "version": "1.0.0" 6 | }, 7 | "components": { 8 | "schemas": { 9 | "record": { 10 | "$ref": "models/purebred_pet.json" 11 | } 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/allOf-relative-file-references/definitions.yaml: -------------------------------------------------------------------------------- 1 | components: 2 | schemas: 3 | PrintInfo: 4 | type: object 5 | description: "Print info of the shipping info" 6 | required: 7 | - B 8 | properties: 9 | B: 10 | type: boolean 11 | ShippingInfo: 12 | type: object 13 | description: "Information about the shipping for a device" 14 | allOf: 15 | - $ref: "#/components/schemas/PrintInfo" 16 | - type: object 17 | required: 18 | - A 19 | properties: 20 | A: 21 | type: integer 22 | format: int64 -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/allOf-relative-file-references/models/fancy_pet.json: -------------------------------------------------------------------------------- 1 | { 2 | "allOf": [ 3 | { 4 | "$ref": "./pet.json" 5 | }, 6 | { 7 | "properties": { 8 | "breed": { 9 | "type": "string", 10 | "example": "Labrador" 11 | } 12 | } 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/allOf-relative-file-references/models/pet.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "properties": { 4 | "id": { 5 | "type": "integer", 6 | "format": "int64" 7 | }, 8 | "name": { 9 | "type": "string", 10 | "example": "Cooper" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/blankQueryParameter.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.2 2 | info: 3 | title: Example references 4 | version: 1.0.0 5 | paths: 6 | /foo: 7 | get: 8 | parameters: 9 | - name: paramName 10 | in: query 11 | example: " " 12 | responses: 13 | '200': 14 | description: success 15 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/callbacks-issue/swagger.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.2 2 | servers: 3 | - description: Dev server 4 | url: 'https://api.net' 5 | info: 6 | title: API 7 | version: 1.0.0 8 | description: 9 | tags: 10 | - name: Webhook API 11 | description: Endpoints related to the subscription and management of Webhooks 12 | paths: 13 | '/webhook': 14 | post: 15 | tags: 16 | - Webhook API 17 | summary: Subscribe to events for a Market Participant 18 | description: description 19 | operationId: subscribe-webhook 20 | callbacks: 21 | WebhookVerificationEvent: 22 | $ref: 'domain.yaml#/components/callbacks/WebhookVerificationEvent' -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/classpathTest.txt: -------------------------------------------------------------------------------- 1 | How now brown cow? -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/codegen-issue-9773/domain.yaml: -------------------------------------------------------------------------------- 1 | components: 2 | requestBodies: 3 | RequestBody1: 4 | required: true 5 | content: 6 | application/json: 7 | schema: 8 | $ref: "#/components/schemas/Foo" 9 | 10 | schemas: 11 | Foo: 12 | type: object 13 | properties: 14 | foo: 15 | type: string 16 | example: bar -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/codegen-issue-9773/openapi.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.2 2 | info: 3 | title: 'Codegen test: requestBody with an external $ref' 4 | version: 0.0.0 5 | paths: 6 | /foo: 7 | post: 8 | requestBody: 9 | $ref: './domain.yaml#/components/requestBodies/RequestBody1' 10 | responses: 11 | '200': 12 | description: OK -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/discriminator-mapping-resolution/Cat.yaml: -------------------------------------------------------------------------------- 1 | Cat: 2 | allOf: 3 | - $ref: "#/components/schemas/Pet" 4 | # all other properties specific to a `Cat` 5 | type: object 6 | properties: 7 | name: 8 | type: string 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/discriminator-mapping-resolution/Dog.yaml: -------------------------------------------------------------------------------- 1 | Dog: 2 | allOf: 3 | - $ref: "#/components/schemas/Pet" 4 | # all other properties specific to a `Dog` 5 | type: object 6 | properties: 7 | bark: 8 | type: string 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/discriminator-mapping-resolution/parent-external-mapping.yaml: -------------------------------------------------------------------------------- 1 | components: 2 | schemas: 3 | Pet: 4 | type: object 5 | required: 6 | - pet_type 7 | properties: 8 | pet_type: 9 | type: string 10 | discriminator: 11 | propertyName: pet_type 12 | mapping: 13 | Cat: 'Cat.yaml' 14 | Dog: 'Dog.yaml' 15 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/domain-issue-1335.yaml: -------------------------------------------------------------------------------- 1 | components: 2 | responses: 3 | 200ok: 4 | description: ok 5 | content: 6 | application/json: 7 | schema: 8 | type: string 9 | examples: 10 | ex1: 11 | $ref: "#/components/examples/ex1" 12 | 13 | examples: 14 | ex1: 15 | value: hello -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/domain.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | title: Parser Test 4 | version: '1.0' 5 | components: 6 | schemas: 7 | Parse: 8 | $ref: "#/components/schemas/ParseEnum" 9 | ParseEnum: 10 | title: Parse It 11 | description: Can it parse it? 12 | type: string 13 | enum: 14 | - Yes 15 | - No -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/duplicateHttpStatusCodes.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: title 4 | description: This is a sample server 5 | license: 6 | name: Apache-2.0 7 | url: http://www.apache.org/licenses/LICENSE-2.0.html 8 | version: 1.0.0 9 | servers: 10 | - url: https://api.absolute.org/v2 11 | description: An absolute path 12 | paths: 13 | /whatever: 14 | get: 15 | summary: Some operation 16 | description: Some operation 17 | operationId: doWhatever 18 | responses: 19 | "200": 20 | description: OK 21 | "200": 22 | description: duplicate HTTP status code -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/dynamicRef/dynamicref-example.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.1.0 2 | info: 3 | title: Test DynamicRef 4 | version: 1.0.0 5 | paths: 6 | /tree: 7 | get: 8 | responses: 9 | '200': 10 | description: OK 11 | content: 12 | application/json: 13 | schema: 14 | $ref: "#/components/schemas/Node" 15 | 16 | components: 17 | schemas: 18 | Node: 19 | $id: "https://example.com/schemas/node" 20 | $dynamicAnchor: "node" 21 | type: object 22 | properties: 23 | name: 24 | type: string 25 | children: 26 | type: array 27 | items: 28 | $dynamicRef: "#node" 29 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/empty-oas.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | version: '1.0.0' 4 | title: 'Empty spec' 5 | description: 'A spec without any content' 6 | paths: {} 7 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/emptyQueryParameter.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.2 2 | info: 3 | title: Example references 4 | version: 1.0.0 5 | paths: 6 | /foo: 7 | get: 8 | parameters: 9 | - name: paramName 10 | in: query 11 | example: "" 12 | responses: 13 | '200': 14 | description: success 15 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/example0/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "artifactVersion": "1.1.1" 3 | } 4 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/example0/models/combinations.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "required": [ 4 | "data" 5 | ], 6 | "properties": { 7 | "data": { 8 | "type": "array", 9 | "items": { 10 | "$ref": "./combination.json" 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/example0/models/common/error.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "description": "Blah blah blah" 4 | } 5 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/example0/models/common/link.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": { 3 | "type": { 4 | "description": "Blah blah blah", 5 | "type": "string" 6 | }, 7 | "id": { 8 | "description": "Blah blah blah", 9 | "type": "string" 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/exampleFlag.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | version: 1.0.1 4 | title: Products API definition for the 4th Platform 5 | paths: 6 | '/TestDTO': 7 | get: 8 | operationId: description 9 | components: 10 | schemas: 11 | TestDTO: 12 | type: object 13 | example: null 14 | TestString: 15 | type: string 16 | example: null 17 | TestNumber: 18 | type: integer 19 | example: null 20 | TestDTOMissing: 21 | type: object 22 | TestStringMissing: 23 | type: string 24 | TestNumberMissing: 25 | type: integer 26 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/file-reference-to-recursive-defs/a.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | openapi: "3.0.0" 3 | info: 4 | title: test 5 | version: '0.0.0' 6 | paths: {} 7 | components: 8 | schemas: 9 | y: 10 | type: object 11 | properties: 12 | name: 13 | type: string 14 | children: 15 | type: array 16 | items: 17 | $ref: "#/components/schemas/y" 18 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/file-reference-to-recursive-defs/b.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | openapi: "3.0.0" 3 | info: 4 | title: test 5 | version: '0.0.0' 6 | paths: {} 7 | components: 8 | schemas: 9 | x: 10 | $ref: "./a.yaml#/components/schemas/y" 11 | v: 12 | type: object 13 | properties: 14 | name: 15 | type: string 16 | children: 17 | type: array 18 | items: 19 | $ref: "#/components/schemas/v" 20 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/file-reference-with-vendor-ext/a.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | openapi: "3.0.0" 3 | info: 4 | title: test 5 | version: '0.0.0' 6 | paths: {} 7 | components: 8 | schemas: 9 | y: 10 | type: object 11 | x-foo: 12 | bar: 13 | baz 14 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/file-reference-with-vendor-ext/b.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | openapi: "3.0.0" 3 | info: 4 | title: test 5 | version: '0.0.0' 6 | paths: {} 7 | components: 8 | schemas: 9 | x: 10 | $ref: "./a.yaml#/components/schemas/y" 11 | z: 12 | type: object 13 | x-foo: 14 | bar: 15 | baz 16 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/int64example.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | version: 0.0.0 4 | title: int64 mocking test 5 | paths: 6 | /foo: 7 | get: 8 | responses: 9 | '200': 10 | description: OK 11 | content: 12 | application/json: 13 | schema: 14 | type: object 15 | properties: 16 | date: 17 | type: integer 18 | format: int64 19 | example: 1516042231144 20 | required: 21 | - date 22 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/internal-references-in-external-files/external.yaml: -------------------------------------------------------------------------------- 1 | common: 2 | allOf: 3 | - $ref: "#/core" 4 | - type: object 5 | properties: 6 | attribute: 7 | type: string 8 | direct: 9 | $ref: "#/core" 10 | referenced: 11 | type: array 12 | items: 13 | $ref: "#/core" 14 | 15 | core: 16 | type: object 17 | properties: 18 | coreAttribute: 19 | type: string 20 | inner: 21 | $ref: "#/innerCore" 22 | 23 | innerCore: 24 | type: object 25 | properties: 26 | innerCoreAttribute: 27 | type: string 28 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1040/api.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | title: Test 4 | version: 1.0.0 5 | 6 | paths: 7 | /value: 8 | get: 9 | operationId: getValues 10 | responses: 11 | 200: 12 | description: Successful response 13 | content: 14 | application/json: 15 | schema: 16 | $ref: 'lib/lib.yaml#/components/schemas/Value' -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1040/lib/lib.yaml: -------------------------------------------------------------------------------- 1 | components: 2 | schemas: 3 | ValueId: 4 | type: object 5 | properties: 6 | id: 7 | type: integer 8 | format: int64 9 | Value: 10 | type: object 11 | properties: 12 | id: 13 | $ref: "#/components/schemas/ValueId" -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1063/openapi.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | version: 1.0.0 4 | title: an API 5 | description: An API for reproduce a *There are duplicate parameter values*. 6 | 7 | paths: 8 | /anPath: 9 | get: 10 | parameters: 11 | - $ref: './references.oas3.yaml#/components/parameters/ParamQ_One' 12 | - $ref: './references.oas3.yaml#/components/parameters/ParamQ_Two' 13 | responses: 14 | '200': 15 | description: OK 16 | content: 17 | application/json: 18 | schema: 19 | type: array 20 | items: 21 | type: string -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1063/references.oas3.yaml: -------------------------------------------------------------------------------- 1 | components: 2 | parameters: 3 | ParamQ_One: 4 | in: query 5 | name: customer-id 6 | required: true 7 | schema: 8 | format: int32 9 | type: integer 10 | ParamQ_Two: 11 | in: query 12 | name: unit-id 13 | schema: 14 | format: int32 15 | type: integer -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1081/spec2.yaml: -------------------------------------------------------------------------------- 1 | openapi: "3.0.0" 2 | info: 3 | version: 1.0.0 4 | title: spec2 5 | components: 6 | schemas: 7 | FlowDescription: 8 | type: string 9 | EthFlowDescription: 10 | type: object 11 | properties: 12 | fDesc: 13 | $ref: "#/components/schemas/FlowDescription" 14 | fDir: 15 | $ref: 'spec1.yaml#/components/schemas/FlowDirection' -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1094/common.yaml: -------------------------------------------------------------------------------- 1 | openapi: "3.0.0" 2 | info: 3 | version: 15.3.0 4 | title: "Common Data Types" 5 | paths: {} 6 | components: 7 | schemas: 8 | PlmnId: 9 | type: object 10 | properties: 11 | mcc: 12 | type: string 13 | mnc: 14 | type: string -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1094/swagger.yaml: -------------------------------------------------------------------------------- 1 | openapi: "3.0.0" 2 | info: 3 | version: 15.3.0 4 | title: test 5 | paths: 6 | /my-app: 7 | get: 8 | parameters: 9 | - name: target-plmn-list 10 | in: query 11 | content: 12 | application/json: 13 | schema: 14 | type: array 15 | items: 16 | $ref: 'common.yaml#/components/schemas/PlmnId' 17 | minItems: 1 18 | responses: 19 | '200': 20 | description: Expected response to a valid request 21 | schema: 22 | type: string -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1103/remote-parameter-swagger.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | version: "1" 4 | title: Admin Web App Services 5 | description: 'Services' 6 | paths: 7 | '/Translation/{lang}': 8 | put: 9 | tags: 10 | - Translation_Settings 11 | summary: Set value of this parameter 12 | description: Provide the lookup table for localized strings 13 | parameters: 14 | - $ref: 'domain.yaml#/components/parameters/param_lang' -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1103/remote-pathItem-swagger.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | version: 2.0.0 4 | title: Admin Web App Services 5 | description: 'Services API' 6 | paths: 7 | '/Translation/{lang}': 8 | $ref: './domain.yaml#/components/pathitems/Translation' -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1105/swagger-api.yaml: -------------------------------------------------------------------------------- 1 | openapi: "3.0.2" 2 | info: 3 | title: User and Session 4 | description: Admin API endpoints. 5 | version: "0.1" 6 | paths: 7 | /users: 8 | get: 9 | responses: 10 | "401": 11 | $ref: "./domain.yaml#/components/responses/401" 12 | components: { 13 | schemas: {} 14 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1108.yaml: -------------------------------------------------------------------------------- 1 | openapi: "3.0.0" 2 | info: 3 | version: 1.0.0 4 | title: Swagger petstore 5 | license: 6 | name: MIT 7 | servers: 8 | - url: http://petstore.swagger.io/v1 9 | paths: 10 | /pets: 11 | get: 12 | summary: List all pets 13 | operationId: listpets 14 | tags: 15 | - pets 16 | parameters: 17 | - name: limit 18 | in: query 19 | allowReserved: false 20 | responses: 21 | '200': 22 | description: A paged array of pets -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1119.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swagger-api/swagger-parser/3a4ad2eceeb3b39679abc722f2f2b62e8f7cb6f1/modules/swagger-parser-v3/src/test/resources/issue-1119.yaml -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1147/common.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | version: "1.0" 4 | title: Swagger Parser Issue 5 | paths: {} 6 | components: 7 | schemas: 8 | String: 9 | type: string 10 | StringObject: 11 | type: object 12 | properties: 13 | val: 14 | $ref: "#/components/schemas/String" 15 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1147/issue1147.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | version: "1.0" 4 | title: Swagger Parser Issue 5 | paths: 6 | /: 7 | post: 8 | requestBody: 9 | $ref: "#/components/requestBodies/RefRequestBody" 10 | responses: 11 | default: 12 | description: "Error" 13 | components: 14 | requestBodies: 15 | RefRequestBody: 16 | content: 17 | 'application/json': 18 | schema: 19 | $ref: 'common.yaml#/components/schemas/StringObject' -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1161/common.yaml: -------------------------------------------------------------------------------- 1 | openapi: "3.0.2" 2 | info: 3 | version: 15.3.0 4 | title: "Common Data Types" 5 | paths: {} 6 | components: 7 | schemas: 8 | Breed: 9 | type: object 10 | properties: 11 | name: 12 | type: string 13 | family: 14 | type: string 15 | Colouring: 16 | type: object 17 | properties: 18 | primary: 19 | $ref: "#/components/schemas/Colour" 20 | secondary: 21 | $ref: "#/components/schemas/Colour" 22 | Colour: 23 | type: string 24 | enum: ['black', 'white', 'tan', 'red', 'blue'] -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1177/common/common-types.yaml: -------------------------------------------------------------------------------- 1 | openapi: "3.0.2" 2 | info: 3 | version: 15.3.0 4 | title: "Common Data Types" 5 | paths: {} 6 | components: 7 | schemas: 8 | PetsList: 9 | type: array 10 | items: 11 | $ref: "#/components/schemas/Pet" 12 | 13 | Pet: 14 | type: object 15 | properties: 16 | petType: 17 | type: string 18 | breed: 19 | $ref: "#/components/schemas/Breed" 20 | 21 | Breed: 22 | type: object 23 | properties: 24 | name: 25 | type: string 26 | family: 27 | type: string 28 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1177/common/responses/common-responses.yaml: -------------------------------------------------------------------------------- 1 | openapi: "3.0.2" 2 | info: 3 | version: 15.3.0 4 | title: "Common Responses" 5 | paths: {} 6 | components: 7 | responses: 8 | PetsListResponse: 9 | description: returns a list of pets 10 | headers: 11 | x-session-id: 12 | $ref: '../../headers/common-headers.yaml#/components/headers/x-session-id' 13 | content: 14 | application/json: 15 | schema: 16 | $ref: '../common-types.yaml#/components/schemas/PetsList' 17 | 18 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1177/headers/common-headers.yaml: -------------------------------------------------------------------------------- 1 | openapi: "3.0.2" 2 | info: 3 | version: 15.3.0 4 | title: "Common Headers" 5 | paths: {} 6 | components: 7 | headers: 8 | x-session-id: 9 | schema: 10 | type: string 11 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1177/swagger.yaml: -------------------------------------------------------------------------------- 1 | openapi: "3.0.2" 2 | info: 3 | version: 15.3.0 4 | title: test 5 | paths: 6 | /update-pets: 7 | post: 8 | requestBody: 9 | content: 10 | application/json: 11 | schema: 12 | $ref: 'common/common-types.yaml#/components/schemas/PetsList' 13 | responses: 14 | '200': 15 | $ref: 'common/responses/common-responses.yaml#/components/responses/PetsListResponse' 16 | 17 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1292/pets/def.yml: -------------------------------------------------------------------------------- 1 | components: 2 | schemas: 3 | Pet: 4 | type: object 5 | required: 6 | - id 7 | - name 8 | properties: 9 | id: 10 | type: integer 11 | format: int64 12 | name: 13 | type: string 14 | tag: 15 | type: string 16 | Pets: 17 | type: array 18 | items: 19 | $ref: "#/components/schemas/Pet" 20 | Error: 21 | type: object 22 | required: 23 | - code 24 | - message 25 | properties: 26 | code: 27 | type: integer 28 | format: int32 29 | message: 30 | type: string 31 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1292/petstore.yml: -------------------------------------------------------------------------------- 1 | openapi: "3.0.0" 2 | info: 3 | version: 1.0.0 4 | title: Swagger Petstore 5 | license: 6 | name: MIT 7 | servers: 8 | - url: http://petstore.swagger.io/v1 9 | paths: 10 | /pets: 11 | $ref: "./pets/pets.yml" 12 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1309.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | openapi: 3.0.1 3 | info: 4 | title: Regular Expression Issue 5 | version: 0.0.2 6 | paths: 7 | "/test": 8 | get: 9 | responses: 10 | '200': 11 | description: It works 12 | '400': 13 | description: Bad Request 14 | content: 15 | application/json: 16 | schema: 17 | type: object 18 | examples: 19 | Entity not found: 20 | summary: Item not existing 21 | components: 22 | schemas: 23 | customer-not-found: 24 | type: object 25 | examples: 26 | Customer not found: 27 | summary: Customer not existing -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1518/models/analemmata.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "description": "blah blah blah", 4 | "properties": { 5 | "tashotSipe": { 6 | "$ref": "../api.json#/components/schemas/TashotSipe" 7 | }, 8 | "stunts": { 9 | "$ref": "../api.json#/components/schemas/Stunts" 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1518/models/common/essot.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "description": "blah blah blah", 4 | "properties": { 5 | "statue": { 6 | "type": "integer", 7 | "format": "int32", 8 | "description": "blah blah blah" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1518/models/common/stunts.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "string", 3 | "enum": [ 4 | "XORK" 5 | ], 6 | "description": "blah blah blah" 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1518/models/common/tashotSipe.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "string", 3 | "enum": [ 4 | "RAFTER" 5 | ], 6 | "description": "blah blah blah" 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1543/schemas/PingResponse.yaml: -------------------------------------------------------------------------------- 1 | # schemas/PingResponse.yaml 2 | type: object 3 | properties: 4 | answer: 5 | type: string 6 | maxLength: 255 7 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1543/schemas/_index.yaml: -------------------------------------------------------------------------------- 1 | # schemas/_index.yaml 2 | pingResponse: 3 | $ref: 'PingResponse.yaml' -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1592.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swagger-api/swagger-parser/3a4ad2eceeb3b39679abc722f2f2b62e8f7cb6f1/modules/swagger-parser-v3/src/test/resources/issue-1592.jar -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1621/example.get.yaml: -------------------------------------------------------------------------------- 1 | title: GET Example -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1621/example.openapi.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: Example OpenAPI spec 4 | version: 0.0.1 5 | paths: 6 | '/example': 7 | post: 8 | requestBody: 9 | content: 10 | application/json: 11 | schema: 12 | $ref: "#/components/schemas/ExamplePost" 13 | responses: 14 | 204: 15 | description: No content 16 | components: 17 | schemas: 18 | # Renaming this key from `Example` to `ExampleGet` stops the issue from occurring 19 | # Removing this key stops the issue from occurring 20 | Example: 21 | $ref: example.get.yaml 22 | ExamplePost: 23 | $ref: example.post.yaml -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1621/example.post.yaml: -------------------------------------------------------------------------------- 1 | title: POST Example -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1658/api2.yaml: -------------------------------------------------------------------------------- 1 | components: 2 | schemas: 3 | ref2: 4 | type: object 5 | properties: 6 | status: 7 | type: string -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1658/apis.yaml: -------------------------------------------------------------------------------- 1 | paths: 2 | healthCheck: 3 | get: 4 | summary: Gets service health status 5 | responses: 6 | '200': 7 | description: Success status 8 | content: 9 | application/json: 10 | schema: 11 | $ref: "#/components/schemas/responseBase" 12 | 13 | 14 | components: 15 | schemas: 16 | responseBase: 17 | $ref: "#/components/schemas/ref1" 18 | 19 | ref1: 20 | $ref: './api2.yaml#/components/schemas/ref2' -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1658/issue1658.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | title: Demo 4 | description: Demo to crash parser 5 | version: 1.0.0 6 | 7 | paths: 8 | /internal/v1/hc: 9 | $ref: './apis.yaml#/paths/healthCheck' -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1746/petstore.yml: -------------------------------------------------------------------------------- 1 | openapi: "3.0.0" 2 | info: 3 | version: 1.0.0 4 | title: Swagger Petstore 5 | license: 6 | name: MIT 7 | servers: 8 | - url: http://petstore.swagger.io/v1 9 | paths: 10 | /pets: 11 | $ref: "./pets/pets.yml" 12 | 13 | components: 14 | schemas: 15 | Date: 16 | type: string 17 | format: date 18 | DateWithExample: 19 | $ref: '#/components/schemas/Date' 20 | description: Date schema extended with a `default` value... Or not? 21 | default: 2000-01-01 22 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1865/apis/foo.yaml: -------------------------------------------------------------------------------- 1 | #broken-ref/apis/foo.yaml 2 | openapi: 3.0.0 3 | info: 4 | title: swagger parser bug, worked until 2.0.28 but not since 2.0.29 5 | version: '1.0' 6 | 7 | paths: 8 | 9 | '/foo': 10 | post: 11 | summary: create foo 12 | description: Create a new foo. 13 | responses: 14 | '200': 15 | description: a Foo 16 | content: 17 | application/json: 18 | schema: 19 | $ref: "#/components/schemas/Foo" 20 | 21 | components: 22 | schemas: 23 | Foo: 24 | $ref: ../models/foo.model.yaml -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1865/examples/foo.example.yaml: -------------------------------------------------------------------------------- 1 | # broken-ref/examples/foo.example.yaml 2 | value: 3 | foo: bar -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1865/models/foo.model.yaml: -------------------------------------------------------------------------------- 1 | #broken-ref/models/foo.model.yaml 2 | title: Foo 3 | type: object 4 | properties: 5 | foo: 6 | type: string -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1865/openapi30.yaml: -------------------------------------------------------------------------------- 1 | # broken-ref/openapi30.yaml 2 | openapi: 3.0.3 3 | info: 4 | title: ref chain 5 | version: '1' 6 | 7 | paths: 8 | /foo: 9 | $ref: ./apis/foo.yaml#/paths/~1foo -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1878/test.txt: -------------------------------------------------------------------------------- 1 | Test content -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1886/components.yaml: -------------------------------------------------------------------------------- 1 | Enum1: 2 | $ref: schemas/enum1.yaml 3 | Enum2: 4 | type: string 5 | enum: [a, b, c] 6 | nullable: false 7 | Enum3: 8 | type: string 9 | enum: [x, y, z] 10 | nullable: true 11 | 12 | SimplePojo: 13 | $ref: schemas/simple-pojo.yaml 14 | ArrayPojo: 15 | $ref: schemas/array-pojo.yaml 16 | MapPojo: 17 | $ref: schemas/map-pojo.yaml 18 | SetPojo: 19 | $ref: schemas/set-pojo.yaml 20 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1886/schemas/additional-properties.yaml: -------------------------------------------------------------------------------- 1 | title: AdditionalProperties 2 | type: object 3 | x-abstract: true 4 | properties: 5 | additions: 6 | x-extra-annotation: '@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY)' 7 | type: object 8 | additionalProperties: 9 | type: string 10 | required: 11 | - additions 12 | description: Additional Properties 13 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1886/schemas/enum1.yaml: -------------------------------------------------------------------------------- 1 | title: Enum1 2 | type: integer 3 | enum: [ 200, 400, 404, 500 ] 4 | x-enum-varnames: 5 | - HTTP_STATUS_OK 6 | - HTTP_STATUS_BAD_REQUEST 7 | - HTTP_STATUS_NOT_FOUND 8 | - HTTP_STATUS_INTERNAL_SERVER_ERROR 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1886/schemas/locale-translation-item.yaml: -------------------------------------------------------------------------------- 1 | title: LocaleTranslationItem 2 | type: object 3 | allOf: 4 | - $ref: additional-properties.yaml 5 | description: Locale Translation item 6 | properties: 7 | fieldName: 8 | type: string 9 | minLength: 1 10 | maxLength: 50 11 | description: Defines the name of the field that is translated. 12 | fieldValue: 13 | type: string 14 | minLength: 1 15 | maxLength: 50 16 | description: Defines the translated value of the field. 17 | required: 18 | - fieldName 19 | - fieldValue 20 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1886/schemas/translation-item.yaml: -------------------------------------------------------------------------------- 1 | title: TranslationItem 2 | type: object 3 | allOf: 4 | - $ref: additional-properties.yaml 5 | description: Translation item 6 | properties: 7 | locale: 8 | type: string 9 | minLength: 1 10 | maxLength: 50 11 | description: Defines the translation natural language as specified in ISO 639-1, 12 | and territory two-letter form of ISO 3166. 13 | localeTranslations: 14 | type: array 15 | uniqueItems: true 16 | items: 17 | $ref: locale-translation-item.yaml 18 | 19 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1891-shared-types.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | openapi: 3.0.0 3 | 4 | info: 5 | description: Models that would published in a jar and then read from the classpath. 6 | version: 1.0.0 7 | title: shared-types 8 | 9 | paths: 10 | /empty: 11 | description: > 12 | Empty API so that we can load this file in Swagger Editor for validation and 13 | not get flagged for a contract without a paths element. 14 | 15 | components: 16 | schemas: 17 | SharedModel: 18 | description: A shared model 19 | type: object 20 | properties: 21 | name: 22 | type: string 23 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-1891/openapi.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | openapi: 3.0.0 3 | 4 | info: 5 | description: Models that would published in a jar and then read from the classpath. 6 | version: 1.0.0 7 | title: shared-models 8 | 9 | paths: 10 | /empty: 11 | description: > 12 | Empty API so that we can load this file in Swagger Editor for validation and 13 | not get flagged for a contract without a paths element. 14 | 15 | components: 16 | schemas: 17 | LocalModel: 18 | type: object 19 | properties: 20 | sharedModelField: 21 | # This is resolved via the file system, but looking in the folder 'types' 22 | $ref: 'types/local-types.yaml#/components/schemas/TypesModel' 23 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-2037/openapi.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.3 2 | info: 3 | title: title 4 | version: LATEST 5 | 6 | paths: 7 | /get: 8 | $ref: 'paths/get.yaml#/endpoint' -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-2037/paths/get.yaml: -------------------------------------------------------------------------------- 1 | endpoint: 2 | get: 3 | operationId: get 4 | requestBody: 5 | content: 6 | application/json: 7 | schema: 8 | $ref: "#/RequestBodyRef" 9 | responses: 10 | '200': 11 | content: 12 | application/json: 13 | schema: 14 | $ref: "#/ResponsesRef" 15 | 16 | RequestBodyRef: 17 | type: string 18 | 19 | ResponsesRef: 20 | type: string -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-2071/openapi.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: API 4 | description: API 5 | version: LATEST 6 | paths: 7 | /test-path: 8 | post: 9 | requestBody: 10 | required: true 11 | content: 12 | text/plain: 13 | schema: 14 | type: string 15 | responses: 16 | 200: 17 | description: OK 18 | content: 19 | application/json: 20 | schema: 21 | $ref: 'definitions.yaml#/components/schemas/Response' 22 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-2104/depth1/depth2/product/definitions.yaml: -------------------------------------------------------------------------------- 1 | components: 2 | schemas: 3 | Product: 4 | type: object 5 | additionalProperties: false 6 | required: 7 | - type 8 | properties: 9 | id: 10 | type: string 11 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-289-b.yaml: -------------------------------------------------------------------------------- 1 | openapi: "3.0.0" 2 | 3 | info: 4 | version: 1.0.0 5 | title: Path include test case child 6 | 7 | paths: 8 | /foo: 9 | get: 10 | responses: 11 | 200: 12 | description: "Request successful" -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-289.yaml: -------------------------------------------------------------------------------- 1 | openapi: "3.0.0" 2 | 3 | info: 4 | version: 1.0.0 5 | title: Path include test case 6 | 7 | paths: 8 | /foo: 9 | $ref: './issue-289-b.yaml#/paths/~1foo' -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-407/full/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swagger-api/swagger-parser/3a4ad2eceeb3b39679abc722f2f2b62e8f7cb6f1/modules/swagger-parser-v3/src/test/resources/issue-407/full/favicon-16x16.png -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-407/full/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swagger-api/swagger-parser/3a4ad2eceeb3b39679abc722f2f2b62e8f7cb6f1/modules/swagger-parser-v3/src/test/resources/issue-407/full/favicon-32x32.png -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-407/full/index.css: -------------------------------------------------------------------------------- 1 | html { 2 | box-sizing: border-box; 3 | overflow: -moz-scrollbars-vertical; 4 | overflow-y: scroll; 5 | } 6 | 7 | *, 8 | *:before, 9 | *:after { 10 | box-sizing: inherit; 11 | } 12 | 13 | body { 14 | margin: 0; 15 | background: #fafafa; 16 | } 17 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-407/full/pets/def.yml: -------------------------------------------------------------------------------- 1 | components: 2 | schemas: 3 | Pet: 4 | $ref: "./def2.yml#/components/schemas/Pet" 5 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-407/full/pets/def2.yml: -------------------------------------------------------------------------------- 1 | components: 2 | schemas: 3 | Pet: 4 | type: number 5 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-407/full/pets/pets.yml: -------------------------------------------------------------------------------- 1 | get: 2 | operationId: listPets 3 | responses: 4 | "200": 5 | $ref: "./response.yml" 6 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-407/full/pets/response.yml: -------------------------------------------------------------------------------- 1 | content: 2 | application/json: 3 | schema: 4 | $ref: "./def.yml#/components/schemas/Pet" 5 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-407/full/petstore.yml: -------------------------------------------------------------------------------- 1 | openapi: "3.0.0" 2 | info: 3 | version: 1.0.0 4 | title: Swagger Petstore 5 | servers: 6 | - url: http://petstore.swagger.io/v1 7 | paths: 8 | /pets: 9 | $ref: "./pets/pets.yml" 10 | 11 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-407/full/swagger-initializer.js: -------------------------------------------------------------------------------- 1 | window.onload = function() { 2 | // 3 | 4 | // the following lines will be replaced by docker/configurator, when it runs in a docker-container 5 | window.ui = SwaggerUIBundle({ 6 | url: "https://petstore.swagger.io/v2/swagger.json", 7 | dom_id: '#swagger-ui', 8 | deepLinking: true, 9 | presets: [ 10 | SwaggerUIBundle.presets.apis, 11 | SwaggerUIStandalonePreset 12 | ], 13 | plugins: [ 14 | SwaggerUIBundle.plugins.DownloadUrl 15 | ], 16 | layout: "StandaloneLayout" 17 | }); 18 | 19 | // 20 | }; 21 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-407/pets/def.yml: -------------------------------------------------------------------------------- 1 | components: 2 | schemas: 3 | Pet: 4 | $ref: "./def2.yml#/components/schemas/Pet" 5 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-407/pets/def2.yml: -------------------------------------------------------------------------------- 1 | components: 2 | schemas: 3 | Pet: 4 | type: number 5 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-407/pets/pets.yml: -------------------------------------------------------------------------------- 1 | get: 2 | operationId: listPets 3 | responses: 4 | "200": 5 | content: 6 | application/json: 7 | schema: 8 | $ref: "./def.yml#/components/schemas/Pet" 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-407/pets/response.yml: -------------------------------------------------------------------------------- 1 | content: 2 | application/json: 3 | schema: 4 | $ref: "./def.yml#/components/schemas/Pet" 5 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-407/petstore.yml: -------------------------------------------------------------------------------- 1 | openapi: "3.0.0" 2 | info: 3 | version: 1.0.0 4 | title: Swagger Petstore 5 | servers: 6 | - url: http://petstore.swagger.io/v1 7 | paths: 8 | /pets: 9 | $ref: "./pets/pets.yml" 10 | /petres: 11 | get: 12 | operationId: aaget 13 | responses: 14 | 200: 15 | $ref: "./pets/response.yml" 16 | 17 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-505/petstore.yml: -------------------------------------------------------------------------------- 1 | openapi: "3.0.0" 2 | info: 3 | version: 1.0.0 4 | title: Swagger Petstore 5 | license: 6 | name: MIT 7 | servers: 8 | - url: http://petstore.swagger.io/v1 9 | paths: 10 | /pets: 11 | $ref: "./pets/pets.yml" 12 | 13 | components: 14 | schemas: 15 | Date: 16 | type: string 17 | format: date 18 | DateWithExample: 19 | $ref: '#/components/schemas/Date' 20 | description: Date schema extended with a `default` value... Or not? 21 | default: 2000-01-01 22 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-822.yaml: -------------------------------------------------------------------------------- 1 | openapi: "3.0.0" 2 | 3 | info: 4 | version: 1.0.0 5 | title: Path include test case 6 | 7 | paths: 8 | /foo: 9 | $ref: './issue-822-b.yaml#/paths/~1foo' 10 | /wtf/{bar}: 11 | $ref: './issue-822-b.yaml#/paths/~1wtf~1%7Bbar%7D' 12 | /bar/wtf: 13 | $ref: './issue-822-b.yaml#/paths/~1bar~1wtf' 14 | /haha/{bar}: 15 | $ref: './issue-822-b.yaml#/paths/~1haha~1{bar}' 16 | /haha2/{bar}: 17 | $ref: './issue-822-b.yaml#/paths/~1haha/{bar}' 18 | /bar/haha: 19 | $ref: './issue-822-b.yaml#/paths/bar/haha' 20 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-834/components/response1.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | description: Response with schema containing reference 3 | content: 4 | application/json: 5 | schema: 6 | $ref: "./schema.yaml" -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-834/components/response2.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | description: Response with schema containing reference 3 | content: 4 | application/json: 5 | schema: 6 | $ref: "./schema.yaml" -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-834/components/schema.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | type: object -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-837-853-1131/components.yaml: -------------------------------------------------------------------------------- 1 | 2 | components: 3 | examples: 4 | ExternalRef: 5 | summary: An external reference 6 | value: 7 | test: external -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-901/spec.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: testswos55 4 | description: testswos55 5 | version: "1.01" 6 | servers: 7 | - url: ///test 8 | paths: 9 | /test: 10 | $ref: ref.yaml/#/pathitems/path-test 11 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-901/spec2.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: testswos55 4 | description: testswos55 5 | version: "1.01" 6 | servers: 7 | - url: ///test 8 | paths: 9 | /test: 10 | $ref: ref2.yaml/#/pathitems/path-test -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-913/BO/Common/BasicComponents.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": { 3 | "indicatorType": { 4 | "type": "object", 5 | "properties": { 6 | "indicator": { 7 | "type": "boolean" 8 | } 9 | } 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-913/BO/Resource/ApiSpecificationBO.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": { 3 | "details": { 4 | "type": "object", 5 | "properties": { 6 | "confirmationCodeRequired": { 7 | "$ref": "../Common/BasicComponents.json#/properties/indicatorType" 8 | } 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-975/contract/openapi.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | title: Common Image Type 4 | version: 5.0.0 5 | paths: 6 | /foo: 7 | get: 8 | summary: Common JSON objects 9 | responses: 10 | '200': 11 | description: Success 12 | content: 13 | application/json: 14 | schema: 15 | $ref: '../types/responses.yaml#/components/schemas/MyResponse' 16 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue-975/types/types.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | title: Common Image Type 4 | version: 5.0.0 5 | paths: 6 | /foo: 7 | get: 8 | summary: Common JSON objects 9 | responses: 10 | '204': 11 | description: Success 12 | 13 | components: 14 | schemas: 15 | Image: 16 | type: object 17 | properties: 18 | title: 19 | type: string 20 | URL: 21 | type: string 22 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue1148.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - url: 'http://petstore.swagger.io/v2' 4 | info: 5 | version: 1.0.0 6 | title: OpenAPI Petstore 7 | license: 8 | name: Apache-2.0 9 | url: 'http://www.apache.org/licenses/LICENSE-2.0.html' 10 | paths: 11 | /example: 12 | get: 13 | operationId: example 14 | responses: 15 | '200': 16 | description: successful operation 17 | components: 18 | schemas: 19 | Some.User: 20 | type: object 21 | properties: 22 | address: 23 | type: object 24 | nullable: true 25 | properties: 26 | city: 27 | type: string -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue1335.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.2 2 | info: 3 | title: Example references 4 | version: 1.0.0 5 | paths: 6 | /foo: 7 | get: 8 | responses: 9 | '200': 10 | $ref: './domain-issue-1335.yaml#/components/responses/200ok' -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue1398.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: Swagger Petstore 4 | description: 'This is a sample server Petstore server' 5 | version: 1.0.0 6 | servers: 7 | - url: http://mytestServer/{v1} 8 | variables: 9 | v2: 10 | default: 'd' 11 | paths: 12 | '/pet/{petId}': 13 | get: 14 | summary: Find pet by ID 15 | description: Returns a single pet 16 | parameters: 17 | - name: petId 18 | in: path 19 | description: ID of pet to return 20 | required: true 21 | schema: 22 | type : integer 23 | multipleOf: -10 24 | responses: 25 | '200': 26 | description: successful operation -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue1630.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | title: example 4 | version: 1.0.0 5 | paths: 6 | "/examples": 7 | get: 8 | responses: 9 | default: 10 | description: None 11 | components: 12 | schemas: 13 | Response: 14 | required: 15 | - content 16 | properties: 17 | content: 18 | type: string 19 | format: byte 20 | example: "VGhpc1Nob3VsZFBhc3MK" 21 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue1637.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: sample 4 | version: "1.0" 5 | servers: 6 | - url: www.abc.com 7 | paths: 8 | /test: 9 | get: 10 | operationId: test 11 | parameters: 12 | - name: id 13 | in: query 14 | content: 15 | application/json: 16 | schema: 17 | type: object 18 | properties: 19 | a: 20 | type: string 21 | responses: 22 | 200: 23 | description: Ok 24 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue1644.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | openapi: 3.0.0 3 | info: 4 | title: Operations 5 | version: 0.0.0 6 | paths: 7 | "/operations": 8 | post: 9 | parameters: 10 | - name: param0 11 | schema: 12 | type: string 13 | responses: 14 | default: 15 | description: None 16 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue251.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.3 2 | info: 3 | version: "1.0.0" 4 | title: parse-api 5 | description: Test swagger-parser 6 | paths: 7 | /parse: 8 | get: 9 | description: Parser test 10 | operationId: getParse 11 | parameters: 12 | - in: query 13 | name: parse 14 | required: true 15 | schema: 16 | $ref: 'http://localhost:${dynamicPort}/domain#/components/schemas/Parse' 17 | responses: 18 | '200': 19 | description: OK -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue_16.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: [] 3 | info: 4 | version: 0.0.0 5 | title: Simple API 6 | paths: 7 | /: 8 | get: 9 | responses: 10 | '200': 11 | description: OK 12 | content: 13 | '*/*': 14 | schema: 15 | $ref: "#/components/schemas/InternshipResultModel" 16 | components: 17 | schemas: 18 | InternshipResultModel: 19 | properties: 20 | Review: 21 | $ref: "#/components/schemas/ReviewModel" 22 | ReviewModel: 23 | properties: 24 | Rating: 25 | type: integer -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue_2125.yaml: -------------------------------------------------------------------------------- 1 | openapi: '3.0.0' 2 | 3 | info: 4 | title: Test 5 | version: 0.1.0 6 | 7 | paths: {} 8 | 9 | components: 10 | schemas: 11 | Test: 12 | type: string 13 | items: 14 | type: string 15 | default: null 16 | nullable: false -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue_286.yaml: -------------------------------------------------------------------------------- 1 | openapi: "3.0.0" 2 | info: 3 | title: test data for nested list ext references 4 | version: '0.0.0' 5 | paths: 6 | /: 7 | get: 8 | responses: 9 | "200": 10 | content: 11 | '*/*': 12 | schema: 13 | $ref: "./issue_286_PetList.yaml" -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue_286_Allergy.yaml: -------------------------------------------------------------------------------- 1 | title: "Allergy" 2 | properties: 3 | name: 4 | type: string 5 | severity: 6 | type: number -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue_286_Pet.yaml: -------------------------------------------------------------------------------- 1 | title: "Pet" 2 | properties: 3 | allergies: 4 | type: array 5 | items: 6 | $ref: "./issue_286_Allergy.yaml" -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue_286_PetList.yaml: -------------------------------------------------------------------------------- 1 | title: "PetList" 2 | properties: 3 | pets: 4 | type: array 5 | items: 6 | $ref: "./issue_286_Pet.yaml" -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue_357.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: [] 3 | info: 4 | title: Test model for swagger-parser issue 357 5 | contact: 6 | name: Andy Lowry 7 | email: andy.lowry@reprezen.com 8 | version: '1.0' 9 | paths: 10 | /testApi: 11 | get: 12 | operationId: getTest 13 | parameters: 14 | - name: pathParam1 15 | in: query 16 | schema: 17 | type: integer 18 | responses: 19 | default: 20 | description: OK 21 | parameters: 22 | - name: pathParam1 23 | in: query 24 | schema: 25 | type: string 26 | - name: pathParam2 27 | in: query 28 | schema: 29 | type: string -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue_358.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: [] 3 | info: 4 | title: Test model for swagger-parser issue 357 5 | contact: 6 | name: Andy Lowry 7 | email: andy.lowry@reprezen.com 8 | version: '1.0' 9 | paths: 10 | /testApi: 11 | get: 12 | operationId: getTest 13 | parameters: 14 | - name: pathParam 15 | in: query 16 | schema: 17 | type: integer 18 | responses: 19 | default: 20 | description: OK 21 | parameters: 22 | - $ref: "#/components/parameters/pathParam" 23 | components: 24 | parameters: 25 | pathParam: 26 | name: pathParam 27 | in: query 28 | schema: 29 | type: string -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue_643.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | swagger: '2.0' 3 | info: 4 | version: 1.0.0 5 | title: Sample Issue 6 | description: API 7 | termsOfService: TBD 8 | contact: 9 | name: API Team 10 | license: 11 | name: MIT 12 | host: xyz.com 13 | basePath: '' 14 | schemes: 15 | - https 16 | consumes: 17 | - application/json 18 | produces: 19 | - application/json 20 | paths: 21 | "/xyz": 22 | "$ref": "./xyz.yaml#/do_xyz" 23 | definitions: 24 | XYZResponse: 25 | "$ref": "./xyz.yaml#/definitions/XYZResponse" -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue_877.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - url: 'http://localhost:8000/v2/api' 4 | info: 5 | version: 1.0.0 6 | title: Swagger Petstore 7 | paths: 8 | /adopt: 9 | get: 10 | tags: 11 | - pet 12 | summary: Find pet by ID 13 | description: It gets pets 14 | operationId: getPetById 15 | parameters: 16 | - $ref: "#/components/parameters/limit" 17 | responses: 18 | '200': 19 | description: successful operation 20 | components: 21 | parameters: 22 | limit: 23 | name: playerId 24 | in: path 25 | required: true 26 | schema: 27 | type: string -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/issue_918.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | title: headers in components 4 | version: 1.0.0 5 | paths: 6 | /2.0/users/: 7 | get: 8 | operationId: getUserByName 9 | responses: 10 | '200': 11 | description: The User 12 | headers: 13 | X-Rate-Limit: 14 | $ref: "#/components/headers/X-Rate-Limit-Ref" 15 | components: 16 | headers: 17 | X-Rate-Limit-Ref: 18 | description: The number of allowed requests in the current period 19 | schema: 20 | type: integer -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/main.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - url: 'http://myhost.com/testpath' 4 | info: 5 | title: Tests 6 | description: Tests 7 | version: beta 8 | paths: 9 | pets: 10 | get: 11 | summary: null 12 | description: null 13 | operationId: list 14 | responses: 15 | '200': 16 | description: OK 17 | content: 18 | '*/*': 19 | schema: 20 | $ref: './Pet.yaml#/Pet' -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/book.yaml: -------------------------------------------------------------------------------- 1 | description: A book entity 2 | properties: 3 | name: 4 | type: string 5 | title: 6 | type: string 7 | pages: 8 | type: integer 9 | format: int32 -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/common/common2/bar.yaml: -------------------------------------------------------------------------------- 1 | Foobar: 2 | properties: 3 | message: 4 | type: string 5 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/common/common2/issue-328-bar.yaml: -------------------------------------------------------------------------------- 1 | Foobar: 2 | properties: 3 | message: 4 | type: string 5 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/common/issue-328-paging.yaml: -------------------------------------------------------------------------------- 1 | Paging: 2 | properties: 3 | total_items: 4 | type: integer 5 | foobar: 6 | $ref: 'http://localhost:8080/resources/swagger/common/common2/issue-328-bar.yaml#/Foobar' 7 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/common/issue-336-currency_code.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "Currency code", 3 | "type": "string", 4 | "minLength": 3, 5 | "maxLength": 3 6 | } 7 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/common/issue-421-parms.yaml: -------------------------------------------------------------------------------- 1 | petIdParam: 2 | name: petId 3 | in: path 4 | description: ID of pet to return 5 | required: true 6 | schema: 7 | type: integer 8 | format: int64 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/common/paging.yaml: -------------------------------------------------------------------------------- 1 | Paging: 2 | properties: 3 | total_items: 4 | type: integer 5 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/common/paging2.yaml: -------------------------------------------------------------------------------- 1 | Paging2: 2 | properties: 3 | total_items: 4 | type: integer 5 | foobar: 6 | $ref: '../common2/bar.yaml#/Foobar' 7 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/common/pagingWithFolderRef.yaml: -------------------------------------------------------------------------------- 1 | Paging: 2 | properties: 3 | total_items: 4 | type: integer 5 | foobar: 6 | $ref: './common2/bar.yaml#/Foobar' 7 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/common2/bar.yaml: -------------------------------------------------------------------------------- 1 | Foobar: 2 | properties: 3 | message: 4 | type: string 5 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/components/entities.yaml: -------------------------------------------------------------------------------- 1 | components: 2 | schemas: 3 | Category: 4 | properties: 5 | name: 6 | type: string 7 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/events.yaml: -------------------------------------------------------------------------------- 1 | get: 2 | description: A list of events 3 | operationId: getEvents 4 | responses: 5 | '200': 6 | description: OK 7 | content: 8 | application/json; charset=utf-8: 9 | schema: 10 | required: 11 | - paging 12 | - items 13 | type: object 14 | properties: 15 | paging: 16 | $ref: './common/paging.yaml#/Paging' 17 | items: 18 | $ref: './issue-312.yaml#/components/schemas/StatusResponse' 19 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/eventsCase9.yaml: -------------------------------------------------------------------------------- 1 | get: 2 | description: A list of events 3 | operationId: getEvents 4 | responses: 5 | '200': 6 | description: OK 7 | content: 8 | application/json; charset=utf-8: 9 | schema: 10 | type: object 11 | properties: 12 | paging: 13 | $ref: './common/pagingWithFolderRef.yaml#/Paging' 14 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/eventsWithItems.yaml: -------------------------------------------------------------------------------- 1 | get: 2 | description: A list of events 3 | operationId: getEvents 4 | responses: 5 | '200': 6 | description: OK 7 | content: 8 | application/json; charset=utf-8: 9 | schema: 10 | required: 11 | - paging 12 | - items 13 | type: object 14 | properties: 15 | paging: 16 | $ref: './common/paging.yaml#/Paging' 17 | items: 18 | $ref: './common2/bar.yaml#/Foobar' -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/eventsWithPaging.yaml: -------------------------------------------------------------------------------- 1 | get: 2 | description: A list of events 3 | operationId: getEvents 4 | responses: 5 | '200': 6 | description: OK 7 | content: 8 | application/json; charset=utf-8: 9 | schema: 10 | type: object 11 | properties: 12 | paging: 13 | $ref: './common/paging2.yaml#/Paging2' 14 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/issue-304_parent.json: -------------------------------------------------------------------------------- 1 | { 2 | "components": { 3 | "schemas": { 4 | "BaseEntity": { 5 | "type": "object", 6 | "discriminator": "baseEntity", 7 | "properties": { 8 | "entityId": { 9 | "type": "integer", 10 | "format": "int64" 11 | } 12 | } 13 | } 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/issue-306.yaml: -------------------------------------------------------------------------------- 1 | openapi: '3.0.0' 2 | components: 3 | schemas: 4 | Animal: 5 | required: 6 | - id 7 | properties: 8 | id: 9 | type: string 10 | categories: 11 | $ref: './components/entities.yaml#/components/schemas/Category' 12 | Inventory: 13 | properties: 14 | book: 15 | $ref: './book.yaml' 16 | Orders: 17 | properties: 18 | book: 19 | $ref: 'book.yaml' -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/issue-312.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - url: 'https://example.com/api/v1' 4 | info: 5 | title: Test API 6 | version: '1' 7 | paths: 8 | /events: 9 | $ref: './events.yaml' 10 | 11 | components: 12 | schemas: 13 | StatusResponse: 14 | properties: 15 | http_code: 16 | type: integer -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/issue-314.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - url: 'https://example.com/api/v1' 4 | info: 5 | title: Test API 6 | version: '1' 7 | paths: 8 | /events: 9 | $ref: './eventsWithItems.yaml' 10 | components: 11 | schemas: 12 | StatusResponse: 13 | properties: 14 | http_code: 15 | type: integer -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/issue-316.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - url: 'https://example.com/api/v1' 4 | info: 5 | title: Test API 6 | version: '1' 7 | paths: 8 | /events: 9 | $ref: './eventsWithPaging.yaml' 10 | components: 11 | schemas: 12 | StatusResponse: 13 | properties: 14 | http_code: 15 | type: integer 16 | 17 | 18 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/issue-323.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - url: 'https://example.com/api/v1' 4 | info: 5 | title: Test API 6 | version: '1' 7 | paths: 8 | /events: 9 | $ref: './eventsCase9.yaml' 10 | components: 11 | schemas: 12 | StatusResponse: 13 | properties: 14 | http_code: 15 | type: integer 16 | 17 | 18 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/issue-328-events.yaml: -------------------------------------------------------------------------------- 1 | get: 2 | description: A list of events 3 | operationId: getEvents 4 | responses: 5 | 200: 6 | description: OK 7 | content: 8 | "*/*": 9 | schema: 10 | type: object 11 | properties: 12 | paging: 13 | $ref: 'http://localhost:8080/resources/swagger/common/issue-328-paging.yaml#/Paging' 14 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/issue-328.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - url: 'https://example.com/api/v1' 4 | info: 5 | title: Test API 6 | version: '1' 7 | paths: 8 | /events: 9 | $ref: 'http://localhost:8080/resources/swagger/issue-328-events.yaml' 10 | components: 11 | schemas: 12 | StatusResponse: 13 | properties: 14 | http_code: 15 | type: integer -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/issue-335.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.0.0", 3 | "servers": [ 4 | { 5 | "url": "https://api.foo.com/" 6 | } 7 | ], 8 | "info": { 9 | "version": "1.0.0", 10 | "title": "FooAPI", 11 | "description": "API for all accesses to the Foo server system", 12 | "termsOfService": "TBD", 13 | "contact": { 14 | "name": "Foo API Team" 15 | }, 16 | "license": { 17 | "name": "MIT" 18 | } 19 | }, 20 | "paths": { 21 | "/bar": { 22 | "$ref": "./Bar.json#/bar" 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/paging.yaml: -------------------------------------------------------------------------------- 1 | Paging: 2 | type: object 3 | properties: 4 | total_items: 5 | type: integer 6 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/title/issue-336-copy.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "title":"copy", 4 | "description":"Copy of a title", 5 | "properties": { 6 | "barcode": { 7 | "type": "string", 8 | "pattern": "^[0-9]{1,38}$", 9 | "description": "Barcode for the title" 10 | }, 11 | "qr_code": { 12 | "type": "string", 13 | "description": "QR code for the title" 14 | }, 15 | "known_defect": { 16 | "type": "string", 17 | "description": "Known defects" 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-file-references/title/issue-336-reservation.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "title":"reservation", 4 | "description":"Copy of a title", 5 | "properties": { 6 | "when_made": { 7 | "type": "string", 8 | "format": "date", 9 | "description": "Date of this title" 10 | }, 11 | "when_expires": { 12 | "type": "string", 13 | "format": "date", 14 | "description": "Date when title expires" 15 | }, 16 | "required": ["when_made", "when_expires"] 17 | } 18 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-items-references/a.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: [] 3 | info: 4 | title: test 5 | version: 0.0.0 6 | paths: {} 7 | components: 8 | schemas: 9 | 'y': 10 | type: object 11 | properties: 12 | zs: 13 | type: array 14 | items: 15 | $ref: "#/components/schemas/z" 16 | z: 17 | type: object 18 | properties: 19 | ws: 20 | type: object 21 | additionalProperties: 22 | type: array 23 | $ref: "#/components/schemas/w" 24 | w: 25 | type: object 26 | properties: 27 | name: 28 | type: string -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-items-references/b.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | openapi: "3.0" 3 | info: 4 | title: test 5 | version: '0.0.0' 6 | paths: {} 7 | components: 8 | schemas: 9 | x: 10 | $ref: "./a.yaml#/components/schemas/y" 11 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-network-references/common/issue-330-entities.yaml: -------------------------------------------------------------------------------- 1 | components: 2 | schemas: 3 | Address: 4 | title: the address 5 | properties: 6 | street: 7 | type: string 8 | phone: 9 | $ref: "#/components/schemas/Phone" 10 | Phone: 11 | title: the phone number 12 | type: string 13 | example: '408-867-5309' -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-network-references/common/issue-330-paging.yaml: -------------------------------------------------------------------------------- 1 | Paging: 2 | properties: 3 | total_items: 4 | type: integer 5 | user: 6 | $ref: './users.yaml' 7 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-network-references/common/issue-330-users.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | title: the user 3 | properties: 4 | name: 5 | type: string 6 | address: 7 | $ref: 'http://server2/resources/common/entities.yaml#/components/schemas/Address' -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-network-references/issue-330.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - url: 'https://example.com/api/v1' 4 | info: 5 | title: Test API 6 | version: '1' 7 | paths: 8 | /events: 9 | get: 10 | description: A list of events 11 | operationId: getEvents 12 | responses: 13 | '200': 14 | description: OK 15 | content: 16 | application/json; charset=utf-8: 17 | schema: 18 | type: object 19 | properties: 20 | paging: 21 | $ref: 'http://server1/resources/common/paging.yaml#/Paging' 22 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-network-references/issue-411-server.yaml: -------------------------------------------------------------------------------- 1 | openapi: '3.0.0' 2 | info: 3 | title: groovy 4 | description: stuff 5 | version: '2.0.0' 6 | paths: 7 | /health: 8 | $ref: 'http://remote2/resources/foo#/pathItems/health' 9 | /stuff: 10 | get: 11 | parameters: 12 | - $ref: 'http://remote2/resources/foo#/parameters/skip' 13 | responses: 14 | 200: 15 | $ref: 'http://remote2/resources/foo#/responses/Success' 16 | 400: 17 | description: bad stuff! 18 | content: 19 | '*/*': 20 | schema: 21 | $ref: 'http://remote2/resources/foo#/components/schemas/Error' -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-references-2/main.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | openapi: "3.0.0" 3 | info: 4 | title: test 5 | version: '0.0.0' 6 | paths: {} 7 | components: 8 | schemas: 9 | GreetingResponse: 10 | $ref: "./schemas/greeting-response.yaml" 11 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-references-2/schemas/greeting-message.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | Text: 4 | description: Text message 5 | type: string 6 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-references-2/schemas/greeting-response.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | GreetingMessage: 4 | $ref: ./shared-defs.yaml#/components/schemas/GreetingMessage 5 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-references-2/schemas/shared-defs.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | openapi: "3.0.0" 3 | info: 4 | title: shared test 5 | version: '0.0.0' 6 | paths: { } 7 | components: 8 | schemas: 9 | GreetingMessage: 10 | $ref: ./greeting-message.yaml 11 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-references-3/greeting-message.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | Text: 4 | description: Text message 5 | type: string 6 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-references-3/greeting-response.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | GreetingMessage: 4 | $ref: ./shared-defs.yaml#/components/schemas/GreetingMessage 5 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-references-3/main.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | openapi: "3.0.0" 3 | info: 4 | title: test 5 | version: '0.0.0' 6 | paths: {} 7 | components: 8 | schemas: 9 | GreetingResponse: 10 | $ref: "./greeting-response.yaml" 11 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-references-3/shared-defs.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | openapi: "3.0.0" 3 | info: 4 | title: shared test 5 | version: '0.0.0' 6 | paths: { } 7 | components: 8 | schemas: 9 | GreetingMessage: 10 | $ref: ./greeting-message.yaml 11 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-references-4/main.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | openapi: "3.0.0" 3 | info: 4 | title: test 5 | version: '0.0.0' 6 | paths: {} 7 | components: 8 | schemas: 9 | GreetingResponse: 10 | $ref: "./schemas/sub/greeting-response.yaml" 11 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-references-4/schemas/shared-defs.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | openapi: "3.0.0" 3 | info: 4 | title: shared test 5 | version: '0.0.0' 6 | paths: { } 7 | components: 8 | schemas: 9 | GreetingMessage: 10 | $ref: ./sub/greeting-message.yaml 11 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-references-4/schemas/sub/greeting-message.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | Text: 4 | description: Text message 5 | type: string 6 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-references-4/schemas/sub/greeting-response.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | GreetingMessage: 4 | $ref: ../shared-defs.yaml#/components/schemas/GreetingMessage 5 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-references/a.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | openapi: "3.0.0" 3 | info: 4 | title: test 5 | version: '0.0.0' 6 | paths: {} 7 | components: 8 | schemas: 9 | y: 10 | $ref: "#/components/schemas/z" 11 | z: 12 | type: object 13 | properties: 14 | name: 15 | type: string 16 | j: 17 | $ref: "./b.yaml#/components/schemas/k" 18 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/nested-references/b.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | openapi: "3.0.0" 3 | info: 4 | title: test 5 | version: '0.0.0' 6 | paths: {} 7 | components: 8 | schemas: 9 | x: 10 | $ref: "./a.yaml#/components/schemas/y" 11 | i: 12 | $ref: "./a.yaml#/components/schemas/j" 13 | k: 14 | type: object 15 | title: k-definition 16 | properties: 17 | name: 18 | type: string 19 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/oapi-reference-test/components/referent.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | type: object 3 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/oapi-reference-test/components/response-with-reference.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | description: Response with schema containing reference 3 | content: 4 | application/json: 5 | schema: 6 | $ref: "./schema-with-reference.yaml" 7 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/oapi-reference-test/components/schema-with-reference.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | type: object 3 | properties: 4 | reference_array: 5 | type: array 6 | items: 7 | $ref: "./referent.yaml" 8 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/oapi-reference-test/index.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | openapi: "3.0.0" 3 | externalDocs: 4 | description: Test 5 | url: http://test.com/test 6 | info: 7 | version: 0.0.1 8 | title: Test 9 | license: 10 | name: Test 11 | url: http://test.com/test 12 | servers: 13 | - url: http://test.com/test 14 | paths: 15 | /: 16 | get: 17 | description: Test 18 | summary: Test 19 | operationId: getTest 20 | responses: 21 | 200: 22 | $ref: "./components/response-with-reference.yaml" 23 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/oapi-reference-test2/components/referent.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | type: object 3 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/oapi-reference-test2/components/schema-with-reference.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | type: object 3 | properties: 4 | reference_array: 5 | type: array 6 | items: 7 | $ref: "./referent.yaml" 8 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/oapi-reference-test2/index.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | openapi: "3.0.0" 3 | externalDocs: 4 | description: Test 5 | url: http://test.com/test 6 | info: 7 | version: 0.0.1 8 | title: Test 9 | license: 10 | name: Test 11 | url: http://test.com/test 12 | servers: 13 | - url: http://test.com/test 14 | paths: 15 | /: 16 | get: 17 | description: Test 18 | summary: Test 19 | operationId: getTest 20 | responses: 21 | 200: 22 | description: Response with schema containing reference 23 | content: 24 | application/json: 25 | schema: 26 | $ref: "./components/schema-with-reference.yaml" 27 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/oas3-refs-test/components/examples/parameter/header/correlation_id.json: -------------------------------------------------------------------------------- 1 | { 2 | "summary": "A correlation id.", 3 | "description": "A correlation-id header with a randomized id value.", 4 | "value": "7758b780aaaca" 5 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/oas3-refs-test/components/parameters/header/adopt/correlation_id.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Correlation-Id", 3 | "in": "header", 4 | "description": "Correlation ID for distributed tracing.", 5 | "required": false, 6 | "schema": { 7 | "$ref": "../../../schemas/correlation_id.json" 8 | }, 9 | "examples": { 10 | "correlation_id": { 11 | "$ref": "../../../examples/parameter/header/correlation_id.json" 12 | } 13 | }, 14 | "x-redacted": true 15 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/oas3-refs-test/components/schemas/adoption_request_for_bird.json: -------------------------------------------------------------------------------- 1 | { 2 | "allOf": [ 3 | { 4 | "$ref": "./adoption_request.json" 5 | }, 6 | { 7 | "title": "Adoption Request for Bird", 8 | "description": "A bird adoption request.", 9 | "type": "object", 10 | "properties": { 11 | "have_birdcage": { 12 | "description": "Indicates if the adopter has a birdcage.", 13 | "type": "boolean", 14 | "x-redacted": true 15 | } 16 | } 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/oas3-refs-test/components/schemas/adoption_request_for_fish.json: -------------------------------------------------------------------------------- 1 | { 2 | "allOf": [ 3 | { 4 | "$ref": "./adoption_request.json" 5 | }, 6 | { 7 | "title": "Adoption Request for Fish", 8 | "description": "A fish adoption request.", 9 | "type": "object", 10 | "properties": { 11 | "have_aquarium": { 12 | "description": "Indicates if the adopter has an aquarium.", 13 | "type": "boolean", 14 | "x-redacted": false 15 | } 16 | } 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/oas3-refs-test/components/schemas/alias_array.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "array", 3 | "title": "AdopterAlias", 4 | "items": { 5 | "allOf": [ 6 | { 7 | "$ref": "full_name.json" 8 | }, 9 | { 10 | "description": "The adopter's address.", 11 | "x-redacted": true 12 | } 13 | ] 14 | } 15 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/oas3-refs-test/components/schemas/correlation_id.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Correlation Id", 3 | "description": "A correlation id used for debugging.", 4 | "type": "string", 5 | "minLength": 1, 6 | "maxLength": 100, 7 | "pattern": "^.*$" 8 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/oas3-refs-test/components/schemas/date_no_time.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "string", 3 | "description": "The stand-alone date, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent special legal values, such as a date of birth, you should use dates with no associated time or time-zone data. Whenever possible, use the standard `date_time` type. This regular expression does not validate all dates. For example, February 31 is valid and nothing is known about leap years.", 4 | "minLength": 10, 5 | "maxLength": 10, 6 | "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$" 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/oas3-refs-test/components/schemas/full_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Name", 3 | "description": "Name of the Pet.", 4 | "type": "string", 5 | "minLength": 1, 6 | "maxLength": 100 7 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/oas3-refs-test/components/schemas/links.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Links", 3 | "description": "Resource links.", 4 | "type": "array", 5 | "minItems": 1, 6 | "maxItems": 100, 7 | "items": { 8 | "allOf": [ 9 | { 10 | "$ref": "../../common_components/v5/schema/json/openapi-3.0/components/schemas/rest/link_description.json" 11 | }, 12 | { 13 | "x-redacted": false 14 | } 15 | ] 16 | } 17 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/oas3-refs-test/components/schemas/vaccinations.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Vaccinations", 3 | "description": "List of vaccinations.", 4 | "type": "array", 5 | "minItems": 1, 6 | "maxItems": 1000, 7 | "items": { 8 | "$ref": "./vaccination_record.json" 9 | } 10 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/oas3-refs-test/components/schemas/vaccine_id.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Vaccine ID", 3 | "description": "Unique ID of a vaccine as defined by the external partner's system.", 4 | "type": "string", 5 | "minLength": 1, 6 | "maxLength": 5000, 7 | "pattern": "^.*$", 8 | "x-redacted": false 9 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/oas3-refs-test/components/schemas/vaccine_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Vaccine Name", 3 | "description": "Name of the vaccine.", 4 | "type": "string", 5 | "minLength": 1, 6 | "maxLength": 1000, 7 | "pattern": "^[A-Za-z0-9 ]+$", 8 | "x-redacted": true 9 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/oneof_name_conflict/relative_ref/OtherPets.yaml: -------------------------------------------------------------------------------- 1 | components: 2 | schemas: 3 | Cat: 4 | type: object 5 | required: 6 | - pet_type 7 | properties: 8 | pet_type: 9 | type: string 10 | name: 11 | type: string -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/over-quoted-example.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: [] 3 | paths: 4 | /newPerson: 5 | post: 6 | summary: Create new person 7 | description: Create new person 8 | responses: 9 | '200': 10 | description: OK 11 | content: 12 | '*/*': 13 | schema: 14 | $ref: "#/components/schemas/CustomerType" 15 | info: 16 | version: '' 17 | title: '' 18 | components: 19 | schemas: 20 | CustomerType: 21 | type: string 22 | example: NoQuotePlease -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/ref-without-component/a.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | paths: 3 | "/newPerson": 4 | post: 5 | summary: Create new person 6 | description: Create new person 7 | responses: 8 | '200': 9 | description: ok 10 | content: 11 | "*/*": 12 | schema: 13 | "$ref": "./ref-without-component/b.yaml#/components/schemas/CustomerType" 14 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/ref-without-component/b.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | components: 3 | schemas: 4 | CustomerType: 5 | type: string 6 | example: Example value 7 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/refs-name-conflict/b.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | servers: [] 3 | info: 4 | version: '' 5 | title: '' 6 | paths: {} 7 | components: 8 | schemas: 9 | PersonObj: 10 | properties: 11 | location: 12 | type: string 13 | example: referred -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/refs-name-conflict/c.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | servers: [] 3 | info: 4 | version: '' 5 | title: '' 6 | paths: {} 7 | components: 8 | schemas: 9 | PersonObj: 10 | properties: 11 | location: 12 | type: string 13 | example: referred-again -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-file-references/json/models/conflict.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": { 3 | "description": "A model that will generate an intentional name conflict with foo.json", 4 | "type": "object", 5 | "properties": { 6 | "hello1": { 7 | "type": "string" 8 | }, 9 | "world2": { 10 | "type": "integer" 11 | } 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-file-references/json/models/error.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "The error model", 3 | "type": "object", 4 | "properties": { 5 | "code": { 6 | "type": "string" 7 | }, 8 | "message": { 9 | "type": "string" 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-file-references/json/models/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "The example model", 3 | "type": "object", 4 | "properties": { 5 | "foo": { 6 | "type": "string" 7 | }, 8 | "bar": { 9 | "type": "integer" 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-file-references/json/models/foo.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "Just another model", 3 | "type": "object", 4 | "properties": { 5 | "hello": { 6 | "type": "string" 7 | }, 8 | "world": { 9 | "type": "integer" 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-file-references/json/models/health.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "The health model", 3 | "type": "object", 4 | "properties": { 5 | "status": { 6 | "type": "string" 7 | }, 8 | "cpuUtilization": { 9 | "type": "integer" 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-file-references/json/models/pet.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": [ 3 | "name", 4 | "petType" 5 | ], 6 | "discriminator": { 7 | "propertyName": "petType" 8 | }, 9 | "properties": { 10 | "name": { 11 | "type": "string" 12 | }, 13 | "petType": { 14 | "type": "string" 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-file-references/json/models/reflex.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "properties": { 4 | "name": { 5 | "type": "string" 6 | }, 7 | "speedInMilliseconds": { 8 | "type": "integer" 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-file-references/json/responses/errorResponses.json: -------------------------------------------------------------------------------- 1 | { 2 | "bad-request": { 3 | "description": "Your request was not valid", 4 | "content": { 5 | "*/*": { 6 | "schema": { 7 | "$ref": "../models/error.json" 8 | } 9 | } 10 | } 11 | }, 12 | "internal-server-error": { 13 | "description": "An unexpected error occur during processing", 14 | "content": { 15 | "*/*": { 16 | "schema": { 17 | "$ref": "../models/error.json" 18 | } 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-file-references/yaml/models/conflict.yaml: -------------------------------------------------------------------------------- 1 | foo: 2 | description: A model that will generate an intentional name conflict with foo.yaml 3 | type: object 4 | properties: 5 | hello1: 6 | type: string 7 | world2: 8 | type: integer 9 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-file-references/yaml/models/error.yaml: -------------------------------------------------------------------------------- 1 | description: The error model 2 | type: object 3 | properties: 4 | code: 5 | type: string 6 | message: 7 | type: string 8 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-file-references/yaml/models/example.yaml: -------------------------------------------------------------------------------- 1 | description: The example model 2 | type: object 3 | properties: 4 | foo: 5 | type: string 6 | bar: 7 | type: integer 8 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-file-references/yaml/models/foo.yaml: -------------------------------------------------------------------------------- 1 | description: Just another model 2 | type: object 3 | properties: 4 | hello: 5 | type: string 6 | world: 7 | type: integer 8 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-file-references/yaml/models/health.yaml: -------------------------------------------------------------------------------- 1 | description: The health model 2 | type: object 3 | properties: 4 | status: 5 | type: string 6 | cpuUtilization: 7 | type: integer 8 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-file-references/yaml/models/localreference.yaml: -------------------------------------------------------------------------------- 1 | localArray: 2 | description: This array has references to this file 3 | type: array 4 | items: 5 | $ref: "#/referencedByLocalArray" 6 | referencedByLocalArray: 7 | properties: 8 | hello1: 9 | type: string 10 | world2: 11 | type: integer 12 | localObject: 13 | properties: 14 | hello1: 15 | $ref: "#/referencedByLocalElement" 16 | shareprefix: 17 | $ref: "#/referencedBy" 18 | referencedByLocalElement: 19 | properties: 20 | hello1: 21 | type: string 22 | world2: 23 | type: integer 24 | referencedBy: 25 | properties: 26 | shareprefix: 27 | type: string 28 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-file-references/yaml/models/pet.yaml: -------------------------------------------------------------------------------- 1 | required: 2 | - name 3 | - petType 4 | discriminator: 5 | propertyName: petType 6 | properties: 7 | name: 8 | type: string 9 | petType: 10 | type: string 11 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-file-references/yaml/models/reflex.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | name: 4 | type: string 5 | speedInMilliseconds: 6 | type: integer 7 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-file-references/yaml/parameters/params.yaml: -------------------------------------------------------------------------------- 1 | param1: 2 | name: param1 3 | in: query 4 | required: false 5 | schema: 6 | type: string 7 | param2: 8 | name: param2 9 | in: header 10 | required: false 11 | schema: 12 | type: string 13 | param3: 14 | name: param3 15 | in: path 16 | required: false 17 | schema: 18 | type: string 19 | param4: 20 | name: param4 21 | in: header 22 | required: false 23 | schema: 24 | type: string 25 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-file-references/yaml/responses/errorResponses.yaml: -------------------------------------------------------------------------------- 1 | bad-request: 2 | description: Your request was not valid 3 | content: 4 | '*/*': 5 | schema: 6 | $ref: ../models/error.yaml 7 | internal-server-error: 8 | description: An unexpected error occur during processing 9 | content: 10 | '*/*': 11 | schema: 12 | $ref: ../models/error.yaml 13 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-issue/api.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | version: '0.0.1' 4 | title: 'Parser debug' 5 | description: 'Parser debug' 6 | paths: 7 | /scans: 8 | get: 9 | responses: 10 | 200: 11 | description: Yay 12 | 500: 13 | $ref: './subfolder/domain.yaml#/components/responses/ErrorResponse' 14 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-references-example/_responses/UnexpectedError.yaml: -------------------------------------------------------------------------------- 1 | description: unexpected error 2 | content: 3 | application/json: 4 | schema: 5 | $ref : "../_schemas/error.yaml" 6 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-references-example/_schemas/error.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | code: 4 | type: string 5 | message: 6 | type: string 7 | required: 8 | - code 9 | - message 10 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-references-example/openapi.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | version: 1.0.0 4 | title: x 5 | description: desc 6 | license: 7 | name: public domain 8 | contact: 9 | name: API Support 10 | url: http://www.example.com/support 11 | email: support@example.com 12 | paths: 13 | /authorize: 14 | $ref: 'security/_resources/authorize.yaml' 15 | /login: 16 | $ref: 'security/_resources/login.yaml' 17 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-references-example/security/_resources/authorize.yaml: -------------------------------------------------------------------------------- 1 | post: 2 | tags: 3 | - Security 4 | description: authorize the user 5 | summary: authorize the user 6 | operationId: authorize.user 7 | responses: 8 | "200": 9 | description: authorize 200 response 10 | content: 11 | text/plain: 12 | schema: 13 | type: string 14 | default: 15 | $ref: '../../_responses/UnexpectedError.yaml' 16 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-references-example/security/_resources/login.yaml: -------------------------------------------------------------------------------- 1 | post: 2 | tags: 3 | - Security 4 | description: login 5 | summary: login 6 | operationId: login 7 | parameters: [] 8 | requestBody: 9 | content: 10 | application/json: 11 | schema: 12 | $ref: '../_schemas/usernamepasswordcredentials.yaml' 13 | application/x-www-form-urlencoded: 14 | schema: 15 | $ref: '../_schemas/usernamepasswordcredentials.yaml' 16 | required: true 17 | responses: 18 | "200": 19 | description: login 200 response 20 | content: 21 | application/json: 22 | schema: 23 | type: object 24 | security: [] 25 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-references-example/security/_schemas/usernamepasswordcredentials.yaml: -------------------------------------------------------------------------------- 1 | required: 2 | - password 3 | - username 4 | type: object 5 | properties: 6 | password: 7 | minLength: 1 8 | type: string 9 | username: 10 | minLength: 1 11 | type: string 12 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-upper-directory/Schemas/schema.yaml: -------------------------------------------------------------------------------- 1 | definitions: 2 | AddressEx: 3 | type: object 4 | properties: 5 | Type: 6 | enum: 7 | - Residential 8 | - Business 9 | type: string 10 | Street: 11 | type: string 12 | City: 13 | type: string 14 | State: 15 | type: string 16 | Address: 17 | type: object 18 | properties: 19 | Street: 20 | type: string 21 | City: 22 | type: string 23 | State: 24 | type: string -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-upper-directory/swagger.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - url: 'http://paeshin-w7/SwaggerTest' 4 | - url: 'https://paeshin-w7/SwaggerTest' 5 | info: 6 | version: v1 7 | title: SwaggerTest 8 | description: Service for Swagger and JSON schema testing 9 | paths: 10 | /api/Address: 11 | $ref: "Paths/Address.yaml" -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-with-url/relative-with-local.yaml: -------------------------------------------------------------------------------- 1 | relative-same-file: 2 | properties: 3 | data: 4 | type: object -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative-with-url/relative-with-url.yaml: -------------------------------------------------------------------------------- 1 | relative-with-url: 2 | properties: 3 | Foo: 4 | $ref: https://my.example.remote.url.com/globals.yaml#/components/schemas/link-object 5 | Bar: 6 | $ref: relative-with-local.yaml#/relative-same-file 7 | 8 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative/additionalProperties.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | openapi: 3.0.0 3 | servers: 4 | - url: http://swagger.io/show-bug 5 | info: 6 | title: Test API 7 | version: 1.0.0 8 | paths: 9 | "/tests": 10 | get: 11 | operationId: listTests 12 | responses: 13 | '200': 14 | description: Returns results. 15 | content: 16 | application/json: 17 | schema: 18 | "$ref": "./globals.yaml#/components/schemas/result" -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relative/globals.yaml: -------------------------------------------------------------------------------- 1 | components: 2 | schemas: 3 | link-object: 4 | type: object 5 | additionalProperties: 6 | "$ref": "#/components/schemas/rel-data" 7 | rel-data: 8 | type: object 9 | required: 10 | - href 11 | properties: 12 | href: 13 | type: string 14 | note: 15 | type: string 16 | result: 17 | type: object 18 | properties: 19 | name: 20 | type: string 21 | _links: 22 | "$ref": "#/components/schemas/link-object" 23 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relativeParent/root/root.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | title: MyExampleSpec 4 | version: 1.0.0 5 | description: >- 6 | paths: {} 7 | components: 8 | schemas: 9 | MyExampleSchema: 10 | description: >- 11 | properties: 12 | id: 13 | description: The id of MyExampleSchema. 14 | type: string 15 | message: 16 | description: The message of MyExampleSchema. 17 | $ref: ../specs/specs.yaml#/components/schemas/Message 18 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relativeParent/specs/specs.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | title: Specs 4 | description: >- 5 | paths: {} 6 | components: 7 | schemas: 8 | Message: 9 | properties: 10 | id: 11 | description: The id of Message. 12 | type: string 13 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/relativeTest.yaml: -------------------------------------------------------------------------------- 1 | RelativeObj: 2 | type: object 3 | properties: 4 | lorem: 5 | type: object 6 | properties: 7 | firstName: 8 | type: string 9 | lastName: 10 | type: string -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/remote_references/remote_callback.yaml: -------------------------------------------------------------------------------- 1 | '$response.body#/successUrl': 2 | post: 3 | requestBody: 4 | $ref: "#/components/requestBodies/requestBody1" 5 | responses: 6 | '200': 7 | description: Consumer acknowledged the callback -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/remote_references/remote_example.yaml: -------------------------------------------------------------------------------- 1 | summary: An example of a cat -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/remote_references/remote_link.yaml: -------------------------------------------------------------------------------- 1 | operationId: cancelHookCallback 2 | parameters: 3 | id: $response.body#/hookId 4 | x-link: link extension -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/remote_references/remote_parameter.yaml.template: -------------------------------------------------------------------------------- 1 | in: query 2 | description: Status values that need to be considered for filter 3 | required: true 4 | schema: 5 | type: integer 6 | "$ref": "http://localhost:${dynamicPort}/remote/schema#/components/schemas/User" -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/remote_references/remote_responses.yaml.template: -------------------------------------------------------------------------------- 1 | responses: 2 | RemoteResponse: 3 | description: Remote Description 4 | content: 5 | application/json: 6 | schema: 7 | $ref: 'http://localhost:${dynamicPort}/remote/schema#/components/schemas/ExtendedErrorModel' 8 | IllegalInput: 9 | description: Illegal input for operation. 10 | GeneralError: 11 | description: General Error 12 | content: 13 | application/json: 14 | schema: 15 | $ref: 'http://localhost:${dynamicPort}/remote/schema#/components/schemas/ExtendedErrorModel' -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/remote_references/remote_securityScheme.yaml: -------------------------------------------------------------------------------- 1 | petstore_remote: 2 | type: oauth2 3 | flows: 4 | implicit: 5 | authorizationUrl: http://petstore.swagger.io/oauth/dialog 6 | scopes: 7 | write:pets: modify pets in your account 8 | read:pets: read your pets -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/resolverIssue/Beta-1-swagger.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.3 2 | paths: 3 | /v2/bookings: 4 | post: 5 | tags: 6 | - Booking Request 7 | summary: Post a booking request 8 | description: | 9 | Creates a new booking request 10 | requestBody: 11 | description: Parameters used to create a booking request 12 | required: true 13 | content: 14 | application/json: 15 | schema: 16 | allOf: 17 | - $ref: 'DOCUMENTATION_DOMAIN-3.0.0-domain.yaml#/components/schemas/dangerousGood' 18 | components: 19 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/same-refs-different-model-domain.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | 3 | components: 4 | parameters: 5 | requestid: 6 | name: X-requestid 7 | in: header 8 | required: false 9 | schema: 10 | type: string 11 | format: uuid -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/same-refs-different-model-valid.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | title: issue 4 | version: 1.0.01 5 | 6 | paths: 7 | /bar: 8 | parameters: 9 | - $ref: "#/components/parameters/requestid" 10 | delete: 11 | responses: 12 | '204': 13 | description: Deleted 14 | headers: 15 | X-requestid: 16 | $ref: "#/components/parameters/requestid" 17 | 18 | components: 19 | parameters: 20 | requestid: 21 | name: X-requestid 22 | in: header 23 | required: false 24 | schema: 25 | type: string 26 | format: uuid -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/same-refs-different-model.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | title: issue 4 | version: 1.0.01 5 | 6 | paths: 7 | /bar: 8 | parameters: 9 | - $ref: 'http://localhost:${dynamicPort}/issue-domain/#/components/parameters/requestid' 10 | delete: 11 | responses: 12 | '204': 13 | description: Deleted 14 | headers: 15 | X-requestid: 16 | $ref: 'http://localhost:${dynamicPort}/issue-domain/#/components/parameters/requestid' -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/sampleWithMinimumValues.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: [] 3 | info: 4 | version: 1.0.0 5 | title: Very simple 6 | paths: 7 | /pets: 8 | get: 9 | parameters: 10 | - in: query 11 | name: limit 12 | schema: 13 | type: integer 14 | format: int32 15 | minimum: 0 16 | responses: 17 | '200': 18 | description: Returns all the pets 19 | components: 20 | schemas: 21 | Cat: 22 | x-extension-here: 'yes' 23 | properties: 24 | id: 25 | type: integer 26 | format: int64 -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/schemas-default-value/default.yaml: -------------------------------------------------------------------------------- 1 | openapi: '3.0.0' 2 | 3 | info: 4 | title: Test 5 | version: 0.1.0 6 | 7 | paths: {} 8 | 9 | components: 10 | schemas: 11 | Test: 12 | type: string 13 | default: string -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/schemas-default-value/defaultNull.yaml: -------------------------------------------------------------------------------- 1 | openapi: '3.0.0' 2 | 3 | info: 4 | title: Test 5 | version: 0.1.0 6 | 7 | paths: {} 8 | 9 | components: 10 | schemas: 11 | Test: 12 | type: string 13 | default: null -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/schemas-default-value/defaultNullAndNullableFalse.yaml: -------------------------------------------------------------------------------- 1 | openapi: '3.0.0' 2 | 3 | info: 4 | title: Test 5 | version: 0.1.0 6 | 7 | paths: {} 8 | 9 | components: 10 | schemas: 11 | Test: 12 | type: string 13 | default: null 14 | nullable: false -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/schemas-default-value/defaultNullAndNullableTrue.yaml: -------------------------------------------------------------------------------- 1 | openapi: '3.0.0' 2 | 3 | info: 4 | title: Test 5 | version: 0.1.0 6 | 7 | paths: {} 8 | 9 | components: 10 | schemas: 11 | Test: 12 | type: string 13 | default: null 14 | nullable: true -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/space in name/issue-1572.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.3 2 | info: 3 | title: Test issue 1572 - space in path to OpenAPI doc 4 | version: "1" 5 | servers: 6 | - url: / 7 | paths: 8 | /: 9 | get: 10 | responses: 11 | 200: 12 | description: Normal -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/test.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - url: / 4 | info: 5 | description: It works. 6 | version: 1.0.0 7 | title: My API 8 | paths: 9 | /samplePath: 10 | $ref: '/test2.yaml' -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/test2.yaml: -------------------------------------------------------------------------------- 1 | get: 2 | responses: 3 | '200': 4 | description: It works 5 | requestBody: 6 | content: 7 | application/json: 8 | schema: 9 | type: object 10 | required: true -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/validation/path-parameter-validation.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | title: Sample APIs 4 | version: 1.0.0 5 | description: 6 | Sample API 7 | 8 | components: 9 | parameters: 10 | accountId: 11 | name: accountId 12 | schema: 13 | type: string 14 | in: path 15 | required: true 16 | 17 | paths: 18 | /users/{accountId}: 19 | get: 20 | operationId: ReadUser 21 | parameters: 22 | - $ref: "#/components/parameters/accountId" 23 | responses: 24 | '200': 25 | description: 200 response 26 | -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/version-missing.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.3 2 | info: 3 | title: Example API with Style and Explode 4 | version: 5 | paths: {} -------------------------------------------------------------------------------- /modules/swagger-parser-v3/src/test/resources/xyz.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | do_xyz: 3 | get: 4 | description: do xyz stuff 5 | operationId: doXyz 6 | produces: 7 | - application/json 8 | parameters: [] 9 | responses: 10 | '200': {} 11 | default: {} 12 | definitions: 13 | XYZResponse: 14 | properties: 15 | foo: 16 | type: string -------------------------------------------------------------------------------- /modules/swagger-parser/src/test/resources/Issue-783/issue-783-b.yaml: -------------------------------------------------------------------------------- 1 | common: 2 | allOf: 3 | - $ref: "#/core" 4 | - type: object 5 | properties: 6 | attribute: 7 | type: string 8 | direct: 9 | $ref: "#/core" 10 | referenced: 11 | type: array 12 | items: 13 | $ref: "#/core" 14 | 15 | core: 16 | type: object 17 | properties: 18 | coreAttribute: 19 | type: string 20 | inner: 21 | $ref: "#/innerCore" 22 | 23 | innerCore: 24 | type: object 25 | properties: 26 | innerCoreAttribute: 27 | type: string -------------------------------------------------------------------------------- /modules/swagger-parser/src/test/resources/Issue-783/issue-783.yaml: -------------------------------------------------------------------------------- 1 | swagger: 2.0 2 | info: 3 | version: 0.0.1 4 | title: API 5 | paths: 6 | /: 7 | post: 8 | summary: Create 9 | name: user 10 | in: body 11 | description: user to add to the system 12 | required: true 13 | schema: 14 | $ref: '#/definitions/create' 15 | responses: 16 | '200': 17 | description: Successful response 18 | definitions: 19 | create: 20 | type: object 21 | properties: 22 | attribute: 23 | type: string 24 | direct: 25 | $ref: "./issue-783-b.yaml#/common" 26 | referenced: 27 | type: array 28 | items: 29 | $ref: "./issue-783-b.yaml#/common" -------------------------------------------------------------------------------- /modules/swagger-parser/src/test/resources/dynamicRef/dynamicref-example.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.1.0 2 | info: 3 | title: Test DynamicRef 4 | version: 1.0.0 5 | paths: 6 | /tree: 7 | get: 8 | responses: 9 | '200': 10 | description: OK 11 | content: 12 | application/json: 13 | schema: 14 | $ref: "#/components/schemas/Node" 15 | 16 | components: 17 | schemas: 18 | Node: 19 | $id: "https://example.com/schemas/node" 20 | $dynamicAnchor: "node" 21 | type: object 22 | properties: 23 | name: 24 | type: string 25 | children: 26 | type: array 27 | items: 28 | $dynamicRef: "#node" 29 | -------------------------------------------------------------------------------- /modules/swagger-parser/src/test/resources/exampleSpecs/specs/common/dateType_v01.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "date", 3 | "description": "", 4 | "type": "string", 5 | "format": "date" 6 | } -------------------------------------------------------------------------------- /modules/swagger-parser/src/test/resources/exampleSpecs/specs/common/simpleIDType_v01.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "simpleID", 3 | "description": "", 4 | "type": "string", 5 | "pattern": "^[a-zA-Z0-9.$-_\/]+$" 6 | } -------------------------------------------------------------------------------- /modules/swagger-parser/src/test/resources/issue749-main.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: ping test 4 | version: '1.0' 5 | servers: 6 | - url: 'http://localhost:8000/' 7 | paths: 8 | /some/ping: 9 | get: 10 | operationId: pingGet 11 | parameters: 12 | - name: i 13 | in: query 14 | description: Test 15 | required: true 16 | schema: 17 | $ref: './issue749-reference.yaml#/SomeId' 18 | responses: 19 | '201': 20 | description: OK 21 | components: 22 | schemas: {} -------------------------------------------------------------------------------- /modules/swagger-parser/src/test/resources/issue749-reference.yaml: -------------------------------------------------------------------------------- 1 | SomeId: 2 | type: integer 3 | format: int32 4 | description: My value 123 5 | example: 123 -------------------------------------------------------------------------------- /modules/swagger-parser/src/test/resources/issue768-main.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | title: ref test 4 | version: '1.0' 5 | servers: 6 | - url: 'http://localhost:8000/' 7 | paths: 8 | /user/login: 9 | post: 10 | summary: Login 11 | operationId: loginUser 12 | requestBody: 13 | required: true 14 | content: 15 | application/json: 16 | schema: 17 | $ref: "issue768-reference.yaml#/User" 18 | components: 19 | schemas: {} -------------------------------------------------------------------------------- /modules/swagger-parser/src/test/resources/issue768-reference.yaml: -------------------------------------------------------------------------------- 1 | User: 2 | type: "object" 3 | properties: 4 | Name: 5 | type: "string" 6 | Password: 7 | type: "string" 8 | format: "password" -------------------------------------------------------------------------------- /modules/swagger-parser/src/test/resources/issue892-main.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: ping test 4 | version: '1.0' 5 | servers: 6 | - url: 'http://localhost:8000/' 7 | paths: 8 | some/ping: 9 | get: 10 | operationId: pingGet 11 | parameters: 12 | - name: i 13 | in: query 14 | description: Test 15 | required: true 16 | schema: 17 | $ref: './issue749-reference.yaml#/SomeId' 18 | responses: 19 | '201': 20 | description: OK 21 | components: 22 | schemas: {} -------------------------------------------------------------------------------- /modules/swagger-parser/src/test/resources/specs2/common/dateType_v01.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "date", 3 | "description": "", 4 | "type": "string", 5 | "format": "date" 6 | } -------------------------------------------------------------------------------- /modules/swagger-parser/src/test/resources/specs2/common/simpleIDType_v01.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "simpleID", 3 | "description": "", 4 | "type": "string", 5 | "pattern": "^[a-zA-Z0-9.$-_\/]+$" 6 | } --------------------------------------------------------------------------------