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 - fixes bug with circular references in unions #3908

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

chrisradek
Copy link
Member

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.

@azure-sdk
Copy link
Collaborator

All changed packages have been documented.

  • @typespec/openapi3
Show changes

@typespec/openapi3 - fix ✏️

Fixes bug where circular references in unions caused an empty object to be emitted instead of a ref.

@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 📚 Next docs

@chrisradek chrisradek added this pull request to the merge queue Jul 19, 2024
Merged via the queue into microsoft:main with commit c4aa1ab Jul 19, 2024
22 checks passed
@chrisradek chrisradek deleted the openapi3-fix-circ-ref-unions branch July 19, 2024 18:13
github-merge-queue bot pushed a commit that referenced this pull request Jul 19, 2024
)

Fixes regression introduced in #3908 where docs set at the union level
were being applied to each union variant.

Co-authored-by: Christopher Radek <Christopher.Radek@microsoft.com>
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.

OpenAPI3 ciruclar reference with union drops props
3 participants