Skip to content

JSON Schema wrong for u128/i128 fields #1605

@webmaster128

Description

@webmaster128

When using u128/i128 in messages, the generated schema wrongly outputs "type": "integer" instead of string.

      {
        "description": "Allocate large amounts of memory without consuming much gas",
        "type": "object",
        "required": [
          "allocate_large_memory"
        ],
        "properties": {
          "allocate_large_memory": {
            "type": "object",
            "required": [
              "pages"
            ],
            "properties": {
              "pages": {
                "type": "integer",
                "format": "uint128",
                "minimum": 0.0
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },

However, both json-serde and json-serde-wasm use strings for u128/i128. This is probably a bug to be fixed in schemars.

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