File tree Expand file tree Collapse file tree
modules/openapi-generator/src/main/java/org/openapitools/codegen/languages Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -549,23 +549,6 @@ public ModelsMap postProcessModels(ModelsMap objs) {
549549 for (ModelMap mo : objs .getModels ()) {
550550 CodegenModel cm = mo .getModel ();
551551
552- // OAS 3.1: if oneOf or anyOf contains the 'null' type, mark the model as nullable
553- // and remove the 'Null' pseudo-type from the composed schema lists.
554- if (cm .oneOf != null && !cm .oneOf .isEmpty () && cm .oneOf .remove ("Null" )) {
555- cm .isNullable = true ;
556- }
557- if (cm .anyOf != null && !cm .anyOf .isEmpty () && cm .anyOf .remove ("Null" )) {
558- cm .isNullable = true ;
559- }
560- if (cm .getComposedSchemas () != null ) {
561- if (cm .getComposedSchemas ().getOneOf () != null ) {
562- cm .getComposedSchemas ().getOneOf ().removeIf (o -> "Null" .equals (o .dataType ));
563- }
564- if (cm .getComposedSchemas ().getAnyOf () != null ) {
565- cm .getComposedSchemas ().getAnyOf ().removeIf (o -> "Null" .equals (o .dataType ));
566- }
567- }
568-
569552 if (cm .getComposedSchemas () != null ) {
570553 List <CodegenProperty > oneOf = cm .getComposedSchemas ().getOneOf ();
571554 if (oneOf != null ) {
You can’t perform that action at this time.
0 commit comments