struct

Details

Inherits YAML::Serializable < JSON::Serializable < Struct < Value < Object

Constructors

new(code_path : PathInfo | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source
new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
Source

Instance methods

==(other : Details) : Bool
Source
add_path(code_path : PathInfo)
Source
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.

Source
code_paths
Source
code_paths=(code_paths : Array(PathInfo))
Source
detached_copy

Every Endpoint#details= goes through here, and the optimizer's dedup calls it once per merged duplicate, so it copies in bulk: technologies in one sort instead of re-sorting after every add_technology. The result is what those calls produced — empty names dropped, duplicates collapsed, sorted — whatever state the source list was left in.

Source
project

The project (nearest build manifest: pyproject.toml, package.json, go.mod, ...) the endpoint's first code path belongs to, relative to the scan base. It tells apart the same route served by two apps of a monorepo, which the optimizer already keeps as two endpoints.

Empty when there is no project to name: no manifest above the source, the manifest sits at the scan base itself (a single-project scan), or the endpoint is a declaration (spec, collection). Serialized only when non-empty, so reports for single-project scans stay byte-identical, and a consumer reads a missing key as "no project".

Source
project=(project : String)

The project (nearest build manifest: pyproject.toml, package.json, go.mod, ...) the endpoint's first code path belongs to, relative to the scan base. It tells apart the same route served by two apps of a monorepo, which the optimizer already keeps as two endpoints.

Empty when there is no project to name: no manifest above the source, the manifest sits at the scan base itself (a single-project scan), or the endpoint is a declaration (spec, collection). Serialized only when non-empty, so reports for single-project scans stay byte-identical, and a consumer reads a missing key as "no project".

Source
status_code
Source
status_code=(status_code : Int32 | Nil)
Source
technologies

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.

Source
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.

Source
technology
Source
technology=(technology : String | Nil)
Source