cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

API 'Try Out' feature disabled when using security schema in OpenAPI spec

Former Member
978

Hi,

On the SwaggerHub website I noticed that their editor tool has an 'Authorize' feature that is capable of obtaining a token needed for an OAuth protected endpoint:

I can't find anything similar when using either the SAP API Designer tool or the Developer Portal. At the moment it seems as though the 'try out' feature wont be available if I've configured the OpenAPI (v3) spec to use a security schema.

securitySchemes:
    erpsalesorder_auth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: 'https://{url to my oauth generator endpoint}'
          scopes:
            'read:SalesHeader': read your salesorder
...
...
...
     security:
        - erpsalesorder_auth:
            - 'read:SalesHeader'

In the below image you'll see that the 'Try Out' button is disabled. If the items above relating to the security schema are removed, the feature becomes available again.

I'm assuming the missing 'Authorize' feature is probably due to the editor lagging behind the version in use on the SwaggerHub website? How are others 'trying out' endpoints in the developer portal when an OAuth token is needed?

TIA!

Accepted Solutions (0)

Answers (0)