-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to Convert the entire RAML folder to swagger #7
Comments
The app should be able to convert with all inclusions. Can you please show a snippet of your raml and perhaps describe your directory layout. |
I have the same issue here. This is what I did:
I get the following exception:
I problem might be the version of RAML used in the example. I've used 1.0 which is not supported yet. But is this the exception that I would get in this case? Because I think here the included file was not found. |
@GhaTMA Did you try running the jukebox API example from our Example dir? That uses RAML 0.8. The RAML project examples (link that you shared) were recently updated to RAML 1.0. So, checking for the Jukebox API example in our project can help to identify whether the RAML version is causing the issue. |
I ran the following command:
and got a slightly different exception:
I think here the problem is clearly with the includes. |
@sslb can you please look into this issue? The code seems to throw exceptions for our own API example. It would be better if you can recheck the code that you pushed recently. |
Hi All,
My RAML has dependecies.
For example, the raml structure goes like this.,
The name of the folder is ramlFolder which has api.raml (the raml file),
schemas folder which has schemas for several foders, examples folder which
has the examples of all the apis.
ramlFolder --> api.raml
examples --> example-1(folder) --> example.json
example-2(folder) -->
example.json
schemas --> schemas-1(folder) --> schemas.raml
schemas-2(folder) -->
schemas.raml
Now, the api.raml at the top level consumes the schemas and examples from
the folders. If I convert the api.raml alone, some of the dependencies are
lost. Is there a way that I can convert the entire folder?
Thanks
…On Mon, Nov 27, 2017 at 8:41 AM, Eshwanth Baskaran ***@***.*** > wrote:
@sslb <https://github.com/sslb> can you please look into this issue? The
code seems to throw exceptions for our own API example. It would be better
if you can recheck the code that you pushed recently.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AgTXiyLvoq4jfql5DqUWvKI1vP_gOlnOks5s6rwLgaJpZM4QmALw>
.
|
Hi, Conversion should work with dependencies altogether. This is the scenario we are working with it as well. I am really sorry that I haven't picked this up, but the GitHub notification got buried in my mailer. Nevertheless, inclusion do work. I'll re-check the example project as well. |
@sslb Please do it asap. |
Right, so the OP's problem is that his includes are likely relative and he invokes the converter from a directory different from where the RAML is. This is probable as he provides the full path for the RAML. Currently the include statements are relative to the CWD if the include statements are relative. As a workaround to this, just CD into the RAML directory (where your structure is) and invoke the converter that way. It does work fine. As for the other mentioned issue around the Jukebox example, indeed that fails as is but for an entirely different reason. Inclusion works just fine, however there seems to be syntax errors. The sample JSON files are not valid JSON objects and Jettison complains about that. I can no longer push fixes (no permission), therefore I won't be able to create a pull request. @esh-b Can you please fix the repository permissions so I can create a PR? Currently it does not allow me to push up a new branch. |
As an addition perhaps we could mention in the README to run the converter in your RAML directory otherwise there's no way to find the includes. Includes by the way are resolved by the MuleSoft library we are using and they are loaded as resources. This prevents us from tinkering with the paths and try multiple options. You do need to run the converter in the proper directory and not supply a path to the RAML. That won't work. |
@sslb Okay. You could possibly change the Readme file and other necessary commits and send me a pull request. I have created a new branch. |
I cannot push up new branches anymore, therefore I won't be able to create a PR. |
Not sure about the reason for that. Doesn't googling help? |
Still facing this issue, any ETA to fix? |
I have a RAML file which reads the schemas and responses from different folders. I want to convert this entire folder to swagger. When I convert the RAML file alone, the descriptions and the responses are missing. Any help would be appreciated. Thanks.
The text was updated successfully, but these errors were encountered: