- All Known Implementing Classes:
ChoiceNotInlineStrategy
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A strategy for determining whether a definition should be inlined in the
generated schema or referenced as a separate type definition.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IInlineStrategyA strategy that inlines definitions unless they are used in a choice group.static final IInlineStrategyA strategy that inlines definitions based on theirIDefinition.isInline()property.static final IInlineStrategyA strategy that never inlines any definition. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisInline(IDefinition definition, ModuleIndex metaschemaIndex) Determine if the provided definition should be inlined in the generated schema.static IInlineStrategynewInlineStrategy(IConfiguration<SchemaGenerationFeature<?>> configuration) Create a new inline strategy based on the provided configuration.
-
Field Details
-
NONE_INLINE
A strategy that never inlines any definition. -
DEFINED_AS_INLINE
A strategy that inlines definitions based on theirIDefinition.isInline()property. -
CHOICE_NOT_INLINE
A strategy that inlines definitions unless they are used in a choice group.
-
-
Method Details
-
newInlineStrategy
@NonNull static IInlineStrategy newInlineStrategy(@NonNull IConfiguration<SchemaGenerationFeature<?>> configuration) Create a new inline strategy based on the provided configuration.- Parameters:
configuration- the schema generation configuration- Returns:
- the appropriate inline strategy based on the configuration settings
-
isInline
Determine if the provided definition should be inlined in the generated schema.- Parameters:
definition- the definition to checkmetaschemaIndex- the module index containing definition usage information- Returns:
trueif the definition should be inlined,falseif it should be referenced as a separate type
-