fix-orchestra icon indicating copy to clipboard operation
fix-orchestra copied to clipboard

[repository schema] unionDataType should be an attribute of a code set, not field

Open donmendelson opened this issue 2 years ago • 6 comments

The attribute unionDataType is only used on fields that have code sets. It is used to constrain the range of user-defined values that extend the standard code set.

Example

      <fixr:field added="FIX.2.7"
                  id="22"
                  name="SecurityIDSource"
                  type="SecurityIDSourceCodeSet"
                  updated="FIX.5.0SP2"
                  updatedEP="161"
                  abbrName="Src"
                  unionDataType="Reserved100Plus">

The type Reserved100Plus is documented as follows:

Values "100" and above are reserved for bilaterally agreed upon user defined enumerations.

SecurityIDSourceCodeSet is currently shared by 32 fields in FIX Latest. Logically they should all have the same constraint on user-defined code values. Therefore, it would cleaner design and less error-prone to make unionDataType an attribute of <codeSet> rather than <field>. An advantage of that change is that it would make the the base datatype and union datatype properties of the same object.

donmendelson avatar May 31 '22 17:05 donmendelson

Here's something from the Orchestra repository sample file that uses unionDataType:

<fixr:field type="int" unionDataType="Reserved1000Plus" id="40165" name="ProvisionCashSettlPaymentDateRelativeTo" abbrName="Reltv" added="FIX.5.0SP2" addedEP="161">
	<fixr:annotation>
		<fixr:documentation purpose="SYNOPSIS">
         Specifies the anchor date when the cash settlement payment date is relative to an anchor date.
         See http://www.fixtradingcommunity.org/codelists#Relative_To_Date for values.
      </fixr:documentation>
	</fixr:annotation>
</fixr:field>

The link should be https://www.fixtrading.org/packages/relativetodate/

This should be encoded in Orchestra as an external codeset.

<fixr:codeSet id="99999" name="RelativeToDate" type="int" unionDataType="Reserved1000Plus" specUrl="https://www.fixtrading.org/packages/relativetodate/"/>

<fixr:field type="RelativeToDate" id="40165" name="ProvisionCashSettlPaymentDateRelativeTo" abbrName="Reltv"/>

donmendelson avatar Jun 14 '22 12:06 donmendelson

External code sets make this a larger issue. The idea was to bring the external code sets back into Orchestra, avoiding the need to use URLs.

FIX Latest needs to use Orchestra v1.0 until extensions are no longer applied to the Basic repository and converted to Unified/Orchestra but to the Orchestra repository directly.

kleihan avatar Jun 14 '22 14:06 kleihan

It's a business decision whether to edit code sets in FIX Latest and subject them to GTC review versus editing them externally under a different process. Either way, I'm suggesting they should be code sets, and the unionDataType attribute should be on the code set.

donmendelson avatar Jun 14 '22 14:06 donmendelson

Agree, unionDataType attribute should be on the code set. The change of FIX Latest will just not be as quickly as we may have hoped for.

kleihan avatar Jun 14 '22 14:06 kleihan

Consider whether to leave unionDataType on <field> as well as adding to <codeSet> for back compatibility.

donmendelson avatar Jun 14 '22 16:06 donmendelson

Orchestra working group made a decision on June 15, 2022 to retain the unionDataType attribute on fields for back compatibility while adding it to code sets.

donmendelson avatar Jun 15 '22 14:06 donmendelson

Implemented in RC1

kleihan avatar Jun 03 '24 08:06 kleihan