Package org.openapitools.codegen.config
Enum MergedSpecBuilder.MergeConflictStrategy
- java.lang.Object
-
- java.lang.Enum<MergedSpecBuilder.MergeConflictStrategy>
-
- org.openapitools.codegen.config.MergedSpecBuilder.MergeConflictStrategy
-
- All Implemented Interfaces:
Serializable,Comparable<MergedSpecBuilder.MergeConflictStrategy>
- Enclosing class:
- MergedSpecBuilder
public static enum MergedSpecBuilder.MergeConflictStrategy extends Enum<MergedSpecBuilder.MergeConflictStrategy>
Controls what happens when a conflict is detected during aMergedSpecBuilder.MergeMode.DEEPmerge.This strategy is applied consistently to every kind of merge conflict: component/model name clashes (same name, different definition), duplicate HTTP methods on the same path across specs, and duplicate
operationIds.WARNkeeps the first definition (and, for operationId clashes, renames the later one to keep the document valid);FAILaborts the merge.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FAILThrow aRuntimeExceptionand abort the merge.WARNLog a warning and keep the first definition (default).
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MergedSpecBuilder.MergeConflictStrategyvalueOf(String name)Returns the enum constant of this type with the specified name.static MergedSpecBuilder.MergeConflictStrategy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
WARN
public static final MergedSpecBuilder.MergeConflictStrategy WARN
Log a warning and keep the first definition (default).
-
FAIL
public static final MergedSpecBuilder.MergeConflictStrategy FAIL
Throw aRuntimeExceptionand abort the merge.
-
-
Method Detail
-
values
public static MergedSpecBuilder.MergeConflictStrategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MergedSpecBuilder.MergeConflictStrategy c : MergedSpecBuilder.MergeConflictStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MergedSpecBuilder.MergeConflictStrategy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-