struct Param

Included Modules

Defined in:

models/endpoint.cr

Constant Summary

BODY_TYPE_ALIASES = {"body" => "json"}

Request-body param types that share the json bucket. Fourteen analyzers (NestJS, Next.js, Rocket, tRPC, Servant, Play, Scotty, Wisp, Cowboy, Elli, plumber, Nuxt, Nitro, …) spell a body field body rather than json, but every HTTP-shaped consumer dispatches on the six canonical types — the curl / httpie / PowerShell / mermaid builders take a request body from json + form, the OAS and Postman builders map anything else to a query parameter, and the probe deliverers post json or form. So body params were invisible in every HTTP-shaped output: 98 of them across the fixture tree, giving curl -i -X 'POST' '/submit' with no --data-raw at all and POST body fields emitted as in: query in the OpenAPI document.

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, value : String, param_type : String) #

[View source]
def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def ==(other : Param) : Bool #

[View source]
def 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. a match in two code_paths) can't surface a duplicate "auth auth" in the text output.


[View source]
def detached_copy : Param #

[View source]
def name : String #

[View source]
def name=(name : String) #

[View source]
def param_type : String #

[View source]
def param_type=(value : String) #

[View source]
def param_type=(param_type : String) #

[View source]
def request_type : String #

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.


[View source]
def tags : Array(Tag) #

[View source]
def tags=(tags : Array(Tag)) #

[View source]
def value : String #

[View source]
def value=(value : String) #

[View source]