We want not just to share the API console that is provided via apikit component in a Mule application, but also the raw RAML file so consumers can create their own clients based on the RAML. As far as I know, there is not user friendly way to download the published raw RAML file from within the APIKit console. I just found that one can point to the /api url and do a GET with "application/raml+yaml" content-type, but it is not user friendly enough. Any clues? Thanks
You can use the URL to your console with ?raml on the end of the url.
http://myapp.cloudhub.io/api/v1/console?raml
In at least Mule 4.3.0 (maybe earlier), you can append ?api to the console URL, e.g.
http://localhost:88/myproject/console/?api
Related
from an api response, I got an url for a downloadable file. when placed this url in the browser, I can download the file. How to perform this action using a Mule 3.9 application?
Use Mule HTTP Request connector to send the equivalent request from a Mule flow.
I have my API documented with Swagger. For developer convenience I would like to provide the swagger GUI on my website as well. However, my provider has not installed the php yaml extension. It implies that I can't use the GUI on my own website.
So, I would like to use a third party GUI. I know that I can use https://petstore.swagger.io/ and enter the link to my yaml file in the text box. This is also not really user friendly. I prefer to open the GUI and specify the yaml when calling the url. For the user the GUI opens with my API definition.
Any thoughts?
If for some reason you cannot host Swagger UI youself, here are some alternatives you can try:
Use SwaggerHub to host your API definition and docs.
Disclosure: I work for the company that makes SwaggerHub.
Use GitLab to host your OpenAPI YAML/JSON file. GitLab uses Swagger UI to render OpenAPI files. Example:
https://gitlab.com/gofus/gofus-api/blob/dev/swagger.yaml
Use https://petstore.swagger.io with the url query parameter to automatically load your API definition:
https://petstore.swagger.io?url=https://yoursite.com/api.yaml
For this to work, the server where your OpenAPI file is hosted must use HTTPS and support CORS.
I'm using API platform with VichBundle to store file on the back side and React Native on the Front side.
I've followed the documentation of API platform and the upload part is working well, but I don't know how to download the document.
When I make a GET request I have the entity with the url of the file but I can't do a GET request with this url because there is no route to this file.
Can somebody give me an exemple of how to download file with api platform and Vichbundle.
Thanks
If you are following Api Platfom's documentation your files should be uploaded to your project's ./app/public/media/ folder and available making an HTTP GET request to http(s)://<yourdomain>/public/media/<filename>.<extension>. Just open the URL in your browser.
To get the exact url query yout API for me mediaObject information (for example, /api/media_objects/{id}) and check the contentUrl property.
As in subject, I have two RAMLs files one is related with v1 API version, second one is belongs to v2 API version. My problem is that, if I pass to someone my root url with API documentation I wan't to be sure that when someone enters into API v1 page he will be able to se some info ("This is old api version please go to API v2: link") and redirect link to API v2?
Is any way to put this redirect link into v1 RAML file?
Thank for any responses
The documentation section supports Markdown so you can easily insert a link there.
yes You can add Direct URL if its not working then you can try bellow syntax as well
response:
200:
example:
{
"redirecturl":"URL Location"
}
I need to open a HTTP link to the webserver which my air app is talking to but I don't want to hard-code the webserver URL into the Flex code. If I can get the endpoint URI then I can work from there. I'm using GraniteDS in case that is relevant.
import mx.messaging.config.ServerConfig;
ServerConfig.getChannel(CHANNEL_ID).uri;