org.joinedworkz.common.OpenApiGeneratorContext.xtend Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-base Show documentation
Show all versions of common-base Show documentation
DSL based modeling framework - facilities common base
package org.joinedworkz.common
import org.eclipse.xtend.lib.annotations.Accessors
import org.joinedworkz.common.context.CommonGeneratorContext
import org.joinedworkz.core.facility.Outlet
import org.joinedworkz.core.model.CmnModel
import org.joinedworkz.core.model.CmnType
import java.util.Properties
@Accessors
class OpenApiGeneratorContext extends CommonGeneratorContext {
final protected CmnModel model
final public Outlet htmlOutlet
new(CmnModel model, Outlet defaultOutlet, Outlet htmlOutlet, Properties properties) {
super(defaultOutlet, properties)
this.htmlOutlet = htmlOutlet
this.model = model
}
def OpenApiGeneratorContext addUsedType(CmnType type) {
/* ensure that not multiple type (instances) with the same name are added */
for (usedType : usedTypes) {
if (type.name == usedType.name) {
return this
}
}
usedTypes.add(type)
return this
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy