tliron / puccini

Cloud topology management and deployment tools based on TOSCA
https://puccini.cloud
Apache License 2.0
88 stars 20 forks source link

Refining a mandatory property as an optional property #107

Closed philippemerle closed 2 years ago

philippemerle commented 2 years ago

Following service template is incorrect

tosca_definitions_version: tosca_simple_yaml_1_3
data_types:
  DT1:
    properties:
      p1:
        type: string
  DT2:
    derived_from: DT1
    properties:
      p1:
        type: string
        required: false # ERROR: a required property can not become an optional property.

But puccini-tosca compile does not report this error.

Section 3.6.10.6 of TOSCA 1.3 specifies that Turning an optional property into a required property is allowed but No other refinements are allowed, e.g turning a required property into an optional property is not allowed.