Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circular dependencies #621

Open
uri200 opened this issue Jun 8, 2022 · 2 comments
Open

Circular dependencies #621

uri200 opened this issue Jun 8, 2022 · 2 comments

Comments

@uri200
Copy link

uri200 commented Jun 8, 2022

Hello
We were using oapi-codegen with simple yaml files and it works properly. However I have encounter some issues on circular dependecies. For example We are trying to generate TS29571_CommonData, using

//go:generate oapi-codegen -generate types,skip-prune -o specs/TS29571CommonData/TS29571CommonData.gen.go --import-mapping TS29510_Nnrf_AccessToken.yaml:magma/feg/gateway/sbi/specs/TS29510NnrfAccessToken defs/TS29571_CommonData.yaml

This file has a dependency on TS29510_Nnrf_AccessToken.yml. But at the same time TS29510_Nnrf_AccessToken has a dependency on TS29571_CommonData.yml. So basically they depend on each other. So we can not generate the golang code for neither of each. Is there any way to provide multiple yml files so the code is generated using both defs?

@uri200
Copy link
Author

uri200 commented Jun 8, 2022

i think this is also related to this issue #42

@jamietanna
Copy link
Member

In the meantime, a solution is to bundle specs, ie via https://www.jvt.me/posts/2022/02/10/bundle-openapi/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants