io.vrap.codegen.languages.extensions.PropertyExtensions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codegen-renderers Show documentation
Show all versions of codegen-renderers Show documentation
RAML API client code generators based on the REST Modeling Framework. https://github.com/vrapio/rest-modeling-framework
package io.vrap.codegen.languages.extensions
import io.vrap.rmf.raml.model.elements.NamedElement
/**
* Returns true if this property is a pattern property.
*
* @return true iff. this is a pattern property
*/
fun NamedElement.isPatternProperty() = this.name.startsWith("/") && this.name.endsWith("/")
/**
* Returns true if this property is an Attribute property.
*
* need to be implemented
*/
fun NamedElement.isAttributeProperty() = this.name.lowercase().contains("attribute")