Forum Discussion
Hey millseyK; can you try putting the reference to the controller in Ignored Paths instead? Ignored paths will remain as is and will not be changed in any way by the integration, while Fully Managed Paths may still be overwritten. I think this could be the problem, but let me know if the controller is still getting overwritten when it's an Ignored Path and we'll see what we can do. Thanks!
Hey joejoyce,
Thanks so much for your reply. The issue is I actually want the controller file to be altered/regenerated when the API spec changes. Here is the essential question: can this tool regenerate the controller/routes definition file (depending on your web server implementation) when the API spec changes? Obviously the code is going to get out of synch with the yaml API spec otherwise. Or can the SwaggerHub tool not do this? Just need to know either way so I can plan for an alternative but it must be automated.
Cheers,
Katie
- joejoyce4 years agoStaff
Thanks for the clarification! So, given the way that the SCM synchs work, this should be possible:
1: Spec changes in SwaggerHub, user presses save/triggers the integration.
2: The SCM integration uses codegen to generate whatever new stubs are needed and pushes them to the specified repo.
This can be configured to happen every time the spec changes, thus making sure that the stub code in your SCM is always reflecting the spec. Have I understood your use case correctly? Some links here that might be useful:
https://support.smartbear.com/swaggerhub/docs/apis/generating-code/server-stub.html
https://support.smartbear.com/swaggerhub/docs/integrations/github-sync.html
Let me know via direct message if you think a quick call/ screen-share would be helpful to get to the bottom of this if you still have questions!
Joe
Related Content
Recent Discussions
- 16 days ago
- 2 months ago