ad-on-is / adonis-autoswagger

Auto-Generate swagger docs for AdonisJS
MIT License
129 stars 41 forks source link

Usage with docker #134

Open ShahriarKh opened 1 month ago

ShahriarKh commented 1 month ago

I'm trying to integrate this to our ci/cd, but:

So, three possible solutions are:

  1. Fix doc generation so it's not dependent on envs. (Don't run start\env.ts when running node ace docs:generate)
  2. Make it possible to generate docs inside build folder (so it can be added to docker compose where .env is present)

Another simple (and maybe the best) way is to add swagger.yaml and swagger.json to git, and just copy them (like how we copy package.json and other files in docker), but developers should make sure that it's always the latest version. Maybe setting up a predev script can force this, or a hook before each commit. But eh, kinda overkill.