Skip to content

Commit

Permalink
Add wss UTs
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmithv11 committed Jul 12, 2023
1 parent eeddcbc commit 6659275
Show file tree
Hide file tree
Showing 5 changed files with 156 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"swagger": "2.0",
"info": {
"title": "Simple API overview",
"version": "1.0.0"
},
"schemes": [
"wss"
],
"paths": {
"/pets": {
"post": {
"description": "Creates a new pet in the store",
"responses": {
"200": {
"description": "200 response"
}
},
"operationId": "addPet",
"security": [
{
"apiKey1": [],
"apiKey3": []
}
]
}
}
},
"securityDefinitions": {
"apiKey1": {
"type": "apiKey",
"name": "X-API-Key",
"in": "header"
},
"apiKey3": {
"type": "apiKey",
"name": "X-API-Key",
"in": "query"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
swagger: "2.0"
info:
title: Simple API overview
version: 1.0.0
schemes:
- wss
paths:
/pets:
post:
description: Creates a new pet in the store
responses:
"200":
description: 200 response
operationId: addPet
security:
- apiKey1: []
apiKey3: []
securityDefinitions:
apiKey1:
type: apiKey
name: X-API-Key
in: header
apiKey3:
type: apiKey
name: X-API-Key
in: query
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"openapi": "3.0.0",
"info": {
"title": "Simple API overview",
"version": "1.0.0"
},
"servers": [
{
"url": "wss://example.com/socket",
"description": "Local server"
}
],
"paths": {
"/pets": {
"post": {
"description": "Creates a new pet in the store",
"responses": {
"200": {
"description": "200 response"
}
},
"operationId": "addPet",
"security": [
{
"apiKey1": [],
"apiKey2": [],
"apiKey3": []
}
]
}
}
},
"components": {
"securitySchemes": {
"apiKey1": {
"type": "apiKey",
"name": "X-API-Key",
"in": "header"
},
"apiKey2": {
"type": "apiKey",
"name": "X-API-Key",
"in": "cookie"
},
"apiKey3": {
"type": "apiKey",
"name": "X-API-Key",
"in": "query"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
openapi: 3.0.0
info:
title: Simple API overview
version: 1.0.0
servers:
- url: wss://example.com/socket
description: Local server
paths:
/pets:
post:
description: Creates a new pet in the store
responses:
'200':
description: 200 response
operationId: addPet
security:
- apiKey1: []
apiKey2: []
apiKey3: []
components:
securitySchemes:
apiKey1:
type: apiKey
name: X-API-Key
in: header
apiKey2:
type: apiKey
name: X-API-Key
in: cookie
apiKey3:
type: apiKey
name: X-API-Key
in: query
4 changes: 4 additions & 0 deletions tests/openapi/checks/resource/generic/test_ClearTextAPIKey.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ def test_summary(self):
"/pass3.json",
"/pass4.yaml",
"/pass4.json",
"/pass5.yaml",
"/pass5.json",
"/pass6.yaml",
"/pass6.json",
}
failing_resources = {
"/fail.yaml",
Expand Down

0 comments on commit 6659275

Please sign in to comment.