001/*
002 * SPDX-FileCopyrightText: none
003 * SPDX-License-Identifier: CC0-1.0
004 */
005
006package dev.metaschema.schemagen;
007
008import dev.metaschema.core.configuration.AbstractConfigurationFeature;
009import edu.umd.cs.findbugs.annotations.NonNull;
010
011/**
012 * Configuration options for schema generation.
013 *
014 * @param <V>
015 *          the feature value type
016 */
017public final class SchemaGenerationFeature<V>
018    extends AbstractConfigurationFeature<V> {
019
020  /**
021   * If enabled, definitions that are defined inline will be generated as inline
022   * types. If disabled, definitions will always be generated as global types.
023   */
024  @NonNull
025  public static final SchemaGenerationFeature<Boolean> INLINE_DEFINITIONS
026      = new SchemaGenerationFeature<>("inline-definitions", Boolean.class, false);
027
028  /**
029   * If enabled, child definitions of a choice that are defined inline will be
030   * generated as inline types. If disabled, child definitions of a choice will
031   * always be generated as global types. This option will only be used if
032   * {@link #INLINE_DEFINITIONS} is also enabled.
033   */
034  @NonNull
035  public static final SchemaGenerationFeature<Boolean> INLINE_CHOICE_DEFINITIONS
036      = new SchemaGenerationFeature<>("inline-choice-definitions", Boolean.class, false);
037
038  private SchemaGenerationFeature(
039      @NonNull String name,
040      @NonNull Class<V> valueClass,
041      @NonNull V defaultValue) {
042    super(name, valueClass, defaultValue);
043  }
044
045}