use of org.mule.runtime.module.extension.internal.capability.xml.schema.model.TopLevelSimpleType in project mule by mulesoft.
the class SchemaBuilder method registerEnum.
private void registerEnum(Schema schema, StringType enumType) {
TopLevelSimpleType enumSimpleType = new TopLevelSimpleType();
enumSimpleType.setName(sanitizeName(getId(enumType)) + SchemaConstants.ENUM_TYPE_SUFFIX);
Union union = new Union();
union.getSimpleType().add(createEnumSimpleType(enumType));
union.getSimpleType().add(createExpressionAndPropertyPlaceHolderSimpleType());
enumSimpleType.setUnion(union);
schema.getSimpleTypeOrComplexTypeOrGroup().add(enumSimpleType);
}
Aggregations