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 reference fixes #3451

Merged
merged 4 commits into from
May 28, 2024
Merged

Conversation

bterlson
Copy link
Member

@bterlson bterlson commented May 25, 2024

fix #3447
Fixed a few issues with circular references in the JSON Schema emitter and emitter framework:

  • The emitter framework wouldn't restore context correctly when directly emitting a type reference to a type with a circular reference.
  • The JSON Schema emitter did not handle circular references involving non-JSON Schema types.
  • The JSON Schema emitter would create an infinite loop when circular references needed to be put into $defs.

@azure-sdk
Copy link
Collaborator

azure-sdk commented May 25, 2024

All changed packages have been documented.

  • @typespec/compiler
  • @typespec/json-schema
Show changes

@typespec/compiler - fix ✏️

Emitter framework: fix losing context when referencing circular types

@typespec/json-schema - internal ✏️

@azure-sdk
Copy link
Collaborator

You can try these changes at https://cadlplayground.z22.web.core.windows.net/prs/3451/

Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/prs/3451/

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:json-schema
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Json schema recent change broke the autorest schema generator
3 participants