Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractAnnotation ¶
ExtractAnnotation returns the trailing identifier of a `swagger:<name>` marker found anywhere on line, or ("", false) if no marker is present. Used by the scanner's annotation-classification index.
func ModelOverride ¶
func ModelOverride(comments *ast.CommentGroup) (string, bool)
ModelOverride returns the name argument of a `swagger:model <name>` marker found anywhere in comments, or ("", true) when the marker is present without an argument (bare `swagger:model`). Returns ("", false) when no marker is found.
func ParametersOverride ¶
func ParametersOverride(comments *ast.CommentGroup) ([]string, bool)
ParametersOverride returns every operation-id reference attached to a `swagger:parameters` marker. One marker can carry several operation ids; multiple markers across comments accumulate.
func ResponseOverride ¶
func ResponseOverride(comments *ast.CommentGroup) (string, bool)
ResponseOverride returns the name argument of a `swagger:response <name>` marker, matching the bare-marker semantics of ModelOverride.
Types ¶
type ParsedPathContent ¶
type ParsedPathContent struct {
Method, Path, ID string
Tags []string
Remaining *ast.CommentGroup
}
func ParseOperationPathAnnotation ¶
func ParseOperationPathAnnotation(lines []*ast.Comment) (cnt ParsedPathContent)
func ParseRoutePathAnnotation ¶
func ParseRoutePathAnnotation(lines []*ast.Comment) (cnt ParsedPathContent)
Directories
¶
| Path | Synopsis |
|---|---|
|
Package grammar is the annotation parser for codescan.
|
Package grammar is the annotation parser for codescan. |
|
Package routebody parses the body sub-language of swagger:route / swagger:operation `Parameters:` and `Responses:` raw blocks.
|
Package routebody parses the body sub-language of swagger:route / swagger:operation `Parameters:` and `Responses:` raw blocks. |
|
Package security is a thin sub-parser for the `Security:` block body that appears under both `swagger:meta` and `swagger:route`.
|
Package security is a thin sub-parser for the `Security:` block body that appears under both `swagger:meta` and `swagger:route`. |
|
Package yaml is a thin wrapper around go.yaml.in/yaml/v3 for consuming the RawYAML bodies that internal/parsers/grammar/ isolates between `---` fences, plus the typed-extensions service the grammar lexer calls for `extensions:` raw blocks.
|
Package yaml is a thin wrapper around go.yaml.in/yaml/v3 for consuming the RawYAML bodies that internal/parsers/grammar/ isolates between `---` fences, plus the typed-extensions service the grammar lexer calls for `extensions:` raw blocks. |