struct Param
- Param
- Struct
- Value
- Object
Included Modules
- JSON::Serializable
- YAML::Serializable
Defined in:
models/endpoint.crConstant Summary
-
BODY_TYPE_ALIASES =
{"body" => "json"} -
Request-body param types that share the
jsonbucket. Fourteen analyzers (NestJS, Next.js, Rocket, tRPC, Servant, Play, Scotty, Wisp, Cowboy, Elli, plumber, Nuxt, Nitro, …) spell a body fieldbodyrather thanjson, but every HTTP-shaped consumer dispatches on the six canonical types — the curl / httpie / PowerShell / mermaid builders take a request body fromjson+form, the OAS and Postman builders map anything else to a query parameter, and the probe deliverers postjsonorform. Sobodyparams were invisible in every HTTP-shaped output: 98 of them across the fixture tree, givingcurl -i -X 'POST' '/submit'with no--data-rawat all and POST body fields emitted asin: queryin the OpenAPI document.
Constructors
- .new(name : String, value : String, param_type : String)
- .new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
- .new(pull : JSON::PullParser)
Instance Method Summary
- #==(other : Param) : Bool
-
#add_tag(tag : Tag)
Dedup by (name, tagger) like push_callee/push_param do for their collections, so re-tagging the same target (e.g.
- #detached_copy : Param
- #name : String
- #name=(name : String)
- #param_type : String
- #param_type=(value : String)
- #param_type=(param_type : String)
-
#request_type : String
The canonical bucket this param belongs to.
- #tags : Array(Tag)
- #tags=(tags : Array(Tag))
- #value : String
- #value=(value : String)
Constructor Detail
Instance Method Detail
Dedup by (name, tagger) like push_callee/push_param do for their collections, so re-tagging the same target (e.g. a match in two code_paths) can't surface a duplicate "auth auth" in the text output.
The canonical bucket this param belongs to. Consumers dispatch on this
rather than on #param_type, which stays exactly what the analyzer
recorded so the JSON/YAML inventory is unchanged.