diff --git a/tests/3scale-saas-with-hosted-apicast-apikey.yml b/tests/3scale-saas-with-hosted-apicast-apikey.yml index 8ce8228..9a8cff1 100644 --- a/tests/3scale-saas-with-hosted-apicast-apikey.yml +++ b/tests/3scale-saas-with-hosted-apicast-apikey.yml @@ -1,10 +1,13 @@ --- -- name: Deploy the Echo API to a 3scale SaaS instance, with hosted APIcasts +- name: Deploy the Beer Catalog API to a 3scale SaaS instance, with hosted APIcasts hosts: threescale gather_facts: no vars: - threescale_cicd_openapi_file: '{{ playbook_dir }}/api/echo-api.yaml' + threescale_cicd_openapi_file: '{{ playbook_dir }}/api/beer-catalog-api.json' + threescale_cicd_openapi_file_format: 'JSON' + threescale_cicd_api_backend_hostname: echo-api.3scale.net + threescale_cicd_openapi_smoketest_operation: GET_beer roles: # Test first deployment - { role: 'nmasse-itix.threescale-cicd', vars: { 'round': 1 } } diff --git a/tests/api/beer-catalog-api.json b/tests/api/beer-catalog-api.json new file mode 100644 index 0000000..f053eec --- /dev/null +++ b/tests/api/beer-catalog-api.json @@ -0,0 +1,153 @@ +{ + "swagger": "2.0", + "info": { + "title": "Beer Catalog API", + "description": "An API for querying beer catalog of Acme Inc.", + "contact": { + "name": "Laurent Broudoux", + "url": "http://github.com/lbroudoux", + "email": "laurent.broudoux@gmail.com" + }, + "license": { + "name": "MIT License", + "url": "https://opensource.org/licenses/MIT" + }, + "version": "1.0" + }, + "basePath": "/api", + "paths": { + "/beer/{name}": { + "get": { + "tags": [ + "beer" + ], + "summary": "Get beer having name", + "description": "Get beer having name", + "responses": { + "200": { + "description": "Beer having requested name", + "schema": { + "$ref": "#/definitions/Beer" + } + } + } + }, + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Name of beer to retrieve", + "required": true, + "type": "string" + } + ] + }, + "/beer/findByStatus/{status}": { + "get": { + "tags": [ + "beer" + ], + "summary": "Get beers having status", + "description": "Get beers having status", + "responses": { + "200": { + "description": "List of beers having requested status", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Beer" + } + } + } + } + }, + "parameters": [ + { + "name": "status", + "in": "path", + "description": "Status of beers to retrieve", + "required": true, + "type": "string" + }, + { + "name": "page", + "in": "query", + "description": "Number of page to retrieve", + "type": "number" + } + ] + }, + "/beer": { + "get": { + "tags": [ + "beer" + ], + "summary": "List beers within catalog", + "description": "List beers within catalog", + "responses": { + "200": { + "description": "Array of beers", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Beer" + } + } + } + } + }, + "parameters": [ + { + "name": "page", + "in": "query", + "description": "Number of page to retrieve", + "type": "number" + } + ] + } + }, + "tags": [ + { + "name": "beer", + "description": "Beer resource" + } + ], + "definitions": { + "Beer": { + "properties": { + "name": { + "description": "Name of Beer", + "type": "string" + }, + "country": { + "description": "Origin country of Beer", + "type": "string" + }, + "type": { + "description": "Type of Beer", + "type": "string" + }, + "rating": { + "description": "Rating from customers", + "type": "number" + }, + "status": { + "description": "Stock status", + "type": "string" + } + } + } + }, + "securityDefinitions": { + "apikey": { + "name": "api-key", + "in":"header", + "type":"apiKey" + } + }, + "security": [ + { + "apikey": [] + } + ] +}