Skip to content

Conversation

@DipakHalkude
Copy link

Fixes #10524

Problem:
Cyclic references in schema definitions were showing misleading example values as "string" instead of representing the actual object structure.

Solution:
Added handler for "any" type in primitives to return empty object {} for cyclic references detected by getType() function.

Changes:

  • Added "any": () => ({}) to primitives object in src/core/plugins/json-schema-5-samples/fn/index.js

Result:
Cyclic references now show as empty objects {} which better represents the actual data structure instead of the misleading "string" value.

@DipakHalkude
Copy link
Author

@robert-hebel-sb Please have a look :)

@DipakHalkude
Copy link
Author

@MichakrawSB Can you please review this PR :)

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.

Misleading example value in case of cyclic references

1 participant