{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://evidencepress.org/api/schema.json",
  "title": "Evidence Press papers index",
  "type": "object",
  "required": [
    "schemaVersion",
    "count",
    "papers"
  ],
  "additionalProperties": false,
  "properties": {
    "schemaVersion": {
      "type": "string",
      "pattern": "^\\d+\\.\\d+$"
    },
    "site": {
      "type": "string"
    },
    "baseUrl": {
      "type": "string",
      "format": "uri"
    },
    "description": {
      "type": "string"
    },
    "schema": {
      "type": "string",
      "format": "uri"
    },
    "stability": {
      "type": "string",
      "format": "uri"
    },
    "count": {
      "type": "integer",
      "minimum": 0
    },
    "papers": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/paper"
      }
    }
  },
  "$defs": {
    "assuranceRecord": {
      "type": "object",
      "required": [
        "dimension",
        "state"
      ],
      "additionalProperties": false,
      "description": "One assurance dimension for one release. Dimensions are independent: none ranks above another, and an unassessed dimension is not a negative finding.",
      "properties": {
        "dimension": {
          "enum": [
            "availability",
            "internalReplay",
            "independentRerun",
            "independentReimplementation",
            "formalVerification",
            "specialistReview",
            "editorialPeerReview",
            "dataEnvironmentReproducibility"
          ]
        },
        "label": {
          "type": "string"
        },
        "question": {
          "type": "string"
        },
        "state": {
          "enum": [
            "passed",
            "partial",
            "failed",
            "not-assessed",
            "not-applicable"
          ]
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "actor": {
          "type": "string"
        },
        "evidenceUrl": {
          "type": "string",
          "format": "uri"
        },
        "note": {
          "type": "string"
        }
      }
    },
    "paper": {
      "type": "object",
      "required": [
        "slug",
        "title",
        "url",
        "doi",
        "datePublished",
        "version",
        "authors",
        "license",
        "status",
        "verification",
        "assurance",
        "keywords"
      ],
      "properties": {
        "schemaVersion": {
          "type": "string"
        },
        "slug": {
          "type": "string",
          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
        },
        "title": {
          "type": "string",
          "minLength": 1
        },
        "shortTitle": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "oneLine": {
          "type": "string"
        },
        "abstract": {
          "type": "string"
        },
        "datePublished": {
          "type": "string",
          "format": "date",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        },
        "dateModified": {
          "type": "string",
          "format": "date",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        },
        "version": {
          "type": "string",
          "minLength": 1
        },
        "doi": {
          "type": "string",
          "pattern": "^10\\.\\d{4,9}/\\S+$"
        },
        "doiUrl": {
          "type": "string",
          "format": "uri"
        },
        "assurance": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/assuranceRecord"
          },
          "minItems": 1
        },
        "conceptDoi": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^10\\.\\d{4,9}/\\S+$"
        },
        "pdfUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri",
          "description": "Direct link to the manuscript PDF"
        },
        "altPdfUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "zenodoUrl": {
          "type": "string",
          "format": "uri"
        },
        "repoUrl": {
          "type": "string",
          "format": "uri"
        },
        "releaseUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "markdownUrl": {
          "type": "string",
          "format": "uri"
        },
        "bibtexUrl": {
          "type": "string",
          "format": "uri"
        },
        "audioUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri",
          "description": "Narrated plain-language briefing (MP3)"
        },
        "imageUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "coverArtUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "media": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "url"
            ],
            "additionalProperties": false,
            "properties": {
              "type": {
                "enum": [
                  "audio",
                  "video"
                ]
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "name": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "embedUrl": {
                "type": "string",
                "format": "uri"
              },
              "durationLabel": {
                "type": "string"
              },
              "transcriptUrl": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        },
        "authors": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "minItems": 1
        },
        "license": {
          "const": "CC0-1.0"
        },
        "status": {
          "enum": [
            "unrefereed-candidate",
            "unrefereed-preprint"
          ]
        },
        "verification": {
          "type": "object",
          "required": [
            "peerReviewed",
            "independentlyReproduced",
            "formallyVerified",
            "internallyReplayed"
          ],
          "properties": {
            "peerReviewed": {
              "type": "boolean"
            },
            "independentlyReproduced": {
              "type": "boolean"
            },
            "formallyVerified": {
              "type": "boolean"
            },
            "internallyReplayed": {
              "type": "boolean"
            },
            "detail": {
              "type": "string"
            }
          }
        },
        "provenance": {
          "type": "object",
          "properties": {
            "aiGenerated": {
              "type": "boolean"
            },
            "aiAssisted": {
              "type": "boolean"
            },
            "generatedBy": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "humanRole": {
              "type": "string"
            },
            "disclosure": {
              "type": "string"
            }
          }
        },
        "problem": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "name": {
              "type": "string"
            },
            "url": {
              "type": "string"
            }
          }
        },
        "keywords": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "minItems": 1
        },
        "corrections": {
          "type": "array",
          "description": "Dated corrections to this release. Additive: a correction records what was wrong as well as what the release now says.",
          "items": {
            "type": "object",
            "required": [
              "date",
              "scope",
              "summary"
            ],
            "additionalProperties": false,
            "properties": {
              "date": {
                "type": "string",
                "format": "date",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "scope": {
                "enum": [
                  "presentation",
                  "metadata",
                  "claim",
                  "evidence"
                ]
              },
              "summary": {
                "type": "string",
                "minLength": 1
              },
              "detail": {
                "type": "string"
              },
              "fixedIn": {
                "type": "string"
              }
            }
          }
        },
        "keyResults": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "evidencePackage": {
          "type": "string"
        },
        "openProblems": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Concrete follow-up research problems, well-posed enough to start on"
        },
        "relatedWorks": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "citation": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            }
          }
        },
        "reviews": {
          "type": "array",
          "description": "Published reviews and assessments; draft or private records are excluded from public output.",
          "items": {
            "type": "object",
            "required": [
              "schemaVersion",
              "reviewId",
              "reviewClass",
              "status",
              "subject",
              "assessment",
              "assuranceImpact"
            ],
            "properties": {
              "schemaVersion": {
                "type": "string"
              },
              "reviewId": {
                "type": "string"
              },
              "reviewClass": {
                "enum": [
                  "editorial-assessment",
                  "external-review",
                  "independent-reproduction",
                  "formal-verification-report",
                  "research-assessment",
                  "correction-or-refutation"
                ]
              },
              "status": {
                "enum": [
                  "published",
                  "superseded",
                  "withdrawn",
                  "disputed"
                ]
              },
              "subject": {
                "type": "object",
                "required": [
                  "canonicalUrl",
                  "version",
                  "title"
                ],
                "properties": {
                  "canonicalUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "doi": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "version": {
                    "type": "string"
                  },
                  "releaseTag": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "title": {
                    "type": "string"
                  }
                }
              },
              "reviewer": {
                "type": "object"
              },
              "assessment": {
                "type": "object"
              },
              "scope": {
                "type": "object"
              },
              "evidenceAssessment": {
                "type": "object"
              },
              "findings": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "requiredRevisions": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "limitationsAndNonClaims": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "refCalibration": {
                "type": "object"
              },
              "editorialHandling": {
                "type": "object"
              },
              "provenance": {
                "type": "object"
              },
              "assuranceImpact": {
                "type": "object",
                "required": [
                  "changesVerificationStatus",
                  "changesPeerReviewedFlag",
                  "changesIndependentReproductionFlag",
                  "changesFormalVerificationFlag"
                ],
                "properties": {
                  "changesVerificationStatus": {
                    "type": "boolean"
                  },
                  "changesPeerReviewedFlag": {
                    "type": "boolean"
                  },
                  "changesIndependentReproductionFlag": {
                    "type": "boolean"
                  },
                  "changesFormalVerificationFlag": {
                    "type": "boolean"
                  },
                  "explanation": {
                    "type": "string"
                  }
                }
              },
              "publication": {
                "type": "object"
              }
            }
          }
        }
      }
    }
  }
}