Lines Matching refs:schema
62 "Unknown schema reference: *.";
140 JSONSchemaValidator::JSONSchemaValidator(DictionaryValue* schema)
141 : schema_root_(schema), default_allow_additional_properties_(false) {
144 JSONSchemaValidator::JSONSchemaValidator(DictionaryValue* schema,
146 : schema_root_(schema), default_allow_additional_properties_(false) {
171 DictionaryValue* schema,
173 // If this schema defines itself as reference type, save it in this.types.
175 if (schema->GetString("id", &id)) {
178 types_[id] = schema;
180 CHECK(iter->second == schema);
183 // If the schema has a $ref property, the instance must validate against
184 // that schema. It must be present in types_ to be referenced.
186 if (schema->GetString("$ref", &ref)) {
197 // If the schema has a choices property, the instance must validate against at
200 if (schema->GetList("choices", &choices)) {
205 // If the schema has an enum property, the instance must be one of those
208 if (schema->GetList("enum", &enumeration)) {
214 schema->GetString("type", &type);
222 ValidateObject(static_cast<DictionaryValue*>(instance), schema, path);
224 ValidateArray(static_cast<ListValue*>(instance), schema, path);
226 ValidateString(static_cast<StringValue*>(instance), schema, path);
228 ValidateNumber(instance, schema, path);
289 DictionaryValue* schema,
292 schema->GetDictionary("properties", &properties);
316 if (SchemaAllowsAnyAdditionalItems(schema, &additional_properties_schema))
337 DictionaryValue* schema,
341 if (schema->GetDictionary("items", &single_type)) {
343 if (schema->GetInteger("minItems", &min_items)) {
352 if (schema->GetInteger("maxItems", &max_items)) {
360 // If the items property is a single schema, each item in the array must
361 // validate against that schema.
374 // particular schema.
375 ValidateTuple(instance, schema, path);
379 DictionaryValue* schema,
382 schema->GetList("items", &tuple_type);
406 if (SchemaAllowsAnyAdditionalItems(schema, &additional_properties_schema))
412 // schema.
427 DictionaryValue* schema,
433 if (schema->GetInteger("minLength", &min_length)) {
442 if (schema->GetInteger("maxLength", &max_length)) {
450 CHECK(!schema->HasKey("pattern")) << "Pattern is not supported.";
454 DictionaryValue* schema,
462 if (GetNumberFromDictionary(schema, "minimum", &minimum)) {
469 if (GetNumberFromDictionary(schema, "maximum", &maximum)) {
491 DictionaryValue* schema, DictionaryValue** additional_properties_schema) {
492 schema
494 schema->GetDictionary("additionalProperties", additional_properties_schema);