-
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.
Merge pull request #1956 from loplex/bugfix-1955
Bugfix 1955 Schema refs of array parameters are not resolved for renamed schema components
- Loading branch information
Showing
6 changed files
with
126 additions
and
6 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
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
14 changes: 14 additions & 0 deletions
14
modules/swagger-parser-v3/src/test/resources/issue-1955/merged_spec12.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,14 @@ | ||
openapi: 3.0.1 | ||
info: | ||
title: merged spec | ||
version: 1.0.0 | ||
servers: | ||
- url: http://localhost:8080 | ||
|
||
paths: | ||
|
||
/getEmptyOne: | ||
$ref: "./spec1.yaml#/paths/~1getEmptyOne" | ||
|
||
/getEmptyTwo: | ||
$ref: "./spec2.yaml#/paths/~1getEmptyTwo" |
32 changes: 32 additions & 0 deletions
32
modules/swagger-parser-v3/src/test/resources/issue-1955/spec1.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,32 @@ | ||
openapi: 3.0.1 | ||
info: | ||
title: spec 1 | ||
version: 1.0.0 | ||
servers: | ||
- url: http://localhost:8080 | ||
|
||
paths: | ||
|
||
/getEmptyOne: | ||
get: | ||
operationId: getEmptyOne | ||
parameters: | ||
- name: element | ||
in: query | ||
schema: | ||
$ref: '#/components/schemas/myType' | ||
- name: elements | ||
in: query | ||
schema: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/myType' | ||
responses: | ||
"204": | ||
description: empty | ||
|
||
components: | ||
schemas: | ||
|
||
myType: | ||
type: string |
32 changes: 32 additions & 0 deletions
32
modules/swagger-parser-v3/src/test/resources/issue-1955/spec2.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,32 @@ | ||
openapi: 3.0.1 | ||
info: | ||
title: spec 2 | ||
version: 1.0.0 | ||
servers: | ||
- url: http://localhost:8080 | ||
|
||
paths: | ||
|
||
/getEmptyTwo: | ||
get: | ||
operationId: getEmptyTwo | ||
parameters: | ||
- name: element | ||
in: query | ||
schema: | ||
$ref: '#/components/schemas/myType' | ||
- name: elements | ||
in: query | ||
schema: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/myType' | ||
responses: | ||
"204": | ||
description: empty | ||
|
||
components: | ||
schemas: | ||
|
||
myType: | ||
type: integer |
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