changedOutput schema / (root)
Previous value: -nullNew value: +{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "additionalProperties": false,
+ "allOf": [
+ {
+ "else": {
+ "allOf": [
+ {
+ "if": {
+ "properties": {
+ "operation": {
+ "const": "list"
+ }
+ }
+ },
+ "then": {
+ "required": [
+ "documents",
+ "complete"
+ ]
+ }
+ },
+ {
+ "if": {
+ "properties": {
+ "operation": {
+ "const": "search"
+ }
+ }
+ },
+ "then": {
+ "required": [
+ "results",
+ "result_count",
+ "complete"
+ ]
+ }
+ },
+ {
+ "if": {
+ "properties": {
+ "operation": {
+ "const": "get"
+ }
+ }
+ },
+ "then": {
+ "required": [
+ "document",
+ "content",
+ "sections",
+ "full_document",
+ "section_complete",
+ "eligibility_verified_at",
+ "source_caveats"
+ ]
+ }
+ },
+ {
+ "if": {
+ "properties": {
+ "operation": {
+ "const": "section"
+ }
+ }
+ },
+ "then": {
+ "required": [
+ "document",
+ "content",
+ "sections",
+ "full_document",
+ "section_complete",
+ "eligibility_verified_at",
+ "source_caveats",
+ "section_id",
+ "continuation_sections",
+ "part_complete",
+ "part_index",
+ "next_section"
+ ]
+ }
+ }
+ ],
+ "properties": {
+ "code": false,
+ "operation": {
+ "enum": [
+ "list",
+ "search",
+ "get",
+ "section"
+ ]
+ },
+ "status": false
+ }
+ },
+ "if": {
+ "properties": {
+ "outcome": {
+ "enum": [
+ "RESEARCH_INVALID_INPUT",
+ "RESEARCH_BRIEF_NOT_FOUND",
+ "RESEARCH_SECTION_NOT_FOUND",
+ "RESEARCH_SECTION_VERSION_CHANGED",
+ "RESEARCH_TEMPORARILY_UNAVAILABLE"
+ ]
+ }
+ }
+ },
+ "then": {
+ "properties": {
+ "content": false,
+ "document": false,
+ "documents": false,
+ "results": false
+ },
+ "required": [
+ "status",
+ "code",
+ "message"
+ ]
+ }
+ },
+ {
+ "if": {
+ "properties": {
+ "outcome": {
+ "const": "RESEARCH_INVALID_INPUT"
+ }
+ }
+ },
+ "then": {
+ "properties": {
+ "code": {
+ "const": "RESEARCH_INVALID_INPUT"
+ }
+ }
+ }
+ },
+ {
+ "if": {
+ "properties": {
+ "outcome": {
+ "const": "RESEARCH_BRIEF_NOT_FOUND"
+ }
+ }
+ },
+ "then": {
+ "properties": {
+ "code": {
+ "const": "RESEARCH_BRIEF_NOT_FOUND"
+ }
+ }
+ }
+ },
+ {
+ "if": {
+ "properties": {
+ "outcome": {
+ "const": "RESEARCH_SECTION_NOT_FOUND"
+ }
+ }
+ },
+ "then": {
+ "properties": {
+ "code": {
+ "const": "RESEARCH_SECTION_NOT_FOUND"
+ }
+ }
+ }
+ },
+ {
+ "if": {
+ "properties": {
+ "outcome": {
+ "const": "RESEARCH_SECTION_VERSION_CHANGED"
+ }
+ }
+ },
+ "then": {
+ "properties": {
+ "code": {
+ "const": "RESEARCH_SECTION_VERSION_CHANGED"
+ }
+ }
+ }
+ },
+ {
+ "if": {
+ "properties": {
+ "outcome": {
+ "const": "RESEARCH_TEMPORARILY_UNAVAILABLE"
+ }
+ }
+ },
+ "then": {
+ "properties": {
+ "code": {
+ "const": "RESEARCH_TEMPORARILY_UNAVAILABLE"
+ }
+ }
+ }
+ }
+ ],
+ "properties": {
+ "available_slugs": {
+ "items": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version/anyOf/0"
+ },
+ "type": "array"
+ },
+ "caveats": {
+ "items": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version/anyOf/0"
+ },
+ "type": "array"
+ },
+ "code": {
+ "enum": [
+ "RESEARCH_INVALID_INPUT",
+ "RESEARCH_BRIEF_NOT_FOUND",
+ "RESEARCH_SECTION_NOT_FOUND",
+ "RESEARCH_SECTION_VERSION_CHANGED",
+ "RESEARCH_TEMPORARILY_UNAVAILABLE"
+ ],
+ "type": "string"
+ },
+ "complete": {
+ "type": "boolean"
+ },
+ "content": {
+ "description": "Requested Markdown, including source qualifications. May be an explicitly labeled overview or section-part directory.",
+ "minLength": 1,
+ "type": "string"
+ },
+ "continuation_sections": {
+ "items": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version/anyOf/0"
+ },
+ "type": "array"
+ },
+ "document": {
+ "$ref": "#/properties/documents/items"
+ },
+ "documents": {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "canonical_url": {
+ "anyOf": [
+ {
+ "format": "uri",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "cms_modified_at": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version"
+ },
+ "content_version": {
+ "minLength": 1,
+ "pattern": "^[a-f0-9]{64}$",
+ "type": "string"
+ },
+ "data_coverage": {
+ "anyOf": [
+ {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version/anyOf/0"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Source-supported observation period, not the publication or retrieval date."
+ },
+ "description": {
+ "type": "string"
+ },
+ "id": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version/anyOf/0"
+ },
+ "last_substantive_update": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version"
+ },
+ "legacy_as_of": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version"
+ },
+ "publication_date": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version"
+ },
+ "publisher_version": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version"
+ },
+ "slug": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version/anyOf/0"
+ },
+ "source": {
+ "enum": [
+ "website",
+ "wordpress",
+ "legacy"
+ ],
+ "type": "string"
+ },
+ "title": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version/anyOf/0"
+ },
+ "type": {
+ "enum": [
+ "research",
+ "index",
+ "blog"
+ ],
+ "type": "string"
+ },
+ "update_basis": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version"
+ },
+ "webpage_modified_at": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version"
+ },
+ "webpage_published_at": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version"
+ }
+ },
+ "required": [
+ "id",
+ "slug",
+ "title",
+ "description",
+ "type",
+ "canonical_url",
+ "publication_date",
+ "last_substantive_update",
+ "update_basis",
+ "data_coverage",
+ "publisher_version",
+ "cms_modified_at",
+ "webpage_published_at",
+ "webpage_modified_at",
+ "legacy_as_of",
+ "content_version",
+ "source"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "eligibility_verified_at": {
+ "$ref": "#/properties/retrieved_at"
+ },
+ "full_document": {
+ "type": "boolean"
+ },
+ "message": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version/anyOf/0"
+ },
+ "next_section": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version"
+ },
+ "operation": {
+ "enum": [
+ "list",
+ "search",
+ "get",
+ "section",
+ "invalid"
+ ],
+ "type": "string"
+ },
+ "outcome": {
+ "enum": [
+ "OK",
+ "PARTIAL_RESULTS",
+ "NO_RESULTS",
+ "RESEARCH_INVALID_INPUT",
+ "RESEARCH_BRIEF_NOT_FOUND",
+ "RESEARCH_SECTION_NOT_FOUND",
+ "RESEARCH_SECTION_VERSION_CHANGED",
+ "RESEARCH_TEMPORARILY_UNAVAILABLE"
+ ],
+ "type": "string"
+ },
+ "part_complete": {
+ "type": "boolean"
+ },
+ "part_index": {
+ "anyOf": [
+ {
+ "exclusiveMinimum": 0,
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "reason": {
+ "enum": [
+ "SOURCE_UNAVAILABLE",
+ "SOURCE_LIMIT",
+ "SOURCE_INVALID",
+ "SOURCE_BUSY"
+ ],
+ "type": "string"
+ },
+ "result_count": {
+ "maximum": 20,
+ "minimum": 0,
+ "type": "integer"
+ },
+ "results": {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "canonical_url": {
+ "$ref": "#/properties/documents/items/properties/canonical_url"
+ },
+ "cms_modified_at": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version"
+ },
+ "content_version": {
+ "$ref": "#/properties/documents/items/properties/content_version"
+ },
+ "data_coverage": {
+ "$ref": "#/properties/documents/items/properties/data_coverage"
+ },
+ "description": {
+ "$ref": "#/properties/documents/items/properties/description"
+ },
+ "excerpt": {
+ "type": "string"
+ },
+ "id": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version/anyOf/0"
+ },
+ "last_substantive_update": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version"
+ },
+ "legacy_as_of": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version"
+ },
+ "publication_date": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version"
+ },
+ "publisher_version": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version"
+ },
+ "section_ids": {
+ "items": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version/anyOf/0"
+ },
+ "type": "array"
+ },
+ "slug": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version/anyOf/0"
+ },
+ "source": {
+ "$ref": "#/properties/documents/items/properties/source"
+ },
+ "title": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version/anyOf/0"
+ },
+ "type": {
+ "$ref": "#/properties/documents/items/properties/type"
+ },
+ "update_basis": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version"
+ },
+ "webpage_modified_at": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version"
+ },
+ "webpage_published_at": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version"
+ }
+ },
+ "required": [
+ "id",
+ "slug",
+ "title",
+ "description",
+ "type",
+ "canonical_url",
+ "publication_date",
+ "last_substantive_update",
+ "update_basis",
+ "data_coverage",
+ "publisher_version",
+ "cms_modified_at",
+ "webpage_published_at",
+ "webpage_modified_at",
+ "legacy_as_of",
+ "content_version",
+ "source",
+ "excerpt",
+ "section_ids"
+ ],
+ "type": "object"
+ },
+ "maxItems": 20,
+ "type": "array"
+ },
+ "retrieved_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "retryable": {
+ "type": "boolean"
+ },
+ "schema_version": {
+ "const": "1.0",
+ "type": "string"
+ },
+ "section_complete": {
+ "type": "boolean"
+ },
+ "section_id": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version/anyOf/0"
+ },
+ "sections": {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "canonical_url": {
+ "anyOf": [
+ {
+ "format": "uri",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "id": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version/anyOf/0"
+ },
+ "title": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version/anyOf/0"
+ }
+ },
+ "required": [
+ "id",
+ "title",
+ "canonical_url"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "source_caveats": {
+ "description": "Publisher qualifications when present; null does not assert that the source has no limitations.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "status": {
+ "const": "error",
+ "type": "string"
+ },
+ "suggestions": {
+ "items": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version/anyOf/0"
+ },
+ "type": "array"
+ },
+ "synchronization": {
+ "additionalProperties": false,
+ "properties": {
+ "publication_hook": {
+ "const": "local-filesystem",
+ "type": "string"
+ },
+ "refresh_interval_seconds": {
+ "const": 240,
+ "type": "number"
+ },
+ "sources": {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "content_version": {
+ "anyOf": [
+ {
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "document_count": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "error_code": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version"
+ },
+ "last_attempt_at": {
+ "anyOf": [
+ {
+ "$ref": "#/properties/retrieved_at"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "last_successful_refresh": {
+ "anyOf": [
+ {
+ "$ref": "#/properties/retrieved_at"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "last_verified_at": {
+ "anyOf": [
+ {
+ "$ref": "#/properties/retrieved_at"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "next_refresh_due": {
+ "anyOf": [
+ {
+ "$ref": "#/properties/retrieved_at"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "source": {
+ "enum": [
+ "website",
+ "wordpress",
+ "legacy"
+ ],
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "cold",
+ "refreshing",
+ "ready",
+ "unavailable"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "source",
+ "status",
+ "last_attempt_at",
+ "last_successful_refresh",
+ "last_verified_at",
+ "next_refresh_due",
+ "document_count",
+ "content_version",
+ "error_code"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "wordpress_publication_hook": {
+ "const": "not_connected",
+ "type": "string"
+ }
+ },
+ "required": [
+ "sources",
+ "refresh_interval_seconds",
+ "publication_hook",
+ "wordpress_publication_hook"
+ ],
+ "type": "object"
+ },
+ "topic": {
+ "$ref": "#/properties/synchronization/properties/sources/items/properties/content_version/anyOf/0"
+ }
+ },
+ "required": [
+ "schema_version",
+ "operation",
+ "outcome",
+ "retrieved_at",
+ "synchronization",
+ "caveats",
+ "retryable"
+ ],
+ "type": "object"
+}