I'm using .NET Core app and want to automatically generate OpenAPI documentation in SwaggerHub whenever I push code to a branch in GitHub, so that I can share it across teams. Manually I can run the project, open the Swagger link in a browser, copy the API documentation and paste it in SwaggerHub. But I want to automate this process so that just by pushing code to a branch in GitHub, the API documentation is updated in SwaggerHub.
Asked
Active
Viewed 245 times
0
-
1SwaggerHub has an [API to update hosted definitions](https://stackoverflow.com/a/52661431/113116) programmatically. If your app build process produces an OpenAPI YAML/JSON file, you could just add an extra step to upload that file to SwaggerHub. – Helen Feb 14 '23 at 09:13