Skip to content

SpecVersion V4 doesn't accept "id" key #517

@DeborahPereira4sh

Description

@DeborahPereira4sh

In Draft 4, $id is just id (without the dollar sign) .

But when I give a json file in draft 4 without the dollar sign to build my schema it doesn't work and I have the following error :

urn:OCPP:1.6:2019:12:HeartbeatRequest: null is an invalid segment for URI {2}
com.networknt.schema.JsonSchemaException: urn:OCPP:1.6:2019:12:HeartbeatRequest: null is an invalid segment for URI {2}
	at app//com.networknt.schema.JsonSchema.combineCurrentUriWithIds(JsonSchema.java:111)
	at app//com.networknt.schema.JsonSchema.<init>(JsonSchema.java:86)
	at app//com.networknt.schema.JsonSchema.<init>(JsonSchema.java:72)
	at app//com.networknt.schema.JsonSchema.<init>(JsonSchema.java:67)
	at app//com.networknt.schema.JsonSchemaFactory.newJsonSchema(JsonSchemaFactory.java:274)
	at app//com.networknt.schema.JsonSchemaFactory.getSchema(JsonSchemaFactory.java:316)
	at app//com.networknt.schema.JsonSchemaFactory.getSchema(JsonSchemaFactory.java:324)

And, when I had the $ it works.

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