All Downloads are FREE. Search and download functionalities are using the official Maven repository.

functions.RESTOperation.ext Maven / Gradle / Ivy

There is a newer version: 1.24.1
Show newest version
extension java::GeneratorCommons;
extension functions::BeanParam;

cached boolean isRESTOperation(uml::Element element):
    element.isStereotypeApplied("RESTOperation");
    
cached JMM::RESTOperation asRESTOperation(uml::Element element):
    (JMM::RESTOperation) element;
    
cached String getFullPath(JMM::RESTOperation operation):
    if operation.path.length > 0
    then ((JMM::RESTResource) operation.owner).path + "/" + operation.path + " " + operation.httpMethods
    else ((JMM::RESTResource) operation.owner).path + " " + operation.httpMethods;
    
cached boolean hasBeanParams(JMM::RESTOperation operation):
    operation.getBeanParams().isEmpty == false;

cached List[JMM::BeanParam] getBeanParams(JMM::RESTOperation operation):
    operation.ownedParameter.select(e|e.isParameterBeanParam()).parameterAsBeanParam();




© 2015 - 2024 Weber Informatics LLC | Privacy Policy