Skip to content

Don’t request $schema url during validation #1074

Answered by justin-tay
supoman-service asked this question in Q&A
Discussion options

You must be logged in to vote

If you want to use a custom meta schema you need to tell the library what it is or it will attempt to load it to determine what vocabularies are defined in the meta schema.

JsonMetaSchema metaSchema = JsonMetaSchema
        .builder("https://schemas.amazon.com/selling-partners/definitions/product-types/meta-schema/v1",
                JsonMetaSchema.getV201909())
        .keyword(new MaxUniqueItemsKeyword())
        .keyword(new MaxUtf8ByteLengthKeyword())
        .keyword(new MinUtf8ByteLengthKeyword()).build();
JsonSchemaFactory factory = JsonSchemaFactory.builder().defaultMetaSchemaIri(metaSchema.getIri())
        .metaSchema(metaSchema).build();

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@supoman-service
Comment options

Answer selected by supoman-service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants