Don’t request $schema url during validation #1074
              
                
                  
                  
                    Answered
                  
                  by
                    justin-tay
                  
              
          
                  
                    
                      supoman-service
                    
                  
                
                  asked this question in
                Q&A
              
            -
| 
         How can I set JsonSchema to not read the $schema attribute in json?  | 
  
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            justin-tay
          
      
      
        Jun 22, 2024 
      
    
    Replies: 1 comment 1 reply
-
| 
         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(); | 
  
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
      Answer selected by
        supoman-service
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
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.