{
  "openapi": "3.1.0",
  "info": {
    "title": "Night Ash Research",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://nightash.org"
    }
  ],
  "paths": {
    "/api/records/v1/latest.json": {
      "get": {
        "operationId": "getResearchRecords",
        "summary": "Accepted research records and independent publication dates",
        "responses": {
          "200": {
            "description": "Four-language research collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "api_version",
                    "release_id",
                    "built_at",
                    "streams",
                    "records"
                  ],
                  "properties": {
                    "api_version": {
                      "const": "1.0"
                    },
                    "release_id": {
                      "type": "string"
                    },
                    "built_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "streams": {
                      "type": "object"
                    },
                    "records": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "stream",
                          "event_at",
                          "published_at",
                          "title",
                          "summary",
                          "paragraphs"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/records/v1/records/{id}.json": {
      "get": {
        "operationId": "getResearchRecord",
        "summary": "One complete dated record in four languages",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Record and release identity",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "api_version",
                    "release_id",
                    "record"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No published record with this ID"
          }
        }
      }
    },
    "/api/records/v1/knowledge.json": {
      "get": {
        "operationId": "getResearchKnowledge",
        "summary": "Four-language research guides and glossary",
        "responses": {
          "200": {
            "description": "Four-language research guides and glossary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "api_version",
                    "release_id",
                    "pages"
                  ],
                  "properties": {
                    "api_version": {
                      "const": "1.0"
                    },
                    "release_id": {
                      "type": "string"
                    },
                    "pages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "route",
                          "title",
                          "summary",
                          "body"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/records/v1/quant.json": {
      "get": {
        "operationId": "getMarketComparison",
        "summary": "Common-date market comparison from the published Economy record; null when unavailable",
        "responses": {
          "200": {
            "description": "Common-date market comparison from the published Economy record; null when unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "api_version",
                    "release_id",
                    "model"
                  ],
                  "properties": {
                    "api_version": {
                      "const": "1.0"
                    },
                    "release_id": {
                      "type": "string"
                    },
                    "model": {
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
