Apigee Inbuilt Swagger UI(Spec) and Apigee inbult developer portal Swagger UI

Apigee Inbuilt Swagger UI(Spec) and Apigee developer portal Swagger UI have the following issues 1.) both of the platforms don't read the API key in the header(which works fine with postman), and only work when the key is passed in query params.

We are using swagger 3.

First, we tried with this.

<code>parameters:-in: header
          name: X-apikey
          schema:
            type:string

Then we tried this.

<code>components:
  securitySchemes:
    Apikeyheader:
      type: apiKey
      in: header
      name: X-Apikey

paths:/post:
    post:
      security:- Apikeyheader:[]

2.) both the platform works with success scenario's but are unable to capture the error scenarios and return an error as "Fetch Error". We have tested from Apigee inbuilt Swagger UI and APIGEE internal portal swagger UI. We need inputs as we are in the process of design.

@Anil Sagar @ Google

0 2 622
2 REPLIES 2

The fetch error is usually due to the CORS issue. Have you added CORS?

Likr Siddharth mentioned, "Fetch Error" sometimes indicates a problem with CORS headers - are there any errors reported in your javascript console?

Note that Apigee Edge built-in Portal supports OpenAPI 3, while the Drupal-based Portal (SmartDocs) only supports OpenAPI 2. Using the swagger_ui_formatter module for the Drupal Portal does support OpenAPI 3 as well.