Generate RAML for existing API


#1

Hi,

Is there any tool that generate RAML for an existing practically-RESTful API?

I’d like to learn what would be a suggested approach to reverse-engineer RAML having access HTTP API,
without any inspection of actual implementation.

Regards,
Mateusz


#2

I think, my question relates to


and

First, I considered was brute-force approach: reverse engineering RAML for an existing hypermedia-enabled API by iterating through requests and responses, parsing the latter to find further resources.

Possibly, a better approach would be to add support for RAML retrieval.
Is there any consensus for best practices on how it should be done?
Anyone has implemented anything similar?


#3

Hi,

afaik, there are efforts to implement toolings around reverse engineering and get a RAML from your existing API landscape where multiple services are already running. Let me get a little bit more information about that.

Thanks,
Christian


#4

Hi mloskot, actually we are working on some tooling for reverse engineering of APIs from log of HAR requests (can be easily saved from the browser or generated from other formats of logs), I am not sure about exact date when it will be publicly available, but it is planned to be in the end of October

Regards,
Pavel


#5

HI,

@petrochenko_pav & @christian_vogel, thank you for the info.

I will be watching the RAML space for any related update/project/feature.

I have some more detailed questions related to my original problem, but I think it is better to wait for release of the expected tools and make discussion concrete.

Regards,
Mateusz


#6

I’m interested in this tool as well.

Best,
Michael


#7

Try checking out stoplight.io.

I’ve seen a few videos around (sorry, don’t have the links) that explain exactly how to do that using a proxy (can be a local one if you are bothered about requests hitting a remote server). The desktop application only works on a Mac currently, but Windows and Linux are planned for a release soon.


#8

There is a Chrome app of stoplight.io as well: https://chrome.google.com/webstore/detail/stoplight-api-designer/dilplgpkdhgneblbcgmdiandnhchmkgk


#9

I wasn’t aware of that. Appreciate the info, I’ll be sure to check it out.

Update: I’m impressed. Looking forward though for supporting a local proxy and RAML 1.0 export.


#10

As for I know, I had discussed this with @ddossot and he suggested that “we could use the JAX-RS to RAML tool but it dynamically generates (and thus changes) the RAML spec based on the implementation, which is a bad thing if we keep it that way (the implementation should be based on the spec, not the other way around). We could use this tool once, save the RAML file and then turn the feature off. Then the RAML file would become the spec against which the implementation is checked.” :slight_smile: