Skip to content

How to Inline all objects except the circular refranced one #426

Closed Answered by CarstenWickner
mohammed6688 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @mohammed6688,

Your example looks like it was created with Option.DEFINITIONS_FOR_ALL_OBJECTS and you consider using Option.INLINE_ALL_SCHEMAS (which gives you an error due to the circular reference).

Why can't you use the default behaviour (with neither of these two Option values being enabled)? That would only produce definitions when the same type is referenced more than once. In your example: just the MessageDto.

Other than that default behaviour, there is no built-in mechanism to just create definitions for the circularly referenced types (yet 😉).
There'd be a way to manually force it through advanced configurations, if you you know the affected types upfront.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mohammed6688
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants