Is there a way to handle Stoplight updates and generated swagger.json updates ?
Originally posted by user skidlucas to the Stoplight Community on 10/25/2022 at 11:59 ET.
Hello,
I'm confused about how to handle both Stoplight updates and code-related swagger.json updates.
I have a backend project using NestJS with some swagger annotations, so I can easily create a swagger.json and import it in Stoplight. But after that initial import, I'm not sure how to proceed. Should I always edit my docs using Stoplight studio ?
For example, if I import my swagger.json today, I make some changes on Stoplight (for example I change the visibility of some endpoints, add some description etc.) and I add a new endpoint tomorrow, should I create the documentation about this new endpoint only on Stoplight ? Or should I try to merge the new swagger.json with the old one ? What's the best way to handle this case ?
Thanks in advance 🙂
Lucas
Skinghar (Staff) [11/02/2022 - 10:52 ET]
Hello skidlucas, Here is a blog post that might provide you some assistance. https://blog.stoplight.io/api-design-first-vs-code-first