openapi-generator-bazel
openapi-generator-bazel copied to clipboard
update `openapi_generator()` to accept multiple spec files
Alter the openapi generator invocation to generate multiple -i spec.yaml
parameters on the command line.
Tests pass, and I added a multiple file test for the petstore-separate
example from the openapi spec
This should fix issue 27
Note: it breaks backwards compatibility
I renamed spec
to specs
and require a list as input. Callers who do not update will see:
% bazel query //...
ERROR: /Users/laz/git/openapi-generator-bazel/internal/test/BUILD.bazel:5:18: //internal/test:petstore: no such attribute 'spec' in '_openapi_generator' rule (did you mean 'specs'?)
ERROR: /Users/laz/git/openapi-generator-bazel/internal/test/BUILD.bazel:5:18: //internal/test:petstore: missing value for mandatory attribute 'specs' in '_openapi_generator' rule
ERROR: package contains errors: internal/test
ERROR: package contains errors: internal/test: //internal/test:petstore: no such attribute 'spec' in '_openapi_generator' rule (did you mean 'specs'?)
ERROR: Error evaluating '//...': error loading package 'internal/test': Package 'internal/test' contains errors