schemas:
      - resourceReference: |
           {
             "id" : "http://api.covisint.com/schema/resourceReference",
             "$schema" : "http://json-schema.org/draft-04/schema",
             "description" : "Schema representing links",
             "type" : "object",
             "properties" : {
               "id" : {
                 "type" : "string",
                 "maxLength" : 36,
                 "description" : "The unique identifier for the resource.",
                 "required": true
               },
               "type" : {
                 "type" : "string",
                 "description" : "The type of the resource."
               },
               "realm" : {
                 "type" : "string",
                 "description" : "The realm of the resource."
               }
             }
           }

      - namedResourceReference : |
           {
             "id" : "http://api.covisint.com/schema/namedScopedResource",
             "$schema" : "http://json-schema.org/draft-04/schema",
             "type" : "object",
             "description" : "Expands on the basic resource reference and adds internationalized name and description.",
             "extends" : {
                   "$ref" : "http://api.covisint.com/schema/resourceReference#"
             },
             "properties" : {
                "name" : {
                  "description": "Internationalized resource name.",
                  "$ref" : "http://api.covisint.com/idm/schema/internationalString#"
                },
                "description" : {
                  "description": "Internationalized resource description.",
                  "$ref" : "http://api.covisint.com/idm/schema/internationalString#"
                }
              }
           }

      - resource: |
           {
             "id" : "http://api.covisint.com/schema/resource",
             "$schema" : "http://json-schema.org/draft-04/schema",
             "description" : "Core schema",
             "definitions" : {
               "resource" : {
                 "id" : "resource",
                 "type" : "object",
                 "description" : "A basic resource.",
                 "properties" : {
                   "id" : {
                     "type" : "string",
                     "maxLength" : 64,
                     "description" : "The unique identifier for this resource.",
                     "required": true
                   },
                   "version": {
                     "type" : "number",
                     "minimum" : 0,
                     "maximum" : 9223372036854775807,
                     "description" : "The current version for this resource.  Exists once the resource has been saved. This is mandatory for PUT requests, but should not be supplied for POST requests.",
                     "required": false
                   },
                   "creator" : {
                     "type" : "string",
                     "maxLength" : 64,
                     "description" : "The creator of this resource. This is mandatory if x-requestor header is NOT available",
                     "required": false
                   },
                   "creatorAppId" : {
                     "type" : "string",
                     "maxLength" : 64,
                     "description" : "The application id of the creator of this resource.",
                     "required": false
                   },
                   "creation" : {
                     "type" : "number",
                     "minimum" : 0,
                     "maximum" : 9223372036854775807,
                     "description" : "If this value is provided in a POST / PUT request body, it will be ignored and system will generate value as time, in milliseconds since the epoch, when this resource was created or upda",
                     "required": false
                   }
                 }
               }
             }
           }

      - realmScopedResource : |
           {
             "id" : "http://api.covisint.com/schema/realmScopedResource",
             "$schema" : "http://json-schema.org/draft-04/schema",
             "type" : "object",
             "description" : "Expands on the base resource and adds a realm attribute.",
             "extends" : {
                   "$ref" : "http://api.covisint.com/schema/resource#"
             },
             "properties" : {
               "realm" : {
                 "type" : "string",
                 "maxLength" : 25,
                 "pattern" : "^[A-Za-z0-9]{2,25}$",
                 "description" : "The realm in which this resource is being created. This is mandatory if x-realm header is NOT available",
                 "required": false
               }
             }
           }

      - errorResponseSchema: |
           {
             "id" : "http://api.covisint.com/schema/errorResponseSchema",
             "$schema" : "http://json-schema.org/draft-04/schema",
             "type" : "object",
             "description" : "Representation of an HTTP 4xx/5xx error response.",
             "properties" : {
               "status" : {
                 "type" : "number",
                 "minimum" : 400,
                 "maximum" : 599,
                 "description" : "The HTTP status code.",
                 "required": true
               },
               "apiMessage" : {
                 "type" : "string",
                 "description" : "A helpful, human-readable description of the error, useful for basic diagnostics."
               },
               "apiStatusCode" : {
                 "type" : "string",
                 "description" : "The API-specific status code."
               }

             }
           }

      - serviceCode: |
           {
             "id" : "http://api.covisint.com/schema/serviceCodes",
             "$schema" : "http://json-schema.org/draft-04/schema",
             "type": "object",
             "description": "The site/service/location codes granted along with a service.",
             "properties": {
               "code": { "type": "string", "required": true, "maxLength": 200, "description": "The code value." },
               "codeKind": { "type": "string", "required": true, "maxLength": 36, "description": "The associated business unit." }
             }
           }

      - serviceCodes : |
           {
             "type" : "array",
             "description" : "The site/service/location codes granted along with the service, if any.",
             "items" : { "$ref" : "http://api.covisint.com/schema/serviceCode#"},
             "required": false
           }

      - address: |
           {
             "id" : "http://api.covisint.com/idm/schema/address",
             "$schema" : "http://json-schema.org/draft-04/schema",
             "type" : "object",
             "description" : "A container for the subject's address elements.",
             "properties" : {
               "type" : "string",
               "streets" : {
                   "type" : "array",
                   "description" : "An array of address streets (i.e. address line 1, 2, 3).",
                   "minItems" : 0,
                   "items" : {
                     "type": "string",
                     "maxLength" : 255
                   }
                 },
                 "city" : { "type" : "string", "maxLength" : 60, "description" : "The city name." },
                 "state" : { "type" : "string", "maxLength" : 60, "description" : "The state/province name or code." },
                 "postal" : { "type" : "string", "maxLength" : 10, "description" : "The postal or zip code." },
                 "country" : { "type" : "string", "minLength" : 2, "maxLength" : 3, "description" : "The ISO country code. http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2"}
             }
           }

      - phone : |
           {
             "id" : "http://api.covisint.com/idm/schema/phone",
             "$schema" : "http://json-schema.org/draft-04/schema",
             "type" : "object",
               "description" : "A container for phone number details.",
               "properties" : {
                 "number" : { "type" : "string","maxLength" : 100, "description" : "The phone number." },
                 "type" : { "enum" : [ "main", "mobile", "fax" ], "description" : "The phone number type." }
               },
               "required" : [ "type" ]
           }

      - internationalString : |
           {
             "id": "http://api.covisint.com/idm/schema/internationalString",
             "$schema": "http://json-schema.org/draft-04/schema",
             "type": "array",
             "description" : "An internationalized string value, supporting one or more language translations.",
             "minItems": 1,
             "items": {
               "type": "object",
               "properties": {
                 "lang": { "type": "string", "maxLength": 10, "description": "The language or locale in which the text is written." },
                 "text": { "type": "string", "maxLength": 2000, "description": "The internationalized text value." }
               }
             }
           }