incubator-devlake icon indicating copy to clipboard operation
incubator-devlake copied to clipboard

[Question][] How can we get/export openapi spec instead of swagger

Open sha-intelli opened this issue 2 years ago • 5 comments

Question

Hi, I would like to find out how I can export the openai spec instead of swagger based on the functions shown in the code here. I can see the function here. It is unclear as to what I should do exactly.

Screenshots

If applicable, add screenshots to help explain.

Additional context

Add any other context here.

sha-intelli avatar Mar 08 '24 20:03 sha-intelli

I would like to know that as well, would you like to share the information if you figured it out? 😄

klesh avatar Mar 11 '24 08:03 klesh

BUMP - Our team can use a valid openapi spec to extend a lot of integration/automation features - Any chance someone can chime in, seems based on this plugin/code there might be a way to export API spec: https://github.com/apache/incubator-devlake/blob/main/backend/core/plugin/plugin_openapi_spec.go

Also tagging and @CamilleTeruel and @wanisfahmyDE that had some related commits - Appreciate any clues anyone can provide.

dc-seena avatar Mar 24 '24 16:03 dc-seena

Hey @dc-seena, I am not sure if that's what you're looking for but I had a look at: https://github.com/apache/incubator-devlake/blob/main/backend/server/api/api.go#L176-L201 and found the generated json file doc.json, then locally I started DevLake and got the API definition in json format when hitting: http://localhost:8080/swagger/doc.json.

Does this help?

wanis-fahmy avatar Mar 25 '24 11:03 wanis-fahmy

This issue has been automatically marked as stale because it has been inactive for 60 days. It will be closed in next 7 days if no further activity occurs.

github-actions[bot] avatar May 25 '24 00:05 github-actions[bot]

This issue has been closed because it has been inactive for a long time. You can reopen it if you encounter the similar problem in the future.

github-actions[bot] avatar Jun 01 '24 00:06 github-actions[bot]