Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 974 Bytes

metadata.md

File metadata and controls

27 lines (18 loc) · 974 Bytes

Metadata keys

Metadata is a field of huma.Operation (map[string]any) that is useful set arbitrary data assigned with the operation.

hureg utilises it to make built-in functions and Operation Handlers work, but you can find it useful for your custom Operation Handlers and Registration Middlewares.

Pre-defined keys

If you use hureg registration functions, every operation will have Metadata map filled with the library-specific keys.

You can use this data in own Operation Handlers to:

  • Get input/output types of a registered handler
  • Access OpenAPI object
  • Find out if operation was defined explicitly (via Register function) or implicitly via convenience methods.

Look at metadata package for details.

You are not supposed to modify these keys directly, it can break the library functionality.


Per-group Transformers →