class

Analyzer::Go::Huma::PackageInfo

Inherits Reference < Object

What the operations of one package share: the security requirement variables and default security its API declares, the base path of its OpenAPI server, its named handlers and its huma.Register wrappers.

Instance methods

access_tag(security : String | Nil) : Tag | Nil

The declared-access tag of an operation from the security it ends up with (a literal, or a package variable holding one), else the API's default: anonymous when the list is empty or has an empty alternative, else the schemes it requires. Nil when nothing is declared, or the declaration cannot be read.

Source
auto_patch?
Source
base_path
Source
default_security

The default security, when one value is set for the package's API.

Source
forwarders

Function taking a huma.Operation -> {that parameter, its body}.

Source
handlers
Source
read(path : String, raw : String) : Nil
Source
resolve_base_path(contents : Array(String)) : Nil

The path of the URL of the package's API document server, a literal or a string constant of the package. Per OpenAPI, operation paths are relative to it; vikunja mounts its Huma API on the Echo group at that same GroupPrefix. Only a relative path counts: an absolute URL usually names a proxy in front of the app. ponytail: per package, not per API object: a package building two APIs with different servers gets the first one's.

Source
security_vars
Source