OPF
DocsReferenceView source

Validation results

Errors, warnings and suggested fixes.

A finding is one thing a checker found at one place in a presentation, and a report lists them. validate in @openpresentation/opf, the Markdown and YAML converters, the editor's Review panel and hosted reviewers such as pptx.dev's AI review all produce this shape, so a host shows and applies findings from any of them the same way. This page summarizes spec/schemas/finding.schema.json; the schema remains the source of truth. How core produces findings is in validate.

Report Contract

  • Schema id: https://openpresentation.org/schema/opf-finding/v1
  • Required top-level fields: valid, findings, counts
  • Additional top-level fields: allowed (validate adds schemaValid, checks, template and unfilledVariables)

Top-Level Fields

FieldRequiredTypeNotes
validyesbooleanTrue when no finding has severity error.
findingsyesarray<ref:Finding>Every finding, in report order.
countsyesobjectHow many findings each severity has.

Object And Type Reference

FindingSeverity

  • Type: enum:error | warning | info
  • Required fields: none
  • Purpose: error makes a report invalid. warning is a problem the author should fix. info is advisory.

No named properties.

FindingCategory

  • Type: anyOf:enum:format | references | policy | accessibility | layout | content / string
  • Required fields: none
  • Purpose: What kind of question the finding answers. Core uses format (is it well-formed OPF), references (does everything it points at resolve), policy (host house rules), accessibility, layout (will it present as authored) and content (is anything left unfinished). Other producers may use their own category names, such as narrative or audience-fit.

No named properties.

FindingLocation

  • Type: object
  • Required fields: offset, length, line, column
  • Purpose: A range in the checked text: UTF-16 offset and length from the start, and the one-based line and column of the start. Present when the finding was produced from text (JSON, Markdown or YAML).
FieldRequiredTypeNotes
offsetyesinteger
lengthyesinteger
lineyesinteger
columnyesinteger

JsonPatchOperation

  • Type: oneOf:object / object / object
  • Required fields: none
  • Purpose: One RFC 6902 JSON Patch operation. Paths are JSON Pointers into the checked presentation.

No named properties.

FindingFocus

  • Type: object
  • Required fields: path, field
  • Purpose: The field an author has to fill in, for a fix that cannot be written as a patch.
FieldRequiredTypeNotes
pathyesstringJSON Pointer of the field to edit.
fieldyesstringWhat the field is, such as alt, title, text, link, language or fontSize.
valuenostring | number | boolean | null | array | objectThe field's current value, when it has one.

FindingFix

  • Type: object
  • Required fields: title
  • Purpose: A suggested repair. Core never applies it: the host shows it and applies it through its own undoable edit path. A patch fix carries JSON Patch operations; a focus fix only names the field the author has to fill in.
FieldRequiredTypeNotes
titleyesstringWhat applying the fix does, in a few words.
idnostringStable id within one finding, such as focus-alt or use-readable-color.
kindnoenum:patch | focuspatch fixes carry patch; focus fixes carry focus.
safenobooleanTrue when applying the fix cannot change what the content says or how it looks beyond the repair, such as switching a failing colour to the one the theme chose. False fixes need a deliberate choice.
patchnoarray<ref:JsonPatchOperation>RFC 6902 JSON Patch operations that apply the fix to the checked presentation.
focusnoref:FindingFocus

FindingSuggestion

  • Type: object
  • Required fields: value, label, origin
  • Purpose: A value the author could use instead, such as a catalog record that exists. Suggestions name records actually present in the checked context and never replace authored values silently.
FieldRequiredTypeNotes
valueyesstring | number | boolean | null
labelyesstring
originyesstringWhere the suggestion comes from: schema, document (a record the document embeds), registered (a catalog the host registered) or contract.
definitionnostringWhere the suggested record or constraint is defined.

ValidationIssue

  • Type: object
  • Required fields: path, message, keyword, schemaPath, params
  • Purpose: The raw schema or semantic issue behind a finding, kept with every union alternative so a host can inspect the exact constraint.
FieldRequiredTypeNotes
pathyesstring
messageyesstring
keywordyesstringThe JSON Schema keyword that failed, or opf for a rule the schema cannot express.
schemaPathyesstring
paramsyesobject

Finding

  • Type: object
  • Required fields: ruleId, severity, category, path, message
  • Purpose: One thing a checker found at one place in a presentation.
FieldRequiredTypeNotes
ruleIdyesstringStable <producer>/<rule> id, such as opf/text-contrast for core or pptx.dev/narrative-gap for a hosted reviewer. Ids do not change between releases.
sourcenostringThe producer: opf (the default) for core, or the name of another tool such as pptx.dev/review.
severityyesref:FindingSeverity
categoryyesref:FindingCategory
pathyesstringJSON Pointer to the value the finding is about, such as /slides/4/title. Empty for the whole document, or for a value in a supplied context such as a loaded catalog.
scopenoenum:document | contextdocument (the default) when path points into the checked presentation, context when it points into host-supplied context such as loaded catalog records.
messageyesstringWhat is wrong, in a sentence.
helpnostringWhat to do about it.
slidenointegerZero-based index of the slide the finding belongs to.
slideIdnostringThe id of that slide, when it has one.
locationnoref:FindingLocation
definitionnostringA link to the rule's documentation or to the schema constraint or catalog record the finding is about.
lookupnoarray<string>Arguments for the opf schema or opf catalog command that shows the definition, as an argument list rather than a shell string.
suggestionsnoarray<ref:FindingSuggestion>
measurednoobjectThe numbers behind the finding, such as { "ratio": 2.1, "needed": 4.5 }.
fixesnoarray<ref:FindingFix>
validationnoref:ValidationIssue