-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #49: Fixed bug where FindParameter does not consider repeat par…
…ameters (#50) * Fixed comparator bug * Fixed optimization bug * Added a second test for out_of_order_parameters
- Loading branch information
Showing
7 changed files
with
210 additions
and
9 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
src/Criteo.OpenApi.Comparator.UTest/Resource/issue_49_false_1015_equal_schemas/diff.json
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,13 @@ | ||
[ | ||
{ | ||
"Severity": "Info", | ||
"Message": "The versions have not changed.", | ||
"OldJsonRef": "#/info/version", | ||
"NewJsonRef": "#/info/version", | ||
"OldJsonPath": "#/info/version", | ||
"NewJsonPath": "#/info/version", | ||
"Id": 1001, | ||
"Code": "NoVersionChange", | ||
"Mode": "Update" | ||
} | ||
] |
27 changes: 27 additions & 0 deletions
27
src/Criteo.OpenApi.Comparator.UTest/Resource/issue_49_false_1015_equal_schemas/new.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,27 @@ | ||
openapi: "3.0.2" | ||
info: | ||
title: "Api" | ||
version: "1.0.1" | ||
paths: | ||
/example: | ||
get: | ||
parameters: | ||
- name: "access_token" | ||
in: "query" | ||
required: false | ||
schema: | ||
anyOf: | ||
- type: "string" | ||
- type: "null" | ||
title: "Access Token" | ||
- name: "access_token" | ||
in: "header" | ||
required: false | ||
schema: | ||
anyOf: | ||
- type: "string" | ||
- type: "null" | ||
title: "Access Token" | ||
responses: | ||
"200": | ||
description: "Successful Response" |
27 changes: 27 additions & 0 deletions
27
src/Criteo.OpenApi.Comparator.UTest/Resource/issue_49_false_1015_equal_schemas/old.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,27 @@ | ||
openapi: "3.0.2" | ||
info: | ||
title: "Api" | ||
version: "1.0.0" | ||
paths: | ||
/example: | ||
get: | ||
parameters: | ||
- name: "access_token" | ||
in: "query" | ||
required: false | ||
schema: | ||
anyOf: | ||
- type: "string" | ||
- type: "null" | ||
title: "Access Token" | ||
- name: "access_token" | ||
in: "header" | ||
required: false | ||
schema: | ||
anyOf: | ||
- type: "string" | ||
- type: "null" | ||
title: "Access Token" | ||
responses: | ||
"200": | ||
description: "Successful Response" |
35 changes: 35 additions & 0 deletions
35
...o.OpenApi.Comparator.UTest/Resource/issue_49_false_1015_out_of_order_parameters/diff.json
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,35 @@ | ||
[ | ||
{ | ||
"Severity": "Info", | ||
"Message": "The versions have not changed.", | ||
"OldJsonRef": "#/info/version", | ||
"NewJsonRef": "#/info/version", | ||
"OldJsonPath": "#/info/version", | ||
"NewJsonPath": "#/info/version", | ||
"Id": 1001, | ||
"Code": "NoVersionChange", | ||
"Mode": "Update" | ||
}, | ||
{ | ||
"Severity": "Error", | ||
"Message": "The order of parameter 'access_token' was changed. ", | ||
"OldJsonRef": "#/paths/~1example/get/parameters", | ||
"NewJsonRef": "#/paths/~1example/get/parameters", | ||
"OldJsonPath": "#/paths/~1example/get/parameters", | ||
"NewJsonPath": "#/paths/~1example/get/parameters", | ||
"Id": 1042, | ||
"Code": "ChangedParameterOrder", | ||
"Mode": "Update" | ||
}, | ||
{ | ||
"Severity": "Error", | ||
"Message": "The order of parameter 'access_token' was changed. ", | ||
"OldJsonRef": "#/paths/~1example/get/parameters", | ||
"NewJsonRef": "#/paths/~1example/get/parameters", | ||
"OldJsonPath": "#/paths/~1example/get/parameters", | ||
"NewJsonPath": "#/paths/~1example/get/parameters", | ||
"Id": 1042, | ||
"Code": "ChangedParameterOrder", | ||
"Mode": "Update" | ||
} | ||
] |
27 changes: 27 additions & 0 deletions
27
...eo.OpenApi.Comparator.UTest/Resource/issue_49_false_1015_out_of_order_parameters/new.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,27 @@ | ||
openapi: "3.0.2" | ||
info: | ||
title: "Api" | ||
version: "1.0.1" | ||
paths: | ||
/example: | ||
get: | ||
parameters: | ||
- name: "access_token" | ||
in: "query" | ||
required: false | ||
schema: | ||
anyOf: | ||
- type: "string" | ||
- type: "null" | ||
title: "Access Token" | ||
- name: "access_token" | ||
in: "header" | ||
required: false | ||
schema: | ||
anyOf: | ||
- type: "string" | ||
- type: "null" | ||
title: "Access Token" | ||
responses: | ||
"200": | ||
description: "Successful Response" |
27 changes: 27 additions & 0 deletions
27
...eo.OpenApi.Comparator.UTest/Resource/issue_49_false_1015_out_of_order_parameters/old.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,27 @@ | ||
openapi: "3.0.2" | ||
info: | ||
title: "Api" | ||
version: "1.0.0" | ||
paths: | ||
/example: | ||
get: | ||
parameters: | ||
- name: "access_token" | ||
in: "header" | ||
required: false | ||
schema: | ||
anyOf: | ||
- type: "string" | ||
- type: "null" | ||
title: "Access Token" | ||
- name: "access_token" | ||
in: "query" | ||
required: false | ||
schema: | ||
anyOf: | ||
- type: "string" | ||
- type: "null" | ||
title: "Access Token" | ||
responses: | ||
"200": | ||
description: "Successful Response" |
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