Skip to content

get_available_budget fails due to Firefly III API returning currency_id as int instead of string #43

@RadCod3

Description

@RadCod3

Problem

The get_available_budget tool fails with Pydantic validation errors:

4 validation errors for AvailableBudgetArray
data.0.attributes.spent_in_budgets.0.currency_id
    Input should be a valid string [type=string_type, input_value=25, input_type=int]
data.0.attributes.pc_spent_in_budgets.0.currency_id
    Input should be a valid string [type=string_type, input_value=25, input_type=int]
data.0.attributes.spent_outside_budgets.0.currency_id
    Input should be a valid string [type=string_type, input_value=25, input_type=int]
data.0.attributes.pc_spent_outside_budgets.0.currency_id
    Input should be a valid string [type=string_type, input_value=25, input_type=int]

This is due to AvailableBudgetArray.data.0.attributes.spent_in_budgets.0.currency_id being an integer instead of a string as mentioned in the OpenAPI spec

    ArrayEntryWithCurrencyAndSum:
      type: object
      properties:
        currency_id:
          type: string
          format: string
          example: "5"
        currency_code:
          type: string
          format: string
          example: "USD"
        currency_symbol:
          type: string
          format: string
          example: "$"
        currency_decimal_places:
          type: integer
          format: int32
          example: 2
          description: Number of decimals supported by the currency
        sum:
          type: string
          format: amount
          example: "123.45"
          description: The amount earned, spent or transferred. 

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions