authScimPatchDocumentJsonSchema top-level constant

Map<String, Object?> const authScimPatchDocumentJsonSchema

Strict JSON Schema contract for a SCIM PatchOp document.

Implementation

const Map<String, Object?> authScimPatchDocumentJsonSchema = <String, Object?>{
  'type': 'object',
  'additionalProperties': false,
  'required': <String>['schemas', 'Operations'],
  'properties': <String, Object?>{
    'schemas': <String, Object?>{
      'type': 'array',
      'minItems': 1,
      'maxItems': 1,
      'items': <String, Object?>{'const': authScimPatchOperationSchema},
    },
    'Operations': <String, Object?>{
      'type': 'array',
      'minItems': 1,
      'maxItems': 32,
      'items': <String, Object?>{
        'type': 'object',
        'additionalProperties': false,
        'required': <String>['op', 'path'],
        'properties': <String, Object?>{
          'op': <String, Object?>{
            'type': 'string',
            'enum': <String>['add', 'replace', 'remove'],
          },
          'path': <String, Object?>{
            'type': 'string',
            'enum': <String>[
              'userName',
              'externalId',
              'active',
              'displayName',
              'name',
              'emails',
            ],
          },
          'value': <String, Object?>{},
        },
      },
    },
  },
};