{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://publications.barandiaran.net/publications.schema.json",
 "title": "publications.json of publications.barandiaran.net",
 "description": "Absent values are empty strings or empty lists. Each item is also served alone at p/{slug}/index.json.",
 "type": "object",
 "required": [
  "schema_version",
  "count",
  "items"
 ],
 "properties": {
  "schema_version": {
   "type": "string"
  },
  "title": {
   "type": "string"
  },
  "homepage": {
   "type": "string"
  },
  "generated": {
   "type": "string"
  },
  "license": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Licences of this metadata."
  },
  "schema": {
   "type": "string"
  },
  "count": {
   "type": "integer"
  },
  "subjects": {
   "type": "array",
   "description": "The topic taxonomy: id, label, url of the filtered list."
  },
  "items": {
   "type": "array",
   "items": {
    "$ref": "#/$defs/item"
   }
  }
 },
 "$defs": {
  "item": {
   "type": "object",
   "required": [
    "slug",
    "id",
    "type",
    "title",
    "year",
    "links"
   ],
   "properties": {
    "slug": {
     "type": "string",
     "description": "Stable identifier, '{year}-{first title words}'. Never changes once published."
    },
    "id": {
     "type": "string",
     "format": "uri",
     "description": "Landing page; also the @id of the work in JSON-LD."
    },
    "citekey": {
     "type": "string",
     "description": "BibTeX key used in all.bib and citations/{slug}.bib."
    },
    "type": {
     "enum": [
      "journalArticle",
      "book",
      "bookSection",
      "conferencePaper",
      "report",
      "thesis",
      "preprint",
      "document"
     ],
     "description": "Zotero item type."
    },
    "type_label": {
     "type": "string"
    },
    "title": {
     "type": "string"
    },
    "authors": {
     "type": "array",
     "items": {
      "type": "object",
      "description": "A person: family and given name, or a single literal name.",
      "properties": {
       "family": {
        "type": "string"
       },
       "given": {
        "type": "string"
       },
       "literal": {
        "type": "string"
       }
      }
     }
    },
    "author_string": {
     "type": "string"
    },
    "editors": {
     "type": "array",
     "items": {
      "type": "object",
      "description": "A person: family and given name, or a single literal name.",
      "properties": {
       "family": {
        "type": "string"
       },
       "given": {
        "type": "string"
       },
       "literal": {
        "type": "string"
       }
      }
     }
    },
    "year": {
     "type": "string",
     "description": "Four digits, as a string."
    },
    "date": {
     "type": "string",
     "description": "Publication date: YYYY, YYYY-MM or YYYY-MM-DD."
    },
    "date_added": {
     "type": "string",
     "description": "Date the record entered the list (YYYY-MM-DD)."
    },
    "date_modified": {
     "type": "string",
     "description": "Date the record's metadata last changed (YYYY-MM-DD)."
    },
    "venue": {
     "type": "string",
     "description": "Journal, book or proceedings title."
    },
    "series": {
     "type": "string"
    },
    "volume": {
     "type": "string"
    },
    "issue": {
     "type": "string"
    },
    "pages": {
     "type": "string"
    },
    "publisher": {
     "type": "string"
    },
    "place": {
     "type": "string"
    },
    "note": {
     "type": "string"
    },
    "isbn": {
     "type": "string"
    },
    "issn": {
     "type": "string"
    },
    "doi": {
     "type": "string",
     "description": "Bare DOI, without resolver prefix; '' when none."
    },
    "url": {
     "type": "string",
     "description": "Publisher or repository address."
    },
    "language": {
     "type": "string",
     "description": "ISO 639-1 code of the publication's language."
    },
    "abstract": {
     "type": "string"
    },
    "abstract_source": {
     "enum": [
      "authors",
      "site",
      ""
     ],
     "description": "'authors': the publication's own abstract. 'site': the publication has none; `abstract` then holds a short summary written for this site with AI assistance, not to be cited as the authors' abstract."
    },
    "keywords": {
     "type": "array",
     "items": {
      "type": "string"
     },
     "description": "The authors' own keywords."
    },
    "subjects": {
     "type": "array",
     "description": "Topics of the site's own ten-topic taxonomy.",
     "items": {
      "type": "object",
      "properties": {
       "id": {
        "type": "string"
       },
       "label": {
        "type": "string"
       },
       "url": {
        "type": "string"
       }
      }
     }
    },
    "topics": {
     "type": "array",
     "items": {
      "type": "string"
     },
     "description": "Deprecated: labels of `subjects`, only for records without author keywords."
    },
    "keywords_note": {
     "type": "string"
    },
    "rights": {
     "type": "string",
     "description": "Rights statement of the publication, as recorded; '' when not recorded."
    },
    "license": {
     "type": "string",
     "description": "URL of the open licence of the publication itself, when known. The site's metadata is CC BY-SA 4.0 / GNU FDL 1.3 regardless."
    },
    "license_label": {
     "type": "string"
    },
    "part_of": {
     "type": "string",
     "description": "Slug of the book on this site that contains this chapter."
    },
    "has_parts": {
     "type": "array",
     "items": {
      "type": "string"
     },
     "description": "Slugs of this book's chapters on this site."
    },
    "featured": {
     "type": "boolean"
    },
    "has_summary": {
     "type": "boolean"
    },
    "has_figures": {
     "type": "boolean"
    },
    "talks": {
     "type": "array"
    },
    "materials": {
     "type": "array"
    },
    "reviews": {
     "type": "array"
    },
    "presentation": {
     "type": [
      "object",
      "null"
     ]
    },
    "citation_apa": {
     "type": "string"
    },
    "links": {
     "type": "object",
     "description": "Absolute URLs. Keys: landing, markdown, json, pdf, postprint, html (web full text), fulltext_markdown (the same full text as Markdown), txt (script for text-to-speech, references omitted), audio, podcast, bibtex, ris, publisher.",
     "additionalProperties": {
      "type": "string",
      "format": "uri"
     }
    },
    "summary_html": {
     "type": "string",
     "description": "Only in p/{slug}/index.json: extended summary as HTML."
    },
    "presentation_html": {
     "type": "string",
     "description": "Only in p/{slug}/index.json."
    }
   }
  }
 }
}
