schemas/popolo+mysociety/membership.json
{
"$schema": "http://json-schema.org/draft-03/schema#",
"id": "http://popoloproject.com/schemas/membership.json#",
"title": "Membership",
"description": "A relationship between a person and an organization",
"type": "object",
"properties": {
"id": {
"description": "The membership's unique identifier",
"type": ["string", "object", "null"]
},
"label": {
"description": "A label describing the membership",
"type": ["string", "object", "null"]
},
"role": {
"description": "The role that the holder of the post fulfills",
"type": ["string", "object", "null"]
},
"member": {
"description": "A reference to the person or organization that is a party to the relationship",
"type": "object",
"properties": {
"@type": {
"type": "string",
"required": true
},
"id": {
"type": "string",
"required": true
}
}
},
"person_id": {
"description": "The ID of the person who is a party to the relationship",
"type": ["string", "object", "null"]
},
"person": {
"description": "The person who is a party to the relationship",
"$ref": "http://popoloproject.com/schemas/person.json#"
},
"organization_id": {
"description": "The ID of the organization that is a party to the relationship",
"type": ["string", "object", "null"]
},
"organization": {
"description": "The organization that is a party to the relationship",
"$ref": "http://popoloproject.com/schemas/organization.json#"
},
"post_id": {
"description": "The ID of the post held by the person in the organization through this membership",
"type": ["string", "object", "null"]
},
"post": {
"description": "The post held by the person in the organization through this membership",
"$ref": "http://popoloproject.com/schemas/post.json#"
},
"area": {
"description": "The optional area with which this membership is associated",
"type": "object",
"properties": {
"name": {
"description": "Name of the area",
"type": ["string", "object", "null"]
},
"id": {
"description": "An identifier for the area, e.g. a URI",
"type": ["string", "object"],
"required": true
}
}
},
"start_date": {
"description": "The date on which the relationship began",
"type": ["string", "object", "null"],
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
},
"end_date": {
"description": "The date on which the relationship ended",
"type": ["string", "object", "null"],
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
},
"start_reason": {
"description": "The reason why this relationship began",
"type": ["string", "object", "null"]
},
"end_reason": {
"description": "The reason why this relationship ended",
"type": ["string", "object", "null"]
},
"contact_details": {
"description": "Means of contacting the person who is a party to the relationship",
"type": "array",
"items": {
"$ref": "http://popoloproject.com/schemas/contact_detail.json#"
}
},
"links": {
"description": "URLs to documents about the membership",
"type": "array",
"items": {
"$ref": "http://popoloproject.com/schemas/link.json#"
}
}
}
}