-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sample spec to catch external file reference issues in swagger-pa…
…rser (#17773) * add a sample that catches swagger-parser issues with external refs * generate samples for new test spec
- Loading branch information
Showing
58 changed files
with
12,095 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
generatorName: go | ||
outputDir: samples/client/echo_api/go-external-refs | ||
inputSpec: modules/openapi-generator/src/test/resources/3_0/external-refs/echo_api.yaml | ||
templateDir: modules/openapi-generator/src/main/resources/go | ||
additionalProperties: | ||
hideGenerationTimestamp: "true" |
46 changes: 46 additions & 0 deletions
46
modules/openapi-generator/src/test/resources/3_0/external-refs/components/paths/string.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,46 @@ | ||
get: | ||
description: Test path parameter(s) | ||
operationId: "tests/path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path}" | ||
parameters: | ||
- explode: false | ||
in: path | ||
name: path_string | ||
required: true | ||
schema: | ||
type: string | ||
style: simple | ||
- explode: false | ||
in: path | ||
name: path_integer | ||
required: true | ||
schema: | ||
type: integer | ||
style: simple | ||
- explode: false | ||
in: path | ||
name: enum_nonref_string_path | ||
required: true | ||
schema: | ||
enum: | ||
- success | ||
- failure | ||
- unclassified | ||
type: string | ||
style: simple | ||
- explode: false | ||
in: path | ||
name: enum_ref_string_path | ||
required: true | ||
schema: | ||
$ref: "../schemas/StringEnumRef.yaml" | ||
style: simple | ||
responses: | ||
"200": | ||
content: | ||
text/plain: | ||
schema: | ||
type: string | ||
description: Successful operation | ||
summary: Test path parameter(s) | ||
tags: | ||
- path |
5 changes: 5 additions & 0 deletions
5
...napi-generator/src/test/resources/3_0/external-refs/components/schemas/StringEnumRef.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,5 @@ | ||
type: string | ||
enum: | ||
- success | ||
- failure | ||
- unclassified |
Oops, something went wrong.