...
Choose a deployment of the new code to generate from. This could be beta, avocado, or even a dev local, but not app. The API cannot be running in production mode.
In the api directory run
UPDATE_OAS_FILES=1 npm test
. This will modify the JSON files with the results of static analysis and the network traffic generated from the backend Jest tests.In the same directory run
UPDATE_OAS_FILES=1 npm start
. This launches the API in a mode that monitors network traffic and modifies the JSON files accordingly. At this point, running Cypress tests and or manually using the app to activate new API features is a good idea.When finished, commit the modified JSON files to the git repo.
...