Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Codegen] Convert "any type" to oneOf model #6051

Prev Previous commit
Next Next commit
Early draft to handle conversion from any type to oneOf schema
  • Loading branch information
sebastien-rosset committed Apr 25, 2020
commit b1d60d50d79d25245cec4786f75906035d0d2d18
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,26 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
public Set<String> allMandatory = new TreeSet<String>(); // with parent's required properties

public Set<String> imports = new TreeSet<String>();
public boolean hasVars, emptyVars, hasMoreModels, hasEnums, isEnum, isNullable, hasRequired, hasOptional, isArrayModel, hasChildren, isMapModel, isDeprecated;
public boolean hasVars, emptyVars, hasMoreModels, hasEnums, isEnum;
/**
* Indicates the OAS schema specifies "nullable: true".
*/
public boolean isNullable;
/**
* Indicates the type has at least one required property.
*/
public boolean hasRequired;
/**
* Indicates the type has at least one optional property.
*/
public boolean hasOptional;
public boolean isArrayModel;
public boolean hasChildren;
public boolean isMapModel;
/**
* Indicates the OAS schema specifies "deprecated: true".
*/
public boolean isDeprecated;
public boolean hasOnlyReadOnly = true; // true if all properties are read-only
public ExternalDocumentation externalDocumentation;

Expand Down