@Test public void modelAllowEmptyTest() { final Map<String, Schema> models = ModelConverters.getInstance().readAll(Model1979.class); Schema model = models.get("Model1979"); assertTrue(((Schema) model.getProperties().get("id")).getNullable()); }
.multipleOf(subtypeModel.getMultipleOf()) .not(subtypeModel.getNot()) .nullable(subtypeModel.getNullable()) .pattern(subtypeModel.getPattern()) .properties(subtypeModel.getProperties())
codegenProperty.defaultValueWithParam = toDefaultValueWithParam(name, propertySchema); codegenProperty.jsonSchema = Json.pretty(propertySchema); if (propertySchema.getNullable() != null) { codegenProperty.nullable = propertySchema.getNullable();
if (Boolean.TRUE.equals(parameterSchema.getNullable())) { // use nullable defined in the spec codegenParameter.isNullable = true;
parameterSchema = new StringSchema().description("//TODO automatically added by swagger-codegen."); if (Boolean.TRUE.equals(parameterSchema.getNullable())) { codegenParameter.nullable = true;
property.isWriteOnly = p.getWriteOnly(); if (p.getNullable() != null) { property.isNullable = p.getNullable();
.multipleOf(subtypeModel.getMultipleOf()) .not(subtypeModel.getNot()) .nullable(subtypeModel.getNullable()) .pattern(subtypeModel.getPattern()) .properties(subtypeModel.getProperties())
composedSchema.setName(schema.getName()); composedSchema.setNot(schema.getNot()); composedSchema.setNullable(schema.getNullable()); composedSchema.setPattern(schema.getPattern()); composedSchema.setProperties(schema.getProperties());