forked from wso2/product-apim
-
Notifications
You must be signed in to change notification settings - Fork 0
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 wso2#11162 from TheNiiron/master
Add Prototype endpoint test cases
- Loading branch information
Showing
8 changed files
with
786 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
360 changes: 360 additions & 0 deletions
360
...-backend/src/test/java/org/wso2/am/integration/tests/prototype/PrototypedAPITestcase.java
Large diffs are not rendered by default.
Oops, something went wrong.
60 changes: 60 additions & 0 deletions
60
...s-integration/tests-backend/src/test/resources/oas/v2/prototype/additionalProperties.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,60 @@ | ||
{ | ||
"id": "71889e16-773e-471b-bc53-251569efff64", | ||
"name": "SwaggerPetstore_v2_import", | ||
"description": null, | ||
"context": "/SwaggerPetstorev2import", | ||
"version": "1.0.0", | ||
"provider": "admin", | ||
"lifeCycleStatus": "PUBLISHED", | ||
"wsdlInfo": null, | ||
"responseCachingEnabled": false, | ||
"cacheTimeout": 300, | ||
"hasThumbnail": null, | ||
"isDefaultVersion": false, | ||
"enableSchemaValidation": false, | ||
"type": "HTTP", | ||
"transport": ["http", "https"], | ||
"tags": [], | ||
"policies": ["Unlimited"], | ||
"apiThrottlingPolicy": "Unlimited", | ||
"authorizationHeader": null, | ||
"securityScheme": ["oauth2", "oauth_basic_auth_mandatory"], | ||
"maxTps": null, | ||
"visibility": "PUBLIC", | ||
"visibleRoles": [], | ||
"visibleTenants": [], | ||
"mediationPolicies": [], | ||
"subscriptionAvailability": "ALL_TENANTS", | ||
"subscriptionAvailableTenants": [], | ||
"additionalProperties": [], | ||
"monetization": null, | ||
"accessControl": "NONE", | ||
"accessControlRoles": [], | ||
"businessInformation": { | ||
"businessOwner": null, | ||
"businessOwnerEmail": null, | ||
"technicalOwner": null, | ||
"technicalOwnerEmail": null | ||
}, | ||
"corsConfiguration": { | ||
"corsConfigurationEnabled": true, | ||
"accessControlAllowOrigins": ["*"], | ||
"accessControlAllowCredentials": false, | ||
"accessControlAllowHeaders": ["authorization", "Access-Control-Allow-Origin", "Content-Type", "SOAPAction"], | ||
"accessControlAllowMethods": ["GET", "PUT", "POST", "DELETE", "PATCH", "OPTIONS"] | ||
}, | ||
"workflowStatus": null, | ||
"endpointConfig": { | ||
"endpoint_type": "http", | ||
"sandbox_endpoints": { | ||
"url": "https://localhost:9443/publisher-new/apis/create/openapi" | ||
}, | ||
"production_endpoints": { | ||
"url": "https://localhost:9443/publisher-new/apis/create/openapi" | ||
} | ||
}, | ||
"endpointImplementationType": "INLINE", | ||
"scopes": [], | ||
"operations": [], | ||
"threatProtectionPolicies": null | ||
} |
86 changes: 86 additions & 0 deletions
86
...ation/tests-integration/tests-backend/src/test/resources/oas/v2/prototype/oas_import.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,86 @@ | ||
{ | ||
"swagger" : "2.0", | ||
"info" : { | ||
"version" : "1.0.0", | ||
"title" : "SwaggerPetstore_v2" | ||
}, | ||
"security" : [ { | ||
"default" : [ ] | ||
} ], | ||
"paths" : { | ||
"/pets" : { | ||
"get" : { | ||
"parameters" : [ ], | ||
"responses" : { | ||
"200" : { | ||
"description" : "OK" | ||
} | ||
}, | ||
"security" : [ { | ||
"default" : [ "SwaggerPetstore_imp_v2" ] | ||
} ], | ||
"x-auth-type" : "Application & Application User", | ||
"x-throttling-tier" : null | ||
} | ||
}, | ||
"/pets/{petId}" : { | ||
"get" : { | ||
"parameters" : [ { | ||
"name" : "petId", | ||
"in" : "path", | ||
"required" : true, | ||
"type" : "string" | ||
} ], | ||
"responses" : { | ||
"200" : { | ||
"description" : "OK" | ||
} | ||
}, | ||
"security" : [ { | ||
"default" : [ ] | ||
} ], | ||
"x-auth-type" : "Application & Application User", | ||
"x-throttling-tier" : null | ||
} | ||
}, | ||
"/oldpets" : { | ||
"delete" : { | ||
"parameters" : [ ], | ||
"responses" : { | ||
"200" : { | ||
"description" : "OK" | ||
} | ||
}, | ||
"security" : [ { | ||
"default" : [ "SwaggerPetstore_imp_v2" ] | ||
} ], | ||
"x-auth-type" : "Application & Application User", | ||
"x-throttling-tier" : null | ||
} | ||
} | ||
}, | ||
"securityDefinitions" : { | ||
"default" : { | ||
"type" : "oauth2", | ||
"authorizationUrl" : "https://test.com", | ||
"flow" : "implicit", | ||
"scopes" : { | ||
"SwaggerPetstore_imp_v2" : "SwaggerPetstore_imp_v2" | ||
}, | ||
"x-scopes-bindings" : { | ||
"SwaggerPetstore_imp_v2" : "admin" | ||
} | ||
} | ||
}, | ||
"x-throttling-tier" : "Unlimited", | ||
"x-wso2-cors" : { | ||
"corsConfigurationEnabled" : true, | ||
"accessControlAllowOrigins" : [ "*" ], | ||
"accessControlAllowCredentials" : false, | ||
"accessControlAllowHeaders" : [ "authorization", "Access-Control-Allow-Origin", "Content-Type", "SOAPAction" ], | ||
"accessControlAllowMethods" : [ "GET", "PUT", "POST", "DELETE", "PATCH", "OPTIONS" ] | ||
}, | ||
"x-wso2-production-endpoints" : "https://localhost:9443/publisher-new/apis/create/openapi", | ||
"x-wso2-sandbox-endpoints" : "https://localhost:9443/publisher-new/apis/create/openapi", | ||
"x-wso2-basePath" : "/SwaggerPetstorev2/1.0.0" | ||
} |
60 changes: 60 additions & 0 deletions
60
...s-integration/tests-backend/src/test/resources/oas/v3/prototype/additionalProperties.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,60 @@ | ||
{ | ||
"id": "71889e16-773e-471b-bc53-251569efff64", | ||
"name": "SwaggerPetstore_v3_import", | ||
"description": null, | ||
"context": "/SwaggerPetstorev3import", | ||
"version": "1.0.0", | ||
"provider": "admin", | ||
"lifeCycleStatus": "PUBLISHED", | ||
"wsdlInfo": null, | ||
"responseCachingEnabled": false, | ||
"cacheTimeout": 300, | ||
"hasThumbnail": null, | ||
"isDefaultVersion": false, | ||
"enableSchemaValidation": false, | ||
"type": "HTTP", | ||
"transport": ["http", "https"], | ||
"tags": [], | ||
"policies": ["Unlimited"], | ||
"apiThrottlingPolicy": "Unlimited", | ||
"authorizationHeader": null, | ||
"securityScheme": ["oauth2", "oauth_basic_auth_mandatory"], | ||
"maxTps": null, | ||
"visibility": "PUBLIC", | ||
"visibleRoles": [], | ||
"visibleTenants": [], | ||
"mediationPolicies": [], | ||
"subscriptionAvailability": "ALL_TENANTS", | ||
"subscriptionAvailableTenants": [], | ||
"additionalProperties": [], | ||
"monetization": null, | ||
"accessControl": "NONE", | ||
"accessControlRoles": [], | ||
"businessInformation": { | ||
"businessOwner": null, | ||
"businessOwnerEmail": null, | ||
"technicalOwner": null, | ||
"technicalOwnerEmail": null | ||
}, | ||
"corsConfiguration": { | ||
"corsConfigurationEnabled": true, | ||
"accessControlAllowOrigins": ["*"], | ||
"accessControlAllowCredentials": false, | ||
"accessControlAllowHeaders": ["authorization", "Access-Control-Allow-Origin", "Content-Type", "SOAPAction"], | ||
"accessControlAllowMethods": ["GET", "PUT", "POST", "DELETE", "PATCH", "OPTIONS"] | ||
}, | ||
"workflowStatus": null, | ||
"endpointConfig": { | ||
"endpoint_type": "http", | ||
"sandbox_endpoints": { | ||
"url": "https://localhost:9443/publisher-new/apis/create/openapi" | ||
}, | ||
"production_endpoints": { | ||
"url": "https://localhost:9443/publisher-new/apis/create/openapi" | ||
} | ||
}, | ||
"endpointImplementationType": "INLINE", | ||
"scopes": [], | ||
"operations": [], | ||
"threatProtectionPolicies": null | ||
} |
96 changes: 96 additions & 0 deletions
96
...ation/tests-integration/tests-backend/src/test/resources/oas/v3/prototype/oas_import.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,96 @@ | ||
{ | ||
"openapi" : "3.0.1", | ||
"info" : { | ||
"title" : "SwaggerPetstore_v3", | ||
"version" : "1.0.0" | ||
}, | ||
"servers" : [ { | ||
"url" : "/" | ||
} ], | ||
"security" : [ { | ||
"default" : [ ] | ||
} ], | ||
"paths" : { | ||
"/pets" : { | ||
"get" : { | ||
"responses" : { | ||
"200" : { | ||
"description" : "OK" | ||
} | ||
}, | ||
"security" : [ { | ||
"default" : [ "SwaggerPetstore_imp_v3" ] | ||
} ], | ||
"x-auth-type" : "Application & Application User", | ||
"x-throttling-tier" : null | ||
} | ||
}, | ||
"/pets/{petId}" : { | ||
"get" : { | ||
"parameters" : [ { | ||
"name" : "petId", | ||
"in" : "path", | ||
"required" : true, | ||
"style" : "simple", | ||
"explode" : false, | ||
"schema" : { | ||
"type" : "string" | ||
} | ||
} ], | ||
"responses" : { | ||
"200" : { | ||
"description" : "OK" | ||
} | ||
}, | ||
"security" : [ { | ||
"default" : [ ] | ||
} ], | ||
"x-auth-type" : "Application & Application User", | ||
"x-throttling-tier" : null | ||
} | ||
}, | ||
"/oldpets" : { | ||
"delete" : { | ||
"responses" : { | ||
"200" : { | ||
"description" : "OK" | ||
} | ||
}, | ||
"security" : [ { | ||
"default" : [ "SwaggerPetstore_imp_v3" ] | ||
} ], | ||
"x-auth-type" : "Application & Application User", | ||
"x-throttling-tier" : null | ||
} | ||
} | ||
}, | ||
"components" : { | ||
"securitySchemes" : { | ||
"default" : { | ||
"type" : "oauth2", | ||
"flows" : { | ||
"implicit" : { | ||
"authorizationUrl" : "https://test.com", | ||
"scopes" : { | ||
"SwaggerPetstore_imp_v3" : "SwaggerPetstore_imp_v3" | ||
}, | ||
"x-scopes-bindings" : { | ||
"SwaggerPetstore_imp_v3" : "admin" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"x-throttling-tier" : "Unlimited", | ||
"x-wso2-cors" : { | ||
"corsConfigurationEnabled" : true, | ||
"accessControlAllowOrigins" : [ "*" ], | ||
"accessControlAllowCredentials" : false, | ||
"accessControlAllowHeaders" : [ "authorization", "Access-Control-Allow-Origin", "Content-Type", "SOAPAction" ], | ||
"accessControlAllowMethods" : [ "GET", "PUT", "POST", "DELETE", "PATCH", "OPTIONS" ] | ||
}, | ||
"x-wso2-production-endpoints" : "https://localhost:9443/publisher-new/apis/create/openapi", | ||
"x-wso2-sandbox-endpoints" : "https://localhost:9443/publisher-new/apis/create/openapi", | ||
"x-wso2-basePath" : "/SwaggerPetstorev3/1.0.0" | ||
} |
Oops, something went wrong.