Skip to content

API: versioned endpoint listing understood RIAPI keys per backend #699

@lilith

Description

@lilith

Summary

Add a versioned JSON API endpoint that returns all understood RIAPI querystring keys, tagged by backend (v2 and zen).

Currently v1/schema/riapi/latest/list_keys returns a flat list of 100 key names from IR4_KEYS with no backend distinction, no type metadata, and no schema information.

Proposed endpoints

v1/schema/riapi/v1/keys

Returns understood keys per backend:

  • v2: The 100 keys from IR4_KEYS in imageflow_riapi::ir4::parsing
  • zen: Keys declared via #[kv(...)] annotations on zennode structs across zenlayout, zenresize, zenfilters, and zencodecs

Response includes backend name, version identifier, sorted key list, and count.

v1/schema/riapi/v1/zen-node-schema

Returns the full zennode JSON Schema (2020-12) for the zen RIAPI node registry. Uses zennode::json_schema::registry_to_json_schema(). Includes types, ranges, defaults, descriptions, and x-zennode-kv-keys extensions mapping RIAPI keys to node parameters.

Only available when zen-pipeline feature is enabled.

Implementation notes

  • Extract build_registry() helper in imageflow_core/src/zen/riapi.rs
  • Add json-schema feature to zennode dependency
  • Zen endpoints gated behind #[cfg(feature = "zen-pipeline")]
  • Add response types to imageflow_types

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions