diff options
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/mapping-models')
2 files changed, 16 insertions, 9 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/mapping-models/definitions/VlbDefinition.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/mapping-models/definitions/VlbDefinition.ts index f82310872..7a029fb3f 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/mapping-models/definitions/VlbDefinition.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/mapping-models/definitions/VlbDefinition.ts @@ -1,8 +1,11 @@ -import { Any, JsonObject, JsonProperty } from 'json2typescript'; +import {JsonObject, JsonProperty} from 'json2typescript'; @JsonObject('topology_template') export class TemplateTopology { - public content: string; + // tslint:disable-next-line:variable-name + public node_templates: object; + public workflows: object; + public content: string ; } @JsonObject @@ -22,26 +25,27 @@ export class VlbDefinition { export class DslContent { } + // Refactor varaibles name and use JsonConverteri @JsonObject('metadata') export class Metadata { @JsonProperty('template_author') - // tslint:disable-next-line:variable-name + // tslint:disable-next-line:variable-name template_author: string; 'author-email': string; 'user-groups': string; @JsonProperty('template_name') - // tslint:disable-next-line:variable-name + // tslint:disable-next-line:variable-name template_name: string; @JsonProperty('template_version') - // tslint:disable-next-line:variable-name + // tslint:disable-next-line:variable-name template_version: string; @JsonProperty('template_tag') - // tslint:disable-next-line:variable-name + // tslint:disable-next-line:variable-name template_tags: string; @JsonProperty('dictionary_group') - // tslint:disable-next-line:variable-name + // tslint:disable-next-line:variable-name dictionary_group: string; @JsonProperty('template_tags') templateTags: string; diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/mapping-models/mappingAdapter.model.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/mapping-models/mappingAdapter.model.ts index b4de578b9..e63b17fa2 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/mapping-models/mappingAdapter.model.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/mapping-models/mappingAdapter.model.ts @@ -10,11 +10,14 @@ export class MappingAdapter { private dependanciesSource: Map<string, string>) { } ToMapping(): Mapping { + // console.log(this.resourceDictionary.definition.property); const mapping = new Mapping(); mapping.name = this.resourceDictionary.name; mapping.dictionaryName = this.resourceDictionary.name; - mapping.property = this.resourceDictionary.definition.property; - mapping.inputParam = false; + mapping.property = Object.assign({}, this.resourceDictionary.definition.property); + mapping.inputParam = this.resourceDictionary['input-param'] || false; + // tslint:disable-next-line: no-string-literal + mapping.property['required'] = this.resourceDictionary['required'] || false; mapping.dictionarySource = this.dependanciesSource.get(mapping.name); if (this.dependancies.get(mapping.name)) { mapping.dependencies = this.dependancies.get(mapping.name); |