Package com.bazaarvoice.commons.data.model.json.schema

Examples of com.bazaarvoice.commons.data.model.json.schema.JSONSchemaProperty


                }

                continue;
            }

            JSONSchemaProperty property = getPropertyForKey(key);
            JSONSchema valueSchema;
            if (property != null) {
                valueSchema = property.getValueSchema();
                seenProperties.add(property);
            } else {
                valueSchema = _additionalPropertiesSchema;
            }

            if (valueSchema != null) {
                valueSchema.validate(value, path + "." + key, results);
            } else {
                results.addResult(new ValidationResult().type(ResultType.CONSTRAINT_VIOLATION).path(path + "." + key).message("Additional properties not supported: " + entry));
            }
        }

        for (final JSONSchemaProperty property : getAllProperties()) {
            if (!seenProperties.contains(property) && property.getValueSchema().isRequired()) {
                String propertyDescription;
                if (property instanceof JSONSchemaNamedProperty) {
                    propertyDescription = ((JSONSchemaNamedProperty) property).getName();
                } else if (property instanceof JSONSchemaPatternProperty) {
                    propertyDescription = ((JSONSchemaPatternProperty) property).getPattern();
View Full Code Here

TOP

Related Classes of com.bazaarvoice.commons.data.model.json.schema.JSONSchemaProperty

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.