Skip to content

JSON schema is no longer valid #170

Description

@mimol91

Schema https://github.com/formancehq/numscript/blob/main/specs.schema.json Is no longer valid.
Eg: Balances has to be object, not an array otherwise there is an error
json: cannot unmarshal array into Go struct field TestCase.testCases.balances of type interpreter.Balances

Docs at https://docs.formance.com/modules/numscript/specs?deployment=cloud&license=ee#example are OK but they are pointing to schema that does not exits https://raw.githubusercontent.com/formancehq/numscript/specs.schema.json


There is typo in docs

type TestCase = {
  balances?: Balances;
  variables?: Vars;
  metadata?: AccountsMetadata;

  it: string;
  "expect.missingFunds"?: boolean; -> It should be changed to expect.error.missingFunds
  "expect.postings"?: Array<Posting>;
  "expect.txMetadata"?: TxMetadata;
  "expect.metadata"?: AccountsMetadata;
  "expect.volumes"?: Balances;
  "expect.movements"?: Movements;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions