aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/models')
-rw-r--r--catalog-ui/src/app/models/properties-inputs/property-be-model.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/catalog-ui/src/app/models/properties-inputs/property-be-model.ts b/catalog-ui/src/app/models/properties-inputs/property-be-model.ts
index 097bbb2c54..b8cccdd213 100644
--- a/catalog-ui/src/app/models/properties-inputs/property-be-model.ts
+++ b/catalog-ui/src/app/models/properties-inputs/property-be-model.ts
@@ -197,5 +197,17 @@ export class PropertyBEModel {
public isToscaFunction(): boolean {
return this.toscaFunction != null;
}
+
+ /**
+ * Gets the schema type, if there is a schema. Otherwise, returns undefined.
+ *
+ * @return the schema type.
+ */
+ public getSchemaType(): string {
+ if (this.schema && this.schema.property) {
+ return this.schema.property.type;
+ }
+ return undefined;
+ }
}