Skip to content

Commit

Permalink
[codegen] Fix 'super.HashCode' for oneOf and allOf Implementations (r…
Browse files Browse the repository at this point in the history
…etry) (OpenAPITools#5830)

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

* Post ensure-up-to-date

* Update to check the size of vars and not assume non-null
  • Loading branch information
jburgess authored and michaelpro1 committed May 7, 2020
1 parent d8d4d22 commit dbc9312
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2320,6 +2320,7 @@ public CodegenModel fromModel(String name, Schema schema) {
for (CodegenProperty prop : m.vars) {
postProcessModelProperty(m, prop);
}
m.hasVars = m.vars.size() > 0;
}
if (m.allVars != null) {
for (CodegenProperty prop : m.allVars) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT
14 changes: 14 additions & 0 deletions samples/schema/petstore/mysql/mysql_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,13 @@ CREATE TABLE IF NOT EXISTS `EnumArrays` (
`array_enum` JSON DEFAULT NULL
) 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'
--
Expand Down Expand Up @@ -377,6 +384,13 @@ CREATE TABLE IF NOT EXISTS `OuterComposite` (
`my_boolean` TINYINT(1) DEFAULT NULL
) 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'
--
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT

0 comments on commit dbc9312

Please sign in to comment.