Skip to main content

openapi_class_policy

Function openapi_class_policy 

Source
pub fn openapi_class_policy(section: &CodeModeSection) -> OpenApiClassPolicy
Expand description

The exact OpenAPI operation-class policy a [code_mode] block declares.

Each class takes its mode (defaults: read allow_all, write, delete and admin deny_all). An allowlist class admits the allowed_operations of its class; blocklist is allow_all, because blocked_operations and blocked_paths are refused in every mode. This is what validate_code, execute_code and (when a class key is set) curated tools enforce, with no policy evaluator.