Skip to content

fix: invalid code was generated for oneOf with single ref#1498

Merged
ernado merged 1 commit intoogen-go:mainfrom
ruz:issue-1442-fix-oneOf-single-ref
Sep 18, 2025
Merged

fix: invalid code was generated for oneOf with single ref#1498
ernado merged 1 commit intoogen-go:mainfrom
ruz:issue-1442-fix-oneOf-single-ref

Conversation

@ruz
Copy link
Contributor

@ruz ruz commented Jul 15, 2025

ObjSome:
type: object
oneOf:
- $ref: "#/components/schemas/ObjA"

Fix #1442

@ruz
Copy link
Contributor Author

ruz commented Jul 15, 2025

Not sure if it's totally correct way to deal, but at least in consistency with allOf and generated code compiles.

@ernado ernado changed the title fix issue #1442, invalid code was generated for oneOf with single ref fix: invalid code was generated for oneOf with single ref Sep 18, 2025
…gle ref

ObjSome:
  type: object
  oneOf:
    - $ref: "#/components/schemas/ObjA"
@ernado ernado force-pushed the issue-1442-fix-oneOf-single-ref branch from c04309a to 87c87d5 Compare September 18, 2025 00:24
@ernado ernado merged commit 28d6f66 into ogen-go:main Sep 18, 2025
@ruz
Copy link
Contributor Author

ruz commented Sep 18, 2025

awesome, thanks

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

Successfully merging this pull request may close these issues.

Generator: Bug with single-value oneOf

2 participants