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

[BUG] [go] allOf with multiple schemas defined. Using only the first one: #10024

Closed
5 of 6 tasks
iafilius opened this issue Jul 23, 2021 · 2 comments
Closed
5 of 6 tasks

Comments

@iafilius
Copy link

iafilius commented Jul 23, 2021

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Issue: 2nd item of allOf ignored and no code is generated for go client library

Generating a go library form vendor provided spec file results in many warnings like:

[main] WARN  o.o.codegen.DefaultCodegen - allOf with multiple schemas defined. Using only the first one: logicalid_reference
openapi-generator version

5.2.0 and latest master, but tested different versions as well

version : WARN log #count while generating from vendor provided swagger file
4.2.2 : 79
4.2.3 : 79
4.3.1 : <crashes>
5.1.1 : 23
5.2.0 : 23
5.2.1-20210716.042228-7 : 23

OpenAPI declaration file content or url
Generation Details

java $JAVA_OPTS -jar ${OAG} generate -i $SWAGGERFILE -g go -o ${VCDIR} -p enumClassPrefix=true

Steps to reproduce

Generate go library and watch output. check generated code on missing peaces (100% reproducable)

Related issues/PRs
Suggest a fix

I think issue is caused by generator, or a special case of schema, not sure.
schema itself verifies fine.

See attached sample in case_nr7.json.txt which does have the issue
case_nr7.json.txt
Also see kind of similar attached sample case_nr1.json.txt which does NOT have the issue.
case_nr1.json.txt

regards

@iafilius iafilius changed the title [BUG] Description [BUG] [go] allOf with multiple schemas defined. Using only the first one: Jul 23, 2021
@oravecz
Copy link

oravecz commented Nov 17, 2022

The bug is in DefaultCodeGen. Not particular to a language template

@wing328
Copy link
Member

wing328 commented Nov 20, 2023

tested with the latest master and couldn't reproduce the issue as we've merged some fixes recently.

please give it a try with the latest master and happy to reopen the issue if needed.

@wing328 wing328 closed this as completed Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants