-
Notifications
You must be signed in to change notification settings - Fork 787
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration tests for validate API product swagger definition
- Loading branch information
1 parent
f5df1b6
commit f6fecb1
Showing
7 changed files
with
245 additions
and
12 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
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
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
139 changes: 139 additions & 0 deletions
139
...tests-integration/tests-backend/src/test/resources/oas/v3/api-product/test-api-1-oas.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,139 @@ | ||
openapi: 3.0.1 | ||
info: | ||
title: testAPI1 | ||
version: 1.0.0 | ||
servers: | ||
- url: / | ||
security: | ||
- default: [] | ||
paths: | ||
"/users/{userID}/products/": | ||
get: | ||
parameters: | ||
- name: userID | ||
in: path | ||
required: true | ||
style: simple | ||
explode: false | ||
schema: | ||
type: string | ||
format: string | ||
responses: | ||
"200": | ||
description: ok | ||
security: | ||
- default: [] | ||
x-auth-type: Application & Application User | ||
x-throttling-tier: Unlimited | ||
x-wso2-application-security: | ||
security-types: | ||
- oauth2 | ||
optional: false | ||
"/users/{userID}/products/{productID}": | ||
get: | ||
parameters: | ||
- $ref: "#/components/parameters/userIDPathParam" | ||
responses: | ||
"200": | ||
description: ok | ||
security: | ||
- default: [] | ||
x-auth-type: Application & Application User | ||
x-throttling-tier: Unlimited | ||
x-wso2-application-security: | ||
security-types: | ||
- oauth2 | ||
optional: false | ||
post: | ||
parameters: | ||
- $ref: "#/components/parameters/userIDPathParam" | ||
responses: | ||
"200": | ||
description: ok | ||
headers: | ||
location: | ||
$ref: "#/components/headers/Location" | ||
security: | ||
- default: [] | ||
x-auth-type: Application & Application User | ||
x-throttling-tier: Unlimited | ||
x-wso2-application-security: | ||
security-types: | ||
- oauth2 | ||
optional: false | ||
parameters: | ||
- $ref: "#/components/parameters/ProductIDPathParam" | ||
components: | ||
parameters: | ||
ProductIDPathParam: | ||
name: productID | ||
in: path | ||
required: true | ||
style: simple | ||
explode: false | ||
schema: | ||
type: string | ||
format: string | ||
userIDPathParam: | ||
name: userID | ||
in: path | ||
required: true | ||
style: simple | ||
explode: false | ||
schema: | ||
type: string | ||
format: string | ||
headers: | ||
Location: | ||
description: Location of the new created resource | ||
style: simple | ||
explode: false | ||
schema: | ||
type: string | ||
format: uri | ||
securitySchemes: | ||
default: | ||
type: oauth2 | ||
flows: | ||
implicit: | ||
authorizationUrl: "https://test.com" | ||
scopes: {} | ||
x-wso2-auth-header: Authorization | ||
x-wso2-cors: | ||
corsConfigurationEnabled: false | ||
accessControlAllowOrigins: | ||
- "*" | ||
accessControlAllowCredentials: false | ||
accessControlAllowHeaders: | ||
- authorization | ||
- Access-Control-Allow-Origin | ||
- Content-Type | ||
- SOAPAction | ||
- apikey | ||
- Internal-Key | ||
accessControlAllowMethods: | ||
- GET | ||
- PUT | ||
- POST | ||
- DELETE | ||
- PATCH | ||
- OPTIONS | ||
x-wso2-production-endpoints: | ||
urls: | ||
- "http://api.yourdomain.com/" | ||
type: http | ||
x-wso2-sandbox-endpoints: | ||
urls: | ||
- "http://api.yourdomain.com/" | ||
type: http | ||
x-wso2-basePath: /testapi1/1.0.0 | ||
x-wso2-transports: | ||
- http | ||
- https | ||
x-wso2-application-security: | ||
security-types: | ||
- oauth2 | ||
optional: false | ||
x-wso2-response-cache: | ||
enabled: false | ||
cacheTimeoutInSeconds: 300 |