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

OpenAPI3 ciruclar reference with union drops props #3811

Closed
timotheeguerin opened this issue Jul 10, 2024 · 0 comments · Fixed by #3908
Closed

OpenAPI3 ciruclar reference with union drops props #3811

timotheeguerin opened this issue Jul 10, 2024 · 0 comments · Fixed by #3908
Assignees
Labels
bug Something isn't working emitter:openapi3 Issues for @typespec/openapi3 emitter triaged:core
Milestone

Comments

@timotheeguerin
Copy link
Member

model MenuGroup {
  label: string;

  children: MenuItem | MenuGroup;
}

model MenuItem {
  label: string;
}

Playground Link

@timotheeguerin timotheeguerin added the bug Something isn't working label Jul 10, 2024
@timotheeguerin timotheeguerin added the emitter:openapi3 Issues for @typespec/openapi3 emitter label Jul 10, 2024
@markcowl markcowl added this to the [2024] August milestone Jul 16, 2024
@chrisradek chrisradek self-assigned this Jul 18, 2024
github-merge-queue bot pushed a commit that referenced this issue Jul 19, 2024
Fixes #3811 

Root cause seemed to be that when encountering 2+ non-null items in a
union, placeholders weren't getting wrapped by ObjectBuilder and thus
the emitter wasn't resolving circular references correctly.

Co-authored-by: Christopher Radek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working emitter:openapi3 Issues for @typespec/openapi3 emitter triaged:core
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants