Updating API on Apicurio studio by sending a POST with OpenAPI json doc #3104
-
We have a Nestjs app and creating OpenAPI docs with Swagger. Currently we need to update it on Apicurio manually. We want to automate this update. What would be the best bet? Should we just send a POST request with the updated JSOn docs? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
What version of Studio are you using? |
Beta Was this translation helpful? Give feedback.
-
@EricWittmann Could not find any API document so far 😢 |
Beta Was this translation helpful? Give feedback.
That's the original (now deprecated) version of Studio. It's fine that you're still using it, just understand that my answer is drawing on my old memories of how that version works... :)
That said, I think you can use this REST API call:
https://github.com/Apicurio/apicurio-studio/blob/0.2.x/back-end/hub-api/src/main/java/io/apicurio/hub/api/rest/IDesignsResource.java#L92-L95
That should update the content of the design. You'll need to have the designId. And you'll need to have an access token from Keycloak to make the call.