File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
modules/openapi-generator/src/main/java/org/openapitools/codegen Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -3190,14 +3190,7 @@ protected static String getEnumValueForProperty(
31903190 }
31913191
31923192 protected void SortModelPropertiesByRequiredFlag (CodegenModel model ) {
3193- Comparator <CodegenProperty > comparator = new Comparator <CodegenProperty >() {
3194- @ Override
3195- public int compare (CodegenProperty one , CodegenProperty another ) {
3196- if (one .required == another .required ) return 0 ;
3197- else if (one .required ) return -1 ;
3198- else return 1 ;
3199- }
3200- };
3193+ Comparator <CodegenProperty > comparator = Comparator .comparing (prop -> !prop .required );
32013194 Collections .sort (model .vars , comparator );
32023195 Collections .sort (model .allVars , comparator );
32033196 }
You can’t perform that action at this time.
0 commit comments