Forum Discussion

Stoplight's avatar
Stoplight
Community Manager
10 months ago

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

    • Stoplight's avatar
      Stoplight
      Community Manager

      skidlucas (OP) [11/02/2022 - 15:39 ET]

      yeah I read it already but I'm kinda afraid of losing every annotation in the code to replace it entirely with stoplight, so I wanted to be sure that it was either one or the other; thanks anyway 🙂