Search code examples
javascriptswaggermarklogicopenapiopenapi-generator

How to use swagger/openAPI on MarkLogic REST APIs for generating documentation?


I have a bunch of REST APIs (GET/POST methods) written in SJS and I want to use swagger/openAPI for documenting it. I found one GitHub repo with some code but not sure as to how to run/use it with my project.

Link: https://github.com/overstory/marklogic-swagger

PS: My choice of IDE is intelliJ.

Please advise on the steps for the same. Thank you!


Solution

  • I am unaware of tools that can analyze a REST endpoint, and generate Swagger or OpenAPI for it. AFAIK, there are also no tools to generate any such thing from MarkLogic REST extensions or custom MarkLogic REST implementations. It is difficult to write a generic tool that would be able to do so. I am afraid you will have to manually type it, or write some script yourself that is able of generating something useful for your case.

    HTH!