OpenAPITools / openapi-generator-bazel

Bazel plugin for OpenAPI Generator
Apache License 2.0
66 stars 46 forks source link

Cannot generate codes from multiple yaml #27

Open hkawa608 opened 2 years ago

hkawa608 commented 2 years ago

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?

wing328 commented 2 years ago

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.

hkawa608 commented 2 years ago

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