Interface IInlineStrategy

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.

@FunctionalInterface public interface IInlineStrategy
A strategy for determining whether a definition should be inlined in the generated schema or referenced as a separate type definition.
  • Field Details

    • NONE_INLINE

      @NonNull static final IInlineStrategy NONE_INLINE
      A strategy that never inlines any definition.
    • DEFINED_AS_INLINE

      @NonNull static final IInlineStrategy DEFINED_AS_INLINE
      A strategy that inlines definitions based on their IDefinition.isInline() property.
    • CHOICE_NOT_INLINE

      @NonNull static final IInlineStrategy 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

      boolean isInline(@NonNull IDefinition definition, @NonNull ModuleIndex metaschemaIndex)
      Determine if the provided definition should be inlined in the generated schema.
      Parameters:
      definition - the definition to check
      metaschemaIndex - the module index containing definition usage information
      Returns:
      true if the definition should be inlined, false if it should be referenced as a separate type