struct Details

Included Modules

Defined in:

models/endpoint.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

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

[View source]
def self.new(code_path : PathInfo | Nil = nil) #

[View source]

Instance Method Detail

def ==(other : Details) : Bool #

[View source]
def add_path(code_path : PathInfo) #

[View source]
def add_technology(technology : String | Nil) : Nil #

Record a contributing technology. Idempotent; keeps the list sorted so the emitted order does not depend on which duplicate the optimizer saw first.


[View source]
def code_paths : Array(PathInfo) #

[View source]
def code_paths=(code_paths : Array(PathInfo)) #

[View source]
def detached_copy : Details #

[View source]
def status_code : Int32 | Nil #

[View source]
def status_code=(status_code : Int32) #

[View source]
def status_code=(status_code : Int32 | Nil) #

[View source]
def technologies : Array(String) #

Every technology that produced this endpoint, sorted, deduplicated.

The optimizer collapses endpoints on (method, url, scope), and the winning duplicate keeps #technology while the loser's is discarded — #code_paths records that a second file also declared the route, but nothing records which analyzer read that file. Scanning casdoor whole therefore attributed 9 endpoints to oas2 when its swagger document alone yields 235: the fact was destroyed at the merge, in proportion to how well the sources agreed. This list keeps it. #technology is unchanged (still the winner) and is always a member of this list.

Serialized only when two or more technologies contributed. A single entry would repeat #technology on every endpoint of every report, so suppressing it keeps the JSON/YAML/TOML documents byte-identical for the unmerged majority; a consumer reads #technologies when present and falls back to [technology] when absent — the same fallback it needs for output from a Noir that predates the field.


[View source]
def technologies=(technologies : Array(String)) #

Every technology that produced this endpoint, sorted, deduplicated.

The optimizer collapses endpoints on (method, url, scope), and the winning duplicate keeps #technology while the loser's is discarded — #code_paths records that a second file also declared the route, but nothing records which analyzer read that file. Scanning casdoor whole therefore attributed 9 endpoints to oas2 when its swagger document alone yields 235: the fact was destroyed at the merge, in proportion to how well the sources agreed. This list keeps it. #technology is unchanged (still the winner) and is always a member of this list.

Serialized only when two or more technologies contributed. A single entry would repeat #technology on every endpoint of every report, so suppressing it keeps the JSON/YAML/TOML documents byte-identical for the unmerged majority; a consumer reads #technologies when present and falls back to [technology] when absent — the same fallback it needs for output from a Noir that predates the field.


[View source]
def technology : String | Nil #

[View source]
def technology=(technology : String | Nil) #

[View source]