-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
2,069 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
Swagger Parser - ${pom.name} | ||
Copyright (c) 2015. SmartBear Software Inc. | ||
Swagger Parser - ${pom.name} is licensed under Apache 2.0 license. | ||
Copy of the Apache 2.0 license can be found in `LICENSE` file. | ||
Copy of the Apache 2.0 license can be found in `LICENSE` file. | ||
|
||
ApiDOM | ||
Copyright 2020 SmartBear Software Inc. | ||
ApiDOM is licensed under Apache 2.0 license. | ||
Directory modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/fixtures was originally created under Apache 2.0 license in https://github.com/swagger-api/apidom repository. | ||
Directory modules/swagger-parser-v3/src/test/resources/3.1.0/resolve/fixtures was originally created under Apache 2.0 license in https://github.com/swagger-api/apidom repository. | ||
These directories have been copied into this project and modified. All modifications are licensed under Apache 2.0 License. | ||
Copy of the Apache 2.0 license can be found in `LICENSES/Apache-2.0.txt` file. | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...swagger-parser-v3/src/test/java/io/swagger/v3/parser/test/OpenAPIV31ParserFSFullTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package io.swagger.v3.parser.test; | ||
|
||
import io.swagger.v3.core.util.Yaml31; | ||
import io.swagger.v3.parser.OpenAPIV3Parser; | ||
import io.swagger.v3.parser.core.models.ParseOptions; | ||
import io.swagger.v3.parser.core.models.SwaggerParseResult; | ||
import org.apache.commons.io.FileUtils; | ||
import org.testng.annotations.Test; | ||
|
||
import java.io.File; | ||
|
||
public class OpenAPIV31ParserFSFullTest { | ||
|
||
@Test | ||
public void testFull() throws Exception { | ||
ParseOptions p = new ParseOptions(); | ||
p.setResolve(true); | ||
String uri = "3.1.0/dereference/fullFS/root.json"; | ||
SwaggerParseResult swaggerParseResult = new OpenAPIV3Parser().readLocation(uri, null, p); | ||
org.testng.Assert.assertEquals(Yaml31.pretty(swaggerParseResult.getOpenAPI()), FileUtils.readFileToString(new File("src/test/resources/3.1.0/dereference/fullFS/dereferenced.yaml"))); | ||
} | ||
} |
91 changes: 91 additions & 0 deletions
91
modules/swagger-parser-v3/src/test/resources/3.1.0/dereference/fullFS/dereferenced.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
openapi: 3.1.0 | ||
servers: | ||
- url: / | ||
paths: | ||
/path1: | ||
summary: path item summary | ||
description: /path3 ex2 | ||
get: {} | ||
/relativeref: | ||
get: | ||
description: RelativeRef domain | ||
operationId: RelativeRef PathItem | ||
responses: | ||
"200": | ||
description: OK | ||
/internalref: | ||
$ref: '#/components/pathItems/InternalRef' | ||
/internalreftoexternal: | ||
$ref: '#/components/pathItems/InternalRefToExternal' | ||
/internal: | ||
get: | ||
description: Internal PathItem | ||
operationId: Internal PathItem | ||
responses: | ||
"200": | ||
description: OK | ||
components: | ||
schemas: | ||
Indirection: | ||
type: object | ||
description: VALUE ex3schema | ||
properties: | ||
prop1: | ||
type: string | ||
IndirectionSiblings: | ||
type: object | ||
description: IndirectionSiblings root | ||
properties: | ||
prop1: | ||
type: string | ||
parameters: | ||
userId: | ||
description: userId root | ||
$ref: '#/components/parameters/indirection1' | ||
indirection1: | ||
$ref: '#/components/parameters/userIdRef' | ||
indirection2: | ||
description: indirection2 root | ||
$ref: '#/components/parameters/userIdRef' | ||
userIdRef: | ||
name: userId | ||
in: query | ||
description: userIdRef root | ||
required: true | ||
style: form | ||
explode: true | ||
externalRef: | ||
name: externalParameter | ||
in: query | ||
description: externalRef root | ||
required: true | ||
style: form | ||
explode: true | ||
externalRefIndirectPointer: | ||
description: externalRefIndirectPointer root | ||
$ref: '#/components/parameters/externalRefIndirect3' | ||
externalRefIndirect3: | ||
name: externalParameter3 | ||
in: query | ||
description: externalRefIndirect3 root | ||
required: true | ||
style: form | ||
explode: true | ||
links: | ||
link1: | ||
operationRef: ./ex.json#/operation | ||
pathItems: | ||
InternalRefToExternal: | ||
get: | ||
description: DomainInternalRefToExternal domain | ||
operationId: DomainInternalRefToExternal PathItem | ||
responses: | ||
"200": | ||
description: OK | ||
InternalRef: | ||
get: | ||
description: InternalRef root | ||
operationId: InternalRef PathItem | ||
responses: | ||
"200": | ||
description: OK |
Oops, something went wrong.