Skip to content

Commit

Permalink
Add sample spec to catch external file reference issues in swagger-pa…
Browse files Browse the repository at this point in the history
…rser (#17773)

* add a sample that catches swagger-parser issues with external refs

* generate samples for new test spec
  • Loading branch information
ctreatma authored Feb 6, 2024
1 parent 6bcf8cd commit 6e137bb
Show file tree
Hide file tree
Showing 58 changed files with 12,095 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/configs/go-echo-external-refs-test.yaml
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"
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type: string
enum:
- success
- failure
- unclassified
Loading

0 comments on commit 6e137bb

Please sign in to comment.