FIXTradingCommunity / tablature

Easy authoring for rules of engagement using markdown
https://www.fixtrading.org/
Apache License 2.0
11 stars 8 forks source link

[md2orchestra] invalid treatment of supported attribute #63

Open donmendelson opened 2 years ago

donmendelson commented 2 years ago

Reported by Jörg Thonnes in FIX Forum:

currently, I started to produce a specific FIX Orchestra file in both XML and Markdown formats to describe our FIX Trading Adapter.

To indicate that some specific code set values are forbidden or unsupported, I used the supported attribute of the fixr:codeset element. The resulting Markdown table lacks the column, though.

If I add the column “supported” to the Markdown table, the result is a new XML sub-element:

forbidden
donmendelson commented 2 years ago

Seems like a bug. md2orchestra adds an appinfo element for any column name that it does not recognize as an Orchestra attribute. This is by design–it allows a firm to extend Orchestra in its ROE in any way it chooses. However, supported is a standard Orchestra attribute, so it should not have been treated that way.

Codesets can be treated in two ways. One is to only include the codes that are actually allowed by the ROE. The other way is to explicitly enumerate both supported and unsupported codes. For example, in a codeset for order type, you may want to explicitly say that Stop-Limit is not supported for an asset class. You do that by setting supported="forbidden" for that code, indicating that if that order type was requested, the order would be rejected.

The valid values of supported attribute are supported, forbidden, and ignored – supported is the default. The attribute is valid for messages and any of their elements. The ignored case indicates that a value is permitted but not validated.