Swagger definition for TransactionDetail misses memo

Hi,

when I look at the swagger definition, I cannot find the memo field in the TransactionDetail definition.

Would you be able to add that ?

"TransactionDetail": {
      "allOf": [
        {
          "$ref": "#/definitions/TransactionSummary"
        },
        {
          "type": "object",
          "required": [
            "account_name",
            "payee_name",
            "category_name",
            "subtransactions"
          ],
          "properties": {
            "account_name": {
              "type": "string"
            },
            "payee_name": {
              "type": ["string", "null"]
            },
            "category_name": {
              "type": ["string", "null"]
            },
            "subtransactions": {
              "type": "array",
              "description": "If a split transaction, the subtransactions.",
              "items": {
                "$ref": "#/definitions/SubTransaction"
              }
            }
          }
3replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
    • chbndrhnns
    • Cloud Test Engineer
    • Magenta_Deer_43f0695638
    • 7 mths ago
    • Reported - view

    I am also wondering why category_id is also not included. 

    Reply Like
    • chbndrhnns
    • Cloud Test Engineer
    • Magenta_Deer_43f0695638
    • 7 mths ago
    • Reported - view

    The title is maybe not general enough... :) My question is basically:

     

    How can I retrieve the memo and the categoryId for a single transaction using the swagger client?

    Is there a reason these kind of information is not included as of now [1]?

     

    [1] https://github.com/ynab/ynab-sdk-js/blob/master/docs/TransactionsApi.md#getTransactionById

    Reply Like
  •  chbndrhnns 

    TransactionDetail includes "allOf" TransactionSummary meaning it has all those fields as well.  The types are "merged" together logically according to the spec. 

    As for the markdown documentation you referenced: the generation is simply not doing what it should be doing here and not taking "allOf" into account.  I made a change to link directly to the TypeScript declaration file as it is a source of truth here and it is easier to see what the final type looks like: https://github.com/ynab/ynab-sdk-js/blob/master/dist/api.d.ts#L2078 (notice category_id and memo are in there).

     

    I hope this helps!

    Reply Like
Like Follow
  • 7 mths agoLast active
  • 3Replies
  • 516Views
  • 2 Following