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

functions.OpenAPISpecification.ext Maven / Gradle / Ivy

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


cached boolean isOpenAPISpecification(uml::Element element):
    element.isStereotypeApplied("OpenAPI3Specification");
    
cached JMM::OpenAPI3Specification asOpenAPISpecification(uml::Element element):
    (JMM::OpenAPI3Specification) element;
    

cached String getContactName(JMM::OpenAPI3Specification spec):
    if spec.contactName.length > 0
    then spec.contactName
    else getOpenAPIContactNameFromSystemProperties();
    
cached String getContactURL(JMM::OpenAPI3Specification spec):
    if spec.contactURL.length > 0
    then spec.contactURL
    else getOpenAPIContactURLFromSystemProperties();
    
cached String getContactEmail(JMM::OpenAPI3Specification spec):
    if spec.contactEmail.length > 0
    then spec.contactEmail
    else getOpenAPIContactEmailFromSystemProperties();
    
cached String getLicenseName(JMM::OpenAPI3Specification spec):
    if spec.licenseName.length > 0
    then spec.licenseName
    else getOpenAPILicenseNameFromSystemProperties();
    
cached String getLicenseURL(JMM::OpenAPI3Specification spec):
    if spec.licenseURL.length > 0
    then spec.licenseURL
    else getOpenAPILicenseURLFromSystemProperties();
    
cached String getTermsOfUseURL(JMM::OpenAPI3Specification spec):
    if spec.termsOfUseURL.length > 0
    then spec.termsOfUseURL
    else getOpenAPITermsOfUseURLFromSystemProperties();

private cached String getOpenAPIContactNameFromSystemProperties():
    getSystemProperty("switch.gen.openapi.openAPIContactName", "");
    
private cached String getOpenAPIContactURLFromSystemProperties():
    getSystemProperty("switch.gen.openapi.openAPIContactURL", "");
    
private cached String getOpenAPIContactEmailFromSystemProperties():
    getSystemProperty("switch.gen.openapi.openAPIContactEmail", "");
    
private cached String getOpenAPILicenseNameFromSystemProperties():
    getSystemProperty("switch.gen.openapi.openAPILicenseName", "");
    
private cached String getOpenAPILicenseURLFromSystemProperties():
    getSystemProperty("switch.gen.openapi.openAPILicenseURL", "");
    
private cached String getOpenAPITermsOfUseURLFromSystemProperties():
    getSystemProperty("switch.gen.openapi.openAPITermsOfUseURL", "");
    
    




© 2015 - 2024 Weber Informatics LLC | Privacy Policy