-
Notifications
You must be signed in to change notification settings - Fork 321
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 #6681 from Checkmarx/kics/934
fix(query): add 2xx as possible response code
- Loading branch information
Showing
18 changed files
with
308 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
33 changes: 33 additions & 0 deletions
33
...ries/openAPI/general/success_response_code_undefined_delete_operation/test/negative5.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,33 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Simple API", | ||
"version": "1.0.0" | ||
}, | ||
"paths": { | ||
"/item": { | ||
"delete": { | ||
"operationId": "deleteItem", | ||
"summary": "Delete item", | ||
"responses": { | ||
"2XX": { | ||
"description": "Item deleted successfully" | ||
}, | ||
"default": { | ||
"description": "Error" | ||
} | ||
} | ||
}, | ||
"patch": { | ||
"operationId": "updateItem", | ||
"summary": "Update item", | ||
"responses": { | ||
"default": { | ||
"description": "Error" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
20 changes: 20 additions & 0 deletions
20
...ries/openAPI/general/success_response_code_undefined_delete_operation/test/negative6.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,20 @@ | ||
swagger: "2.0" | ||
info: | ||
title: Simple API | ||
version: 1.0.0 | ||
paths: | ||
"/item": | ||
delete: | ||
operationId: deleteItem | ||
summary: Delete item | ||
responses: | ||
"2XX": | ||
description: Item deleted successfully | ||
default: | ||
description: Error | ||
patch: | ||
operationId: updateItem | ||
summary: Update item | ||
responses: | ||
default: | ||
description: Error |
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
33 changes: 33 additions & 0 deletions
33
...queries/openAPI/general/success_response_code_undefined_get_operation/test/negative5.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,33 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Simple API", | ||
"version": "1.0.0" | ||
}, | ||
"paths": { | ||
"/item": { | ||
"get": { | ||
"operationId": "getItem", | ||
"summary": "get item", | ||
"responses": { | ||
"2XX": { | ||
"description": "Item getd successfully" | ||
}, | ||
"default": { | ||
"description": "Error" | ||
} | ||
} | ||
}, | ||
"patch": { | ||
"operationId": "updateItem", | ||
"summary": "Update item", | ||
"responses": { | ||
"default": { | ||
"description": "Error" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
20 changes: 20 additions & 0 deletions
20
...queries/openAPI/general/success_response_code_undefined_get_operation/test/negative6.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,20 @@ | ||
swagger: "2.0" | ||
info: | ||
title: Simple API | ||
version: 1.0.0 | ||
paths: | ||
"/item": | ||
get: | ||
operationId: getItem | ||
summary: get item | ||
responses: | ||
"2XX": | ||
description: Item getd successfully | ||
default: | ||
description: Error | ||
patch: | ||
operationId: updateItem | ||
summary: Update item | ||
responses: | ||
default: | ||
description: Error |
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
33 changes: 33 additions & 0 deletions
33
...ueries/openAPI/general/success_response_code_undefined_head_operation/test/negative5.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,33 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Simple API", | ||
"version": "1.0.0" | ||
}, | ||
"paths": { | ||
"/item": { | ||
"head": { | ||
"operationId": "headItem", | ||
"summary": "head item", | ||
"responses": { | ||
"2XX": { | ||
"description": "Item head successfully" | ||
}, | ||
"default": { | ||
"description": "Error" | ||
} | ||
} | ||
}, | ||
"patch": { | ||
"operationId": "updateItem", | ||
"summary": "Update item", | ||
"responses": { | ||
"default": { | ||
"description": "Error" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
20 changes: 20 additions & 0 deletions
20
...ueries/openAPI/general/success_response_code_undefined_head_operation/test/negative6.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,20 @@ | ||
swagger: "2.0" | ||
info: | ||
title: Simple API | ||
version: 1.0.0 | ||
paths: | ||
"/item": | ||
head: | ||
operationId: headItem | ||
summary: head item | ||
responses: | ||
"2XX": | ||
description: Item head successfully | ||
default: | ||
description: Error | ||
patch: | ||
operationId: updateItem | ||
summary: Update item | ||
responses: | ||
default: | ||
description: Error |
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
24 changes: 24 additions & 0 deletions
24
...eries/openAPI/general/success_response_code_undefined_patch_operation/test/negative5.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,24 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Simple API", | ||
"version": "1.0.0" | ||
}, | ||
"paths": { | ||
"/item": { | ||
"patch": { | ||
"operationId": "patchItem", | ||
"summary": "patch item", | ||
"responses": { | ||
"2XX": { | ||
"description": "Item patchd successfully" | ||
}, | ||
"default": { | ||
"description": "Error" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
14 changes: 14 additions & 0 deletions
14
...eries/openAPI/general/success_response_code_undefined_patch_operation/test/negative6.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 @@ | ||
swagger: "2.0" | ||
info: | ||
title: Simple API | ||
version: 1.0.0 | ||
paths: | ||
"/item": | ||
patch: | ||
operationId: patchItem | ||
summary: patch item | ||
responses: | ||
"2XX": | ||
description: Item patched successfully | ||
default: | ||
description: Error |
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
33 changes: 33 additions & 0 deletions
33
...ueries/openAPI/general/success_response_code_undefined_post_operation/test/negative5.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,33 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Simple API", | ||
"version": "1.0.0" | ||
}, | ||
"paths": { | ||
"/item": { | ||
"post": { | ||
"operationId": "postItem", | ||
"summary": "post item", | ||
"responses": { | ||
"2XX": { | ||
"description": "Item posted successfully" | ||
}, | ||
"default": { | ||
"description": "Error" | ||
} | ||
} | ||
}, | ||
"patch": { | ||
"operationId": "updateItem", | ||
"summary": "Update item", | ||
"responses": { | ||
"default": { | ||
"description": "Error" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
20 changes: 20 additions & 0 deletions
20
...ueries/openAPI/general/success_response_code_undefined_post_operation/test/negative6.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,20 @@ | ||
swagger: "2.0" | ||
info: | ||
title: Simple API | ||
version: 1.0.0 | ||
paths: | ||
"/item": | ||
post: | ||
operationId: postItem | ||
summary: post item | ||
responses: | ||
"2XX": | ||
description: Item post successfully | ||
default: | ||
description: Error | ||
patch: | ||
operationId: updateItem | ||
summary: Update item | ||
responses: | ||
default: | ||
description: Error |
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
32 changes: 32 additions & 0 deletions
32
...queries/openAPI/general/success_response_code_undefined_put_operation/test/negative5.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,32 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Simple API", | ||
"version": "1.0.0" | ||
}, | ||
"paths": { | ||
"/item": { | ||
"put": { | ||
"operationId": "updateItem", | ||
"summary": "Update item", | ||
"responses": { | ||
"2XX": { | ||
"description": "Item posted successfully" | ||
}, | ||
"default": { | ||
"description": "Error" | ||
} | ||
} | ||
}, | ||
"patch": { | ||
"operationId": "updateItem", | ||
"summary": "Update item", | ||
"responses": { | ||
"default": { | ||
"description": "Error" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...queries/openAPI/general/success_response_code_undefined_put_operation/test/negative6.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,20 @@ | ||
swagger: "2.0" | ||
info: | ||
title: Simple API | ||
version: 1.0.0 | ||
paths: | ||
"/item": | ||
put: | ||
operationId: updateItem | ||
summary: Update item | ||
responses: | ||
"2XX": | ||
description: Item post successfully | ||
default: | ||
description: Error | ||
patch: | ||
operationId: updateItem | ||
summary: Update item | ||
responses: | ||
default: | ||
description: Error |