Hello, I'm new with Apigee, and I've just created an API proxy (my API was done in Rails). I want to see the API documentation from Apigee. I've inserted the correct url for API doc (e.g /api/documentation) and I am successfully redirected to this url, but the problem is it's not loading the correct stylesheets for this url (http://{my-name}-test.apigee.net/api-doc), I inspect the code and I saw that the .css and .js are not loaded. Should I upload the .js and .css as resources? But I saw that we should upload .xslt instead .css, is it correct? Sorry, I'm a bit lost.
Thanks in advance.
The Ideal way to manage the rendering of API documentation in Apigee is through Smartdocs: http://docs.apigee.com/developer-services/content/using-smartdocs-document-apis
It allows you to abstract the API runtime from API documentation.
However, if you still want to render static pages from your API Proxy, you can do two things:
1. If your backend is already rendering these resources along with documentation (css, js etc), you can just pass them through Apigee. Examples here: http://docs.apigee.com/api-services/reference/api-proxy-configuration-reference#proxyendpoint-condit...
2. If you backend does not have this, and you want Apigee to return static content you can route your /api-doc to an empty target and follow this example to assign static content: https://community.apigee.com/questions/10437/apigee-endpoint-as-no-target-example.html
Your route with no target will look like this in your proxy endpoints: default:
<RouteRule name="no-target-for-apidocs"> <Condition>(proxy.pathsuffix MatchesPath "/api-doc") and (request.verb = "GET")</Condition> </RouteRule>
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |