- findFirstSchemaByLocalName(child.localName, (schema as DataNodeContainer).childNodes),currentAugment)
+ findFirstSchemaByLocalName(child.localName, (schema as DataNodeContainer).childNodes),
+ currentAugment)
+ }
+ if(schema instanceof ListSchemaNode) {
+ val listKeys = (schema as ListSchemaNode).keyDefinition
+ for (listKey : listKeys) {
+ var foundKey = false
+ for (child : children) {
+ if (child.unwrap.nodeType.localName == listKey.localName) {
+ foundKey = true;
+ }
+ }
+ if (!foundKey) {
+ throw new ResponseException(BAD_REQUEST,
+ "Missing key \"" + listKey.localName + "\" of list \"" + schema.QName.localName + "\"")
+ }
+ }