#105·orca

Validate and generate doc for static const decls in api.json

Author: martinfouilleulCreated Mar 6, 2025Updated Mar 6, 2025
Labelsdocumentation

Non-enum constants (like the UI theme strings) are declared in api.json using a new schema:

{
    "kind": "const",
    "name": "OC_UI_THEME_PRIMARY",
    "type": {
        "kind": "namedType",
        "name": "oc_str8"
    },
    "init": {
        "kind": "string",
        "value": "primary"
    }
}

These have been added manually to api.json for now to unblock binding maintainers, but we still need to:

  • Generate templates for these declarations from source to ease adding new declarations in the future
  • Check those declarations against the source to validate that api.json is up to date when we push to master
  • Generate docs from these declarations