File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
src/main/java/com/fasterxml/jackson/annotation Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -315,7 +315,7 @@ public enum As {
315
315
*
316
316
* @since 2.5
317
317
public boolean skipWritingDefault() default false;
318
- /*
318
+ */
319
319
320
320
/*
321
321
/**********************************************************
@@ -332,5 +332,22 @@ public enum As {
332
332
* if such behavior is needed; this is rarely necessary.
333
333
*/
334
334
@ Deprecated
335
- public abstract static class None { }
335
+ public abstract static class None {}
336
+
337
+ /**
338
+ * Specifies whether the type ID should be strictly required during polymorphic deserialization of its subtypes.
339
+ * <p>
340
+ * If set to {@link OptBoolean#TRUE}, an {@code InvalidTypeIdException} will be thrown if no type
341
+ * information is provided.
342
+ * If set to {@link OptBoolean#FALSE}, deserialization may proceed without type information if the
343
+ * subtype is a legitimate target (non-abstract).
344
+ * If set to {@link OptBoolean#DEFAULT}, the global configuration of
345
+ * {@code MapperFeature#REQUIRE_TYPE_ID_FOR_SUBTYPES} is used for type ID handling.
346
+ * <p>
347
+ * NOTE: This setting is specific to this type and will <strong>always override</strong> the global
348
+ * configuration of {@code MapperFeature#REQUIRE_TYPE_ID_FOR_SUBTYPES}.
349
+ *
350
+ * @since 2.16
351
+ */
352
+ public OptBoolean requireTypeIdForSubtypes () default OptBoolean .DEFAULT ;
336
353
}
You can’t perform that action at this time.
0 commit comments