apisprout icon indicating copy to clipboard operation
apisprout copied to clipboard

Add support for watching multiple files (or wildcard) with --watch option

Open AbhimanyuG opened this issue 6 years ago • 2 comments

It'll be helpful if specs are distributed across multiple files.

Something like:

apisprout --watch /api-specs/*.yaml

AbhimanyuG avatar Mar 28 '19 15:03 AbhimanyuG

Nice idea! This might also be possible by parsing the refs in the file, which would mean supporting watching files across different directories instead of assuming all the files are in one place.

danielgtaylor avatar Mar 29 '19 05:03 danielgtaylor

Nice idea! This might also be possible by parsing the refs in the file, which would mean supporting watching files across different directories instead of assuming all the files are in one place.

Yea, that makes more sense.

For anyone looking for workaround right now, here's a pm2 wrapper Dockerfile and command:

Dockerfile:

FROM danielgtaylor/apisprout
RUN apk update && apk add nodejs npm && npm i -g pm2

docker-compose.yml

 api-mock:
    build: ./dir
    volumes:
      - "./dir:/api-specs"
    entrypoint: "pm2 start apisprout --no-daemon --watch /api-specs/ -- /api-specs/openapi.yaml"

AbhimanyuG avatar Mar 29 '19 11:03 AbhimanyuG