specification icon indicating copy to clipboard operation
specification copied to clipboard

Please do not reuse `propertyType` for "environmentVar "

Open jkowalleck opened this issue 1 year ago • 1 comments

Please do not reuse propertyType for "environmentVar". The annotations from propertyType do not match the case here.

better define a dedicated (abstract) key-value pair element type:

<xs:complexType name="KeyValuePair">
    <xs:simpleContent>
        <xs:extension base="xs:string">
            <xs:attribute name="name" use="required">
                <xs:annotation><xs:documentation>The name of the env var</xs:documentation></xs:annotation>  
                <xs:simpleType>
                  <xs:restriction base="xs:token">
                    <xs:minLength value="1" />
                  </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:extension>
    </xs:simpleContent>
</xs:complexType>

(PS: this "KeyValuePair" is not identical to current implementation of "propertyType")

and use it here

<xs:element name="environmentVar" type="bom:KeyValuePair" />

Originally posted by @jkowalleck in https://github.com/CycloneDX/specification/pull/222#discussion_r1200197410

jkowalleck avatar Jun 16 '23 14:06 jkowalleck

@stevespringett i do not know where to put it. milestone 1.6? 2.0? depends on the actual implementation, this could be a breaking change, or it could be a widening/expanding of existing types.

it could be done via #249

jkowalleck avatar Jun 16 '23 15:06 jkowalleck