You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: unable to get model class when using arrays in schema (#207)
* fix: resolve NPE when attempting to use a null modelClass by trying to use the x-parser-schema-id property of the source schemafirst, then try the property name.
* fix: fixed issues with keyword schema naming and writing inner classes that should have been their own class; the schema name is going to be correct more often from using x-schema-parser-id instead when appropriate; broke all args constructor for schemas that are arrays with this commit.
* fix: created partial for all args constructor; all args constructor now correctly created for array types
* chore: remove code smells; stripPackage function is more cohesive; removed need for a tentative class name.
* chore: remove useless modelClass assignment in anonSchema allOf handling
* chore: clean up todo; use ternary instead of if statement
* update snapshot; unnecessary spacing removed due to removal of comment
* chore: fix linting problems
// If we translated this schema from the map using an anonymous schema key, we have no idea what the name should be, so we use the one provided directly from the source - not the generator.
25
+
// If we translated this schema from the map using a known schema (the name of the schema was picked out correctly by the generator), use that name.
// Each property name is the name of a schema. It should also have an x-parser-schema-id name. We'll be adding duplicate mappings (two mappings to the same model class) since the anon schemas do have names
// Be sure the anonymous modelClass and the named modelClass are updated with the superclass information
176
+
// We dont want the anonymous schema because the class name won't be correct if it's a $ref, so if the modelClass exists, update that one, if it doesn't we'll make it
0 commit comments