Reputation: 987
In my case, I'm using WSO2 API Manager version 1.7. This version allows loading an externally published Swagger definition and importing it via a URL.
I designed a Swagger definition on SwaggerHub and published on there. But I couldn't load that definition into API Manager.
Also, I just copied the Swagger JSON and pasted when editing the API definition after adding an API. Even though it shows properly saved, I cannot see the exact JSON content. It has been saved as some text.
How can I resolve these issues and add a properly working Swagger definition to WSO2 API Manager 1.7?
NOTE: It works with 1.10.
Upvotes: 1
Views: 822
Reputation: 3756
What is the swagger version you are using? If it is working in AM 1.10 the document probably is written in version 2.0. AM 1.7 use older version of swagger (v1.1). This probably could be the reason for not working in AM 1.7. If you cannot upgrade to AM 1.10, then you could try creating the swagger doc using the v1.1 notations
Upvotes: 3
Reputation: 6824
You should be able to read your API from SwaggerHub directly using this URL structure:
https://api.swaggerhub.com/apis/{username}/{api-name}/{version}
The accept header can be application/json
or application/yaml
. If wso2 1.7 is having trouble importing it, there are likely some unsupported features in the wso2 tooling itself.
Upvotes: 2