Skip to content

Errors in the definitions ? #2

@StefanoRaggi

Description

@StefanoRaggi

As a follow-up to my previous issue (#1), I found a few errors in the JSON spec I am using to generate C# bindings. Without the following changes, deserialization errors occurred at runtime.

  1. In PositionSide definition, TradeIds is defined as array of objects instead of array of strings
    https://github.com/oanda/v20-openapi/blob/master/json/v20.json#L5125
    should be: "type": "string",
    instead of: "$ref": "#/definitions/TradeID"

  2. relatedTransactionIDs and closingTransactionIDs are defined as arrays of objects instead of arrays of strings
    https://github.com/oanda/v20-openapi/blob/master/json/v20.json#L480
    https://github.com/oanda/v20-openapi/blob/master/json/v20.json#L11731
    https://github.com/oanda/v20-openapi/blob/master/json/v20.json#L11820
    should be: "type": "string",
    instead of: "$ref": "#/definitions/TransactionID"

  3. OrderPositionFill enum
    https://github.com/oanda/v20-openapi/blob/master/json/v20.json#L3464
    should be: POSITION_DEFAULT
    instead of: DEFAULT
    (also need to update all usages)

  4. OrderTriggerCondition enum
    https://github.com/oanda/v20-openapi/blob/master/json/v20.json#L3471
    should be: TRIGGER_DEFAULT
    instead of: DEFAULT
    (also need to update all usages)

This is the modified JSON file I used for generation: v20.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions