- This might be caused by one or more of the following:
- a lack of CORS support on the target server(see suggestion below)
- the server is unavailable
- an untrusted certificate has been encountered
- mutual SSL authentication is required
If the error is caused by a lack of CORS support, click the link to open the server in a new tab. If the browser displays a certificate issue, you may choose to accept it and return here to test again.
===========================================================
For the record I only made a simple PHP REST API using Laravel, and I turned off CORS etc. The OpenAPI design also passed the specification status, and my design isn't that much different from the sample orders API including the gateway setup since I just modified the file to my usecase.
Is there something I missed or must do before testing? Because nothing worked so far for me. Thanks in advance.
P.S. Here's my OpenAPI file:
openapi: 3.0.0
info:
version: 1.0.0
title: Coffee API
x-ibm-name: coffee-api
servers:
- url: /coffee-api
x-ibm-configuration:
properties:
target-url:
value: http://omitted/api
description: URL of the proxy policy
encoded: false
cors:
enabled: false
gateway: datapower-api-gateway
type: rest
phase: realized
enforced: true
testable: true
assembly:
execute:
- invoke:
backend-type: detect
header-control:
type: blocklist
values: []
parameter-control:
type: allowlist
values: []
http-version: HTTP/1.1
timeout: 60
verb: keep
chunked-uploads: true
persistent-connection: true
cache-response: protocol
cache-ttl: 900
stop-on-error: []
graphql-send-type: detect
websocket-upgrade: false
title: invoke
version: 2.0.0
target-url: $(target-url)
follow-redirects: false
inject-proxy-headers: true
activity-log:
enabled: true
success-content: activity
error-content: payload
paths:
/coffees:
get:
operationId: getAllCoffees
summary: Returns all coffees
responses:
'200':
description: A list of coffees, or an empty list
post:
operationId: createCoffee
summary: Create a new coffee
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Coffee'
responses:
'201':
description: Coffee created
/coffees/{id}:
get:
operationId: getCoffeeById
summary: Returns a specific coffee
parameters:
- name: id
in: path
required: true
schema:
type: integer
responses:
'200':
description: A single coffee
'404':
description: Coffee not found
put:
operationId: updateCoffee
summary: Update a coffee
parameters:
- name: id
in: path
required: true
schema:
type: integer
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Coffee'
responses:
'200':
description: Coffee updated
'404':
description: Coffee not found
'500':
description: Internal server error
delete:
operationId: deleteCoffee
summary: Delete a coffee
parameters:
- name: id
in: path
required: true
schema:
type: integer
responses:
'204':
description: Coffee deleted
'404':
description: Coffee not found
'500':
description: Internal server error
/coffees/external:
get:
operationId: getExternalCoffees
summary: Get coffees from an external service
responses:
'200':
description: A list of coffees
'500':
description: Internal server error
components:
schemas:
Coffee:
type: object
properties:
id:
type: integer
name:
type: string
type:
type: string
price:
type: number
description:
type: string
stock:
type: integer