openapi-generator-bazel icon indicating copy to clipboard operation
openapi-generator-bazel copied to clipboard

Cannot generate codes from multiple yaml

Open hkawa608 opened this issue 4 years ago • 2 comments

My openapi.yaml refers other files such as components/schemas/definitions.yaml. However, openapi-generator-bazel seems to support only all-in-one yaml. Because only openapi.yaml is copied under bazel sandbox folder, code generation fails due to failure of loading RELATIVE ref: ./components/schemas/definitions.yaml.

How can I generate codes from openapi.yaml which consists of multiple yaml files?

hkawa608 avatar Nov 17 '21 15:11 hkawa608

I've seen others using https://www.npmjs.com/package/openapi-merge to merge multiple specs into a single one as a workaround. You may also want to give it a try.

wing328 avatar Dec 04 '21 05:12 wing328

I found a fundamental solution and made a PR. Would you review the PR? https://github.com/OpenAPITools/openapi-generator-bazel/pull/31

hkawa608 avatar Dec 08 '21 05:12 hkawa608