Documentation
¶
Overview ¶
Package ref_alias_chain exercises buildDeclAlias under RefAliases=true with an alias-of-alias chain and aliases to well-known standard library types (time.Time, any).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseBody ¶
BaseBody is the concrete named struct at the bottom of the alias chain.
swagger:model BaseBody
type CountTyped ¶
type CountTyped = any
CountTyped probes the `swagger:type` override on an alias of any. `swagger:type` takes a Go-type name (per `SwaggerSchemaForType`); honoured via `classifierNamedTypeOverride`.
swagger:model CountTyped swagger:type int64
type Datestamp ¶
type Datestamp = any
Datestamp aliases any with a user-provided `swagger:strfmt` annotation. Expected: the alias surfaces as `{string, date}` — the decl-entry strfmt classifier fires before the any-recognizer would otherwise empty the schema.
swagger:model Datestamp swagger:strfmt date
type Envelope ¶
type Envelope struct {
First LinkA `json:"first"`
Second LinkB `json:"second"`
CreatedAt Timestamp `json:"createdAt"`
Meta Wildcard `json:"meta"`
// Stamp is typed via the strfmt-annotated alias of `any`.
Stamp Datestamp `json:"stamp"`
// Drift uses an unannotated alias of any — the field site
// dissolves the alias to the underlying.
Drift Loose `json:"drift"`
}
Envelope references the aliases via its fields so the scanner also walks the schemaBuilder.buildAlias path for each chain member.
swagger:model Envelope
type LinkB ¶
type LinkB = LinkA
LinkB is an alias of an alias — chain depth two.
swagger:model LinkB
type Loose ¶
type Loose = any
Loose aliases any with NO swagger:model annotation. Reachable only via Envelope.Drift below. Witness for the unannotated case at field sites: the alias dissolves and produces no definition.
type Timestamp ¶
Timestamp aliases time.Time so that buildDeclAlias takes its isStdTime branch.
swagger:model Timestamp
type UserIDStrf ¶
type UserIDStrf = int64
UserIDStrf probes `swagger:strfmt` on an alias of a primitive. Expected: the alias surfaces as `{string, uuid}` — the decl-entry strfmt classifier wins over the primitive underlying.
swagger:model UserIDStrf swagger:strfmt uuid