Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sample spec to catch external file reference issues in swagger-parser #17773

Merged
merged 2 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading