Skip to content

Failed to upgrade to version 3.0.0 #1229

@marichka-spin

Description

@marichka-spin

Hello team
We are upgrading our project repos to SpringBoot 4.1.0-M1, and it forced us to migrate to Jackson framework version 3. I tried to upgrade 'json-schema-validator' from version 1.0.83 to version 3.0.0 but I couldn't. Version 1.0.83 allowed to have property "type" of Array type that allows specific type and null
"type": ["string","null"]
But new Schema validator doesn't allow this. And I don't either it is a bug or allowed nulls should be handled differently?
Error that I get:
Caused by: tools.jackson.databind.exc.JsonNodeException: 'ArrayNode' method asString() cannot convert value [...(2 elements)] to java.lang.String: value type not coercible to String at tools.jackson.databind.exc.JsonNodeException.from(JsonNodeException.java:25) at tools.jackson.databind.node.BaseJsonNode._reportCoercionFail(BaseJsonNode.java:655) at tools.jackson.databind.node.BaseJsonNode.asString(BaseJsonNode.java:387) at com.networknt.schema.keyword.BaseKeywordValidator.getNodeFieldType(BaseKeywordValidator.java:89) at com.networknt.schema.keyword.MaximumValidator.<init>(MaximumValidator.java:57) at com.networknt.schema.keyword.KeywordType.newValidator(KeywordType.java:138) at com.networknt.schema.dialect.Dialect.newValidator(Dialect.java:471)

Thank you for any help!
Best regards, Mariia

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