[codegen] Fix 'super.HashCode' for oneOf and allOf Implementations (retry) (#5830)

* Added hasVars after completion of all model post-processing (#5587)

* Post ensure-up-to-date

* Update to check the size of vars and not assume non-null
This commit is contained in:
jburgess 2020-04-07 04:42:20 -04:00 committed by GitHub
parent 7efa65164a
commit 2ff9be6f95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 2 deletions

View File

@ -2320,6 +2320,7 @@ public class DefaultCodegen implements CodegenConfig {
for (CodegenProperty prop : m.vars) { for (CodegenProperty prop : m.vars) {
postProcessModelProperty(m, prop); postProcessModelProperty(m, prop);
} }
m.hasVars = m.vars.size() > 0;
} }
if (m.allVars != null) { if (m.allVars != null) {
for (CodegenProperty prop : m.allVars) { for (CodegenProperty prop : m.allVars) {

View File

@ -1 +1 @@
4.3.0-SNAPSHOT 4.3.1-SNAPSHOT

View File

@ -245,6 +245,13 @@ CREATE TABLE IF NOT EXISTS `EnumArrays` (
`array_enum` JSON DEFAULT NULL `array_enum` JSON DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Table structure for table `EnumClass` generated from model 'EnumClass'
--
CREATE TABLE IF NOT EXISTS `EnumClass` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --
-- Table structure for table `Enum_Test` generated from model 'EnumUnderscoreTest' -- Table structure for table `Enum_Test` generated from model 'EnumUnderscoreTest'
-- --
@ -377,6 +384,13 @@ CREATE TABLE IF NOT EXISTS `OuterComposite` (
`my_boolean` TINYINT(1) DEFAULT NULL `my_boolean` TINYINT(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Table structure for table `OuterEnum` generated from model 'OuterEnum'
--
CREATE TABLE IF NOT EXISTS `OuterEnum` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --
-- Table structure for table `Pet` generated from model 'Pet' -- Table structure for table `Pet` generated from model 'Pet'
-- --

View File

@ -1 +1 @@
4.3.0-SNAPSHOT 4.3.1-SNAPSHOT