enhancements/

directory
v0.36.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2026 License: Apache-2.0

Directories

Path Synopsis
Package additionalprops exercises the type-level swagger:additionalProperties marker: true / false / a typed value / a model reference, the map-override case, coexistence with other object validations, and the lowest-priority precedence rule (the marker only rides on an object).
Package additionalprops exercises the type-level swagger:additionalProperties marker: true / false / a typed value / a model reference, the map-override case, coexistence with other object validations, and the lowest-priority precedence rule (the marker only rides on an object).
Package apfield exercises the field-level additionalProperties: keyword: overriding a map element schema, true/typed/model-reference values, the allOf-sibling form on a referenced-model field, and the lowest-priority contradiction on a non-object field.
Package apfield exercises the field-level additionalProperties: keyword: overriding a map element schema, true/typed/model-reference values, the allOf-sibling form on a referenced-model field, and the lowest-priority contradiction on a non-object field.
Package apsimpleschema is the safeguard witness: additionalProperties and patternProperties are object-schema keywords with no OAS2 SimpleSchema form, so on a non-body parameter or a response header they must be dropped with a CodeUnsupportedInSimpleSchema diagnostic — never silently absorbed.
Package apsimpleschema is the safeguard witness: additionalProperties and patternProperties are object-schema keywords with no OAS2 SimpleSchema form, so on a non-body parameter or a response header they must be dropped with a CodeUnsupportedInSimpleSchema diagnostic — never silently absorbed.
Package after_decl_comments witnesses the AfterDeclComments opt-in: swagger annotations live INSIDE a declaration (a struct's leading body comment) or INLINED as a trailing comment, so the godoc above the declaration stays clean.
Package after_decl_comments witnesses the AfterDeclComments opt-in: swagger annotations live INSIDE a declaration (a struct's leading body comment) or INLINED as a trailing comment, so the godoc above the declaration stays clean.
Package alias_calibration_embed exercises the schema builder's alias handling at two reach contexts:
Package alias_calibration_embed exercises the schema builder's alias handling at two reach contexts:
Package alias_calibration_primitive exercises the schema builder's alias handling at the simplest decl-level scenario: aliases of primitives, with the annotation-vs-auto-discovery distinction visible side by side.
Package alias_calibration_primitive exercises the schema builder's alias handling at the simplest decl-level scenario: aliases of primitives, with the annotation-vs-auto-discovery distinction visible side by side.
Package alias_calibration_stdlib exercises the schema builder's alias handling for stdlib-special RHS types (`time.Time`, `error`, `json.RawMessage`, `any`).
Package alias_calibration_stdlib exercises the schema builder's alias handling for stdlib-special RHS types (`time.Time`, `error`, `json.RawMessage`, `any`).
Package alias_expand exercises non-transparent alias handling for both parameter and response scanners.
Package alias_expand exercises non-transparent alias handling for both parameter and response scanners.
Package alias_findmodel_witness exercises the parameters and responses builders' GetModel calls on alias targets that are not annotated with swagger:model — the FindDecl-fallback path.
Package alias_findmodel_witness exercises the parameters and responses builders' GetModel calls on alias targets that are not annotated with swagger:model — the FindDecl-fallback path.
Package alias_parameters_calibration exercises the parameters builder's alias handling across three reach contexts:
Package alias_parameters_calibration exercises the parameters builder's alias handling across three reach contexts:
Package alias_response exercises response-level top-alias handling.
Package alias_response exercises response-level top-alias handling.
Package alias_response_shapes captures Q4-exploration goldens for the response builder's alias handling on MEMBER fields:
Package alias_response_shapes captures Q4-exploration goldens for the response builder's alias handling on MEMBER fields:
Package alias_responses_calibration exercises the responses builder's alias handling across three reach contexts:
Package alias_responses_calibration exercises the responses builder's alias handling across three reach contexts:
Package all_http_methods declares one handler per HTTP verb so that setPathOperation walks the PATCH, HEAD and OPTIONS branches alongside the already-tested GET/POST/PUT/DELETE.
Package all_http_methods declares one handler per HTTP verb so that setPathOperation walks the PATCH, HEAD and OPTIONS branches alongside the already-tested GET/POST/PUT/DELETE.
Package allof_edges exercises allOf composition edge cases: pointer members, time.Time members, strfmt-tagged members, and interface members.
Package allof_edges exercises allOf composition edge cases: pointer members, time.Time members, strfmt-tagged members, and interface members.
Package default_allof_embeds exercises Options.DefaultAllOfForEmbeds — the opt-in that renders a plain struct embed as allOf composition instead of inlining the embedded type's properties.
Package default_allof_embeds exercises Options.DefaultAllOfForEmbeds — the opt-in that renders a plain struct embed as allOf composition instead of inlining the embedded type's properties.
Package defaultallofembedsoverride is the minimal repro for what happens to a field-override embed under Options.DefaultAllOfForEmbeds.
Package defaultallofembedsoverride is the minimal repro for what happens to a field-override embed under Options.DefaultAllOfForEmbeds.
Package defaults_examples exercises default and example tag parsing across numeric, array and object schema types.
Package defaults_examples exercises default and example tag parsing across numeric, array and object schema types.
Package description_title_override witnesses the swagger:title / swagger:description override annotations (Q30 close-out): an explicit annotation replaces the godoc-derived title / description so the Go-facing doc comment can diverge from the API-facing spec text.
Package description_title_override witnesses the swagger:title / swagger:description override annotations (Q30 close-out): an explicit annotation replaces the godoc-derived title / description so the Go-facing doc comment can diverge from the API-facing spec text.
Package description_title_override_responses witnesses the swagger:description override on responses and response headers (P3 of the override feature, Q30 close-out), plus the swagger:title context error: OpenAPI 2.0 Response and Header objects have no `title` field, so a swagger:title on a response / header is rejected with scan.context-invalid and the description override is still applied.
Package description_title_override_responses witnesses the swagger:description override on responses and response headers (P3 of the override feature, Q30 close-out), plus the swagger:title context error: OpenAPI 2.0 Response and Header objects have no `title` field, so a swagger:title on a response / header is rejected with scan.context-invalid and the description override is still applied.
Package diagnostics carries fixtures that exercise the schema builder's diagnostic emission path.
Package diagnostics carries fixtures that exercise the schema builder's diagnostic emission path.
Package discriminatedsubtypes exercises the auto-discovery of discriminator subtypes of a referenced base (go-swagger#1913).
Package discriminatedsubtypes exercises the auto-discovery of discriminator subtypes of a referenced base (go-swagger#1913).
base
Package base holds the polymorphic bases, in a package of their own so that subtypes can live in more than one other package without an import cycle.
Package base holds the polymorphic bases, in a package of their own so that subtypes can live in more than one other package without an import cycle.
edges
Package edges holds the embed shapes the reverse index must classify, in a family NO route references — so it also locks the other half of the gate: a discriminated base that never enters the reachable set pulls nothing in.
Package edges holds the embed shapes the reverse index must classify, in a family NO route references — so it also locks the other half of the gate: a discriminated base that never enters the reachable set pulls nothing in.
sub
Package sub holds a subtype declared in a package other than the base's, so the reverse `swagger:allOf` index is exercised across package boundaries.
Package sub holds a subtype declared in a package other than the base's, so the reverse `swagger:allOf` index is exercised across package boundaries.
Package discriminatednested exercises a MULTI-LEVEL polymorphic hierarchy: a subtype of a discriminated base that is itself a discriminated base (go-swagger#1913).
Package discriminatednested exercises a MULTI-LEVEL polymorphic hierarchy: a subtype of a discriminated base that is itself a discriminated base (go-swagger#1913).
Package embedinheritance exercises the generalized "annotations on an embedded field apply to the members it promotes" rule (go-swagger#2701) beyond parameters: a `required:` annotation on an embed propagates to the promoted properties of a model schema, and of a response body schema (which is built through the same schema builder).
Package embedinheritance exercises the generalized "annotations on an embedded field apply to the members it promotes" rule (go-swagger#2701) beyond parameters: a `required:` annotation on an embed propagates to the promoted properties of a model schema, and of a response body schema (which is built through the same schema builder).
Package embedded_types exercises schema-builder edge cases when a struct embeds an alias, a named empty interface, or the predeclared error interface.
Package embedded_types exercises schema-builder edge cases when a struct embeds an alias, a named empty interface, or the predeclared error interface.
Package emitxgotype exercises the EmitXGoType option: every emitted definition should carry an x-go-type vendor extension recording its fully-qualified originating Go type, alongside the existing x-go-name / x-go-package traceability extensions.
Package emitxgotype exercises the EmitXGoType option: every emitted definition should carry an x-go-type vendor extension recording its fully-qualified originating Go type, alongside the existing x-go-name / x-go-package traceability extensions.
Package enum_docs exercises scanCtx.findEnumValue description building on const blocks that carry per-value doc comments and multi-name value specs so both the docs loop and the names separator are walked.
Package enum_docs exercises scanCtx.findEnumValue description building on const blocks that carry per-value doc comments and multi-name value specs so both the docs loop and the names separator are walked.
Package enum_overrides isolates the v1 behavior of `enum:` when it coexists with (or replaces) `swagger:enum TypeName` const-value inference.
Package enum_overrides isolates the v1 behavior of `enum:` when it coexists with (or replaces) `swagger:enum TypeName` const-value inference.
external-docs
aliased
Package aliased exercises the `external docs` alias spelling and a url-only ExternalDocs block (no description).
Package aliased exercises the `external docs` alias spelling and a url-only ExternalDocs block (no description).
empty
Package empty has an ExternalDocs block with no fields; it must NOT emit a useless `externalDocs: {}` (the OAS object requires url).
Package empty has an ExternalDocs block with no fields; it must NOT emit a useless `externalDocs: {}` (the OAS object requires url).
Package externaldocsobjects exercises externalDocs on non-meta OAIv2 objects: operations (swagger:route + swagger:operation) and full schemas (swagger:model).
Package externaldocsobjects exercises externalDocs on non-meta OAIv2 objects: operations (swagger:route + swagger:operation) and full schemas (swagger:model).
Package generic_instantiation exercises the generic-type instantiation short-circuit inside [Builder.buildNamedType]: when a named type has TypeArgs (i.e.
Package generic_instantiation exercises the generic-type instantiation short-circuit inside [Builder.buildNamedType]: when a named type has TypeArgs (i.e.
Package godoclinks exercises the CleanGoDoc godoc-syntax filter.
Package godoclinks exercises the CleanGoDoc godoc-syntax filter.
inventory
Package inventory provides a model referenced cross-package by a doc-link.
Package inventory provides a model referenced cross-package by a doc-link.
Package header_extensions exercises M2's new Walker.Extension wiring on the response-header path.
Package header_extensions exercises M2's new Walker.Extension wiring on the response-header path.
Package header_named_basic pins the M1-follow-up fix that brought `in: header` parameters into the SimpleSchema-aware primitive- inline path.
Package header_named_basic pins the M1-follow-up fix that brought `in: header` parameters into the SimpleSchema-aware primitive- inline path.
Package in_case_insensitive witnesses Q29 — the `in:` value must be normalised case-insensitively against the closed OAS v2 vocabulary (`query`, `path`, `header`, `body`, `formData`).
Package in_case_insensitive witnesses Q29 — the `in:` value must be normalised case-insensitively against the closed OAS v2 vocabulary (`query`, `path`, `header`, `body`, `formData`).
Package inner_markdown exercises the swagger:description | literal block scalar (reframes go-swagger#3211): an author opts a description into verbatim markdown by ending the annotation line with the YAML literal-block marker `|`.
Package inner_markdown exercises the swagger:description | literal block scalar (reframes go-swagger#3211): an author opts a description into verbatim markdown by ending the annotation line with the YAML literal-block marker `|`.
Package interface_methods exercises the processInterfaceMethod and processAnonInterfaceMethod branches of the schema builder: non-exported methods, methods with parameters, methods with multiple returns, swagger:ignore methods, swagger:name overrides, swagger:strfmt returns, and pointer returns that may be x-nullable.
Package interface_methods exercises the processInterfaceMethod and processAnonInterfaceMethod branches of the schema builder: non-exported methods, methods with parameters, methods with multiple returns, swagger:ignore methods, swagger:name overrides, swagger:strfmt returns, and pointer returns that may be x-nullable.
Package interface_name_verbatim witnesses Q9's resolved post-Stream-M contract for interface-method property naming.
Package interface_name_verbatim witnesses Q9's resolved post-Stream-M contract for interface-method property naming.
Package interface_no_mangle exercises Options.SkipJSONifyInterfaceMethods — the opt-out of the interface-method auto-jsonify mangler.
Package interface_no_mangle exercises Options.SkipJSONifyInterfaceMethods — the opt-out of the interface-method auto-jsonify mangler.
Package keywordxpkg witnesses cross-package leaf resolution for the type-name keyword sites (swagger:additionalProperties, swagger:patternProperties, swagger:type): a bare type name that lives in ANOTHER package should resolve by leaf against the discovered model set — uniquely (promote to its definition) or, when several packages share the leaf, with an ambiguity diagnostic + drop.
Package keywordxpkg witnesses cross-package leaf resolution for the type-name keyword sites (swagger:additionalProperties, swagger:patternProperties, swagger:type): a bare type name that lives in ANOTHER package should resolve by leaf against the discovered model set — uniquely (promote to its definition) or, when several packages share the leaf, with an ambiguity diagnostic + drop.
a
b
malformed
bad-contact
Package bad_contact Probe API.
Package bad_contact Probe API.
bad-response-tag
Package bad_response_tag declares a swagger:route whose Responses block carries an unrecognised tag prefix, tripping parseTags's "invalid tag" branch.
Package bad_response_tag declares a swagger:route whose Responses block carries an unrecognised tag prefix, tripping parseTags's "invalid tag" branch.
bad-sec-defs
Package bad_sec_defs Probe API.
Package bad_sec_defs Probe API.
default-int
Package default_int carries a parameter with a `default:` value that does not parse as the declared type.
Package default_int carries a parameter with a `default:` value that does not parse as the declared type.
duplicate-body-tag
Package duplicate_body_tag declares a swagger:route whose Responses block has `body:` appearing twice so parseTags trips its "valid tag but not in a valid position" error branch.
Package duplicate_body_tag declares a swagger:route whose Responses block has `body:` appearing twice so parseTags trips its "valid tag but not in a valid position" error branch.
example-int
Package example_int carries a parameter with an `example:` value that does not parse as the declared int type, exercising setExample.Parse's error branch.
Package example_int carries a parameter with an `example:` value that does not parse as the declared int type, exercising setExample.Parse's error branch.
info-bad-ext-key
Package info_bad_ext_key Probe API.
Package info_bad_ext_key Probe API.
meta-bad-ext-key
Package meta_bad_ext_key Probe API.
Package meta_bad_ext_key Probe API.
Package meta_lists_flex_forms witnesses Property.AsList covering the meta (swagger:meta) annotation surface for list-shaped keywords.
Package meta_lists_flex_forms witnesses Property.AsList covering the meta (swagger:meta) annotation surface for list-shaped keywords.
Package meta_securitydefs_duplicate_keys witnesses two intertwined behaviours of the swagger:meta SecurityDefinitions raw block.
Package meta_securitydefs_duplicate_keys witnesses two intertwined behaviours of the swagger:meta SecurityDefinitions raw block.
Package meta_tos_schemes_terminator pins the sibling raw-block terminator rule for `Terms Of Service:` (KwTOS) when immediately followed by `Schemes:` (KwSchemes).
Package meta_tos_schemes_terminator pins the sibling raw-block terminator rule for `Terms Of Service:` (KwTOS) when immediately followed by `Schemes:` (KwSchemes).
Package name_from_tags witnesses the NameFromTags option: the emitted name of a schema property, query parameter, or response header is sourced from the first struct-tag type listed in Options.NameFromTags.
Package name_from_tags witnesses the NameFromTags option: the emitted name of a schema property, query parameter, or response header is sourced from the first struct-tag type listed in Options.NameFromTags.
Package threeway is a name-identity corpus member: THREE packages each declare a `swagger:model Widget` with distinct fields, all referenced from one container.
Package threeway is a name-identity corpus member: THREE packages each declare a `swagger:model Widget` with distinct fields, all referenced from one container.
a
b
c
Package deep is the name-identity pathological-depth corpus member (reserved for Stage 3).
Package deep is the name-identity pathological-depth corpus member (reserved for Stage 3).
Package examplesnomix is the name-identity witness for go-swagger #2126 ("reference swagger models under a specific package"): two packages each declare `swagger:model Widget` with the SAME json field but DIFFERENT example values.
Package examplesnomix is the name-identity witness for go-swagger #2126 ("reference swagger models under a specific package"): two packages each declare `swagger:model Widget` with the SAME json field but DIFFERENT example values.
a
b
Package hierarchical is the name-identity witness for the hierarchical fail-safe: two packages with LONG leaf names each declare `swagger:model Config`.
Package hierarchical is the name-identity witness for the hierarchical fail-safe: two packages with LONG leaf names each declare `swagger:model Config`.
Package mixed is a name-identity corpus member exercising BOTH collision kinds in one tree:
Package mixed is a name-identity corpus member exercising BOTH collision kinds in one tree:
x
y
Package nocollision is the name-identity G5 control: distinct models with distinct names across packages, no collision anywhere.
Package nocollision is the name-identity G5 control: distinct models with distinct names across packages, no collision anywhere.
sub
Package recursion is a name-identity corpus member: the G3 control.
Package recursion is a name-identity corpus member: the G3 control.
Package recursioncollision is the name-identity witness that combines the two hard cases: a type that is BOTH self-recursive AND name-colliding across packages.
Package recursioncollision is the name-identity witness that combines the two hard cases: a type that is BOTH self-recursive AND name-colliding across packages.
p
q
Package samepkgdup is a name-identity corpus member for D-4: two DIFFERENT types in the SAME package both claim `swagger:model Dup`.
Package samepkgdup is a name-identity corpus member for D-4: two DIFFERENT types in the SAME package both claim `swagger:model Dup`.
Package named_basic exercises the schemaBuilder.buildNamedBasic branches for named basic types carrying swagger:strfmt, swagger:type and swagger:default annotations.
Package named_basic exercises the schemaBuilder.buildNamedBasic branches for named basic types carrying swagger:strfmt, swagger:type and swagger:default annotations.
Package named_struct_tags exercises schemaBuilder.buildNamedStruct branches where a named struct referenced as a field carries a swagger:strfmt or swagger:type annotation that overrides its schema.
Package named_struct_tags exercises schemaBuilder.buildNamedStruct branches where a named struct referenced as a field carries a swagger:strfmt or swagger:type annotation that overrides its schema.
Package named_struct_tags exercises schemaBuilder.buildNamedStruct branches where a named struct referenced as a field carries a swagger:strfmt or swagger:type annotation that overrides its schema.
Package named_struct_tags exercises schemaBuilder.buildNamedStruct branches where a named struct referenced as a field carries a swagger:strfmt or swagger:type annotation that overrides its schema.
Package objectkeywords exercises the context gating of the object validation keywords (minProperties / maxProperties / patternProperties):
Package objectkeywords exercises the context gating of the object validation keywords (minProperties / maxProperties / patternProperties):
Package param_name_keyword exercises the `name:` keyword on a swagger:parameters struct field.
Package param_name_keyword exercises the `name:` keyword on a swagger:parameters struct field.
Package parameters_map_postdecl witnesses a bug in the parameters builder's buildFromFieldMap path.
Package parameters_map_postdecl witnesses a bug in the parameters builder's buildFromFieldMap path.
Package pathregex exercises inline-regex path-parameter stripping across both the swagger:route and swagger:operation builders.
Package pathregex exercises inline-regex path-parameter stripping across both the swagger:route and swagger:operation builders.
Package patternproperties exercises the patternProperties object schema keyword: a string-typed annotation whose argument is a regex.
Package patternproperties exercises the patternProperties object schema keyword: a string-typed annotation whose argument is a regex.
Package patternpropstyped exercises the typed patternProperties marker: quoted-regex to typed-value pairs (a primitive or a model $ref), RE2-hygiene checking, and the lowest-priority precedence rule.
Package patternpropstyped exercises the typed patternProperties marker: quoted-regex to typed-value pairs (a primitive or a model $ref), RE2-hygiene checking, and the lowest-priority precedence rule.
Package primitiveresponse exercises primitive response bodies declared via swagger:route response lines and swagger:response Body fields: bare and tagged primitives, arrays of primitives, the swagger:response workaround, and a model-ref control that must still resolve to a $ref (no regression).
Package primitiveresponse exercises primitive response bodies declared via swagger:route response lines and swagger:response Body fields: bare and tagged primitives, arrays of primitives, the swagger:response workaround, and a model-ref control that must still resolve to a $ref (no regression).
Package provparamsresp exercises cross-ref jsonpointer anchoring for the parameters and responses builders:
Package provparamsresp exercises cross-ref jsonpointer anchoring for the parameters and responses builders:
Package provenanceshapes exercises cross-ref jsonpointer anchoring through the schema builder's nested shapes, so the companion provenance pointer accurately tracks the spec node a Go construct produced:
Package provenanceshapes exercises cross-ref jsonpointer anchoring through the schema builder's nested shapes, so the companion provenance pointer accurately tracks the spec node a Go construct produced:
Package pruneunused exercises Options.PruneUnusedModels.
Package pruneunused exercises Options.PruneUnusedModels.
a
Package a holds the referenced half of the a.Thing / b.Thing collision pair.
Package a holds the referenced half of the a.Thing / b.Thing collision pair.
b
Package b holds the unreferenced half of the a.Thing / b.Thing collision pair.
Package b holds the unreferenced half of the a.Thing / b.Thing collision pair.
Package raw_message_override exercises user-classifier overrides on json.RawMessage.
Package raw_message_override exercises user-classifier overrides on json.RawMessage.
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).
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).
Package bodyfieldexample covers example: on a swagger:response struct Body field — array and scalar.
Package bodyfieldexample covers example: on a swagger:response struct Body field — array and scalar.
Package response_edges exercises edge cases in the response builder: embedded response structs, time.Time header fields, strfmt-tagged named header fields, and top-level non-struct response payloads.
Package response_edges exercises edge cases in the response builder: embedded response structs, time.Time header fields, strfmt-tagged named header fields, and top-level non-struct response payloads.
Package response_examples_by_mime witnesses response-level `examples` (a map keyed by mime type) on a struct-based `swagger:response` (go-swagger#2871).
Package response_examples_by_mime witnesses response-level `examples` (a map keyed by mime type) on a struct-based `swagger:response` (go-swagger#2871).
Package response_file_types pins Q3's response-side fix: the `swagger:file` annotation on a `swagger:response` field is gated on `in: body`.
Package response_file_types pins Q3's response-side fix: the `swagger:file` annotation on a `swagger:response` field is gated on `in: body`.
Package response_header_ref_leak pins Q2's fix on the response side: a response-header field whose Go type triggers the schema builder's makeRef path no longer corrupts `response.Schema` with a $ref.
Package response_header_ref_leak pins Q2's fix on the response side: a response-header field whose Go type triggers the schema builder's makeRef path no longer corrupts `response.Schema` with a $ref.
Package response_implicit_header pins Q1's response-side fix: the `in:` annotation on a `swagger:response` Go struct's field is a scanner-side discriminator (OAS v2's wire format has no `in` on response headers) and an omitted line now explicitly defaults to "header" rather than falling through an incidental `in != "body"` check.
Package response_implicit_header pins Q1's response-side fix: the `in:` annotation on a `swagger:response` Go struct's field is a scanner-side discriminator (OAS v2's wire format has no `in` on response headers) and an omitted line now explicitly defaults to "header" rather than falling through an incidental `in != "body"` check.
Package response_name_keyword exercises the name keyword on a response struct field.
Package response_name_keyword exercises the name keyword on a response struct field.
Package toplevelexample covers example: on top-level (non-struct) response body types — array and scalar — across placements (go-swagger#3013).
Package toplevelexample covers example: on top-level (non-struct) response body types — array and scalar — across placements (go-swagger#3013).
Package routes_description_dash_list witnesses the post-M6.5-C behaviour for route description lines that begin with `-` (a markdown list item).
Package routes_description_dash_list witnesses the post-M6.5-C behaviour for route description lines that begin with `-` (a markdown list item).
Package routes_description_yaml_fence_absorb witnesses the post-M6.5-C behaviour when a route's prose carries a stray `---` line.
Package routes_description_yaml_fence_absorb witnesses the post-M6.5-C behaviour when a route's prose carries a stray `---` line.
Package routes_full_petstore_shape exercises a swagger:route block using the full petstore-style metadata surface (Consumes / Produces / Schemes / Security / Tags / Parameters / Responses / Extensions) alongside the `+ name:` parameter sub-grammar.
Package routes_full_petstore_shape exercises a swagger:route block using the full petstore-style metadata surface (Consumes / Produces / Schemes / Security / Tags / Parameters / Responses / Extensions) alongside the `+ name:` parameter sub-grammar.
Package routes_lists_flex_forms witnesses the unified Property.AsList accepted surface forms for list-shaped keywords (schemes / consumes / produces).
Package routes_lists_flex_forms witnesses the unified Property.AsList accepted surface forms for list-shaped keywords (schemes / consumes / produces).
Package routes_multi_method_same_path exercises two handlers on the same path (GET + POST) with different parameter/response shapes — confirms the routes builder merges multiple operations under one path entry without cross-contamination.
Package routes_multi_method_same_path exercises two handlers on the same path (GET + POST) with different parameter/response shapes — confirms the routes builder merges multiple operations under one path entry without cross-contamination.
Package routes_params_body_array exercises a body parameter that is an array of a referenced model: `type: []Pet`.
Package routes_params_body_array exercises a body parameter that is an array of a referenced model: `type: []Pet`.
Package routes_params_body_array_nested exercises nested-array body types: `type: [][]Item`.
Package routes_params_body_array_nested exercises nested-array body types: `type: [][]Item`.
Package routes_params_body_ref exercises a body parameter referencing a swagger:model.
Package routes_params_body_ref exercises a body parameter referencing a swagger:model.
Package routes_params_body_with_schema_validations exercises the "force-the-spec" case: a body ref to a known model plus inline schema validations that land on param.Schema.{Minimum,Maximum,...} per legacy processSchema behavior.
Package routes_params_body_with_schema_validations exercises the "force-the-spec" case: a body ref to a known model plus inline schema validations that land on param.Schema.{Minimum,Maximum,...} per legacy processSchema behavior.
Package routes_params_empty_chunk exercises a bare `+` chunk with no following key:value lines.
Package routes_params_empty_chunk exercises a bare `+` chunk with no following key:value lines.
Package routes_params_form_string exercises a form string parameter with allowempty: true.
Package routes_params_form_string exercises a form string parameter with allowempty: true.
Package routes_params_header_string exercises a header string parameter with pattern and format.
Package routes_params_header_string exercises a header string parameter with pattern and format.
Package routes_params_multiple exercises three chained parameters mixing in: values (path, query, body).
Package routes_params_multiple exercises three chained parameters mixing in: values (path, query, body).
Package routes_params_path exercises a single path parameter declared via the swagger:route `+ name:` form.
Package routes_params_path exercises a single path parameter declared via the swagger:route `+ name:` form.
Package routes_params_query_array exercises a query array parameter with enum + minlength/maxlength validations.
Package routes_params_query_array exercises a query array parameter with enum + minlength/maxlength validations.
Package routes_params_query_boolean exercises a query boolean parameter with a default value.
Package routes_params_query_boolean exercises a query boolean parameter with a default value.
Package routes_params_query_number exercises a query number parameter with min/max/default landed via legacy short-form keys.
Package routes_params_query_number exercises a query number parameter with min/max/default landed via legacy short-form keys.
Package routes_params_query_string exercises a query string parameter with pattern and format validations.
Package routes_params_query_string exercises a query string parameter with pattern and format validations.
Package routes_params_query_validations exercises query parameters carrying SimpleSchema validations (min, max, default, enum).
Package routes_params_query_validations exercises query parameters carrying SimpleSchema validations (min, max, default, enum).
Package routes_params_unknown_key exercises silent-drop of unknown param keys: `colour: blue` is unknown to applyParamField and is stashed in extraData; processSchema only reads known schema keys (min/max/etc.) so `colour` is silently dropped.
Package routes_params_unknown_key exercises silent-drop of unknown param keys: `colour: blue` is unknown to applyParamField and is stashed in extraData; processSchema only reads known schema keys (min/max/etc.) so `colour` is silently dropped.
Package routes_responses_array exercises array-shaped body responses, including the nested `[][]` form.
Package routes_responses_array exercises array-shaped body responses, including the nested `[][]` form.
Package routes_responses_default exercises a route with only a `default:` response.
Package routes_responses_default exercises a route with only a `default:` response.
Package routes_responses_definition_fallback exercises the legacy silent flip from response-ref to body-ref when the untagged name is not in the operation's responses map but IS in definitions (parseResponseLine lines 83-87).
Package routes_responses_definition_fallback exercises the legacy silent flip from response-ref to body-ref when the untagged name is not in the operation's responses map but IS in definitions (parseResponseLine lines 83-87).
Package routes_responses_description_only exercises response lines carrying only a description: tag with no body/response ref.
Package routes_responses_description_only exercises response lines carrying only a description: tag with no body/response ref.
Package routes_responses_empty_value exercises an empty response value: `204:` with nothing after the colon — legacy produces an empty Response{} under the code.
Package routes_responses_empty_value exercises an empty response value: `204:` with nothing after the colon — legacy produces an empty Response{} under the code.
Package routes_responses_mixed_bodies exercises a single route mixing body refs (schema) and response refs across status codes.
Package routes_responses_mixed_bodies exercises a single route mixing body refs (schema) and response refs across status codes.
Package routes_responses_multiple_codes exercises a route with default + 2xx + 4xx + 5xx response codes in one block.
Package routes_responses_multiple_codes exercises a route with default + 2xx + 4xx + 5xx response codes in one block.
Package routes_responses_positional exercises the untagged-first-token response form: `200: someResponse` is treated as response="someResponse".
Package routes_responses_positional exercises the untagged-first-token response form: `200: someResponse` is treated as response="someResponse".
Package routes_responses_ref_not_found exercises the not-found branch of the legacy parseResponseLine fallback (lines 83-87).
Package routes_responses_ref_not_found exercises the not-found branch of the legacy parseResponseLine fallback (lines 83-87).
Package routes_responses_space_body_quirk locks the legacy parser's interpretation of `200: body Pet ...` (space-separated, NOT colon-attached `body:Pet`).
Package routes_responses_space_body_quirk locks the legacy parser's interpretation of `200: body Pet ...` (space-separated, NOT colon-attached `body:Pet`).
Package routes_responses_tagged_body exercises response lines carrying the `body:` tag with a positional description tail.
Package routes_responses_tagged_body exercises response lines carrying the `body:` tag with a positional description tail.
Package routes_responses_tagged_response exercises the explicit `response:someName` tag form.
Package routes_responses_tagged_response exercises the explicit `response:someName` tag form.
Package secyaml demonstrates that a Security requirements block written as idiomatic OpenAPI 2.0 YAML — a sequence of Security Requirement Objects — produces the spec-correct requirement set, identical to what a real YAML parse of the same text would yield.
Package secyaml demonstrates that a Security requirements block written as idiomatic OpenAPI 2.0 YAML — a sequence of Security Requirement Objects — produces the spec-correct requirement set, identical to what a real YAML parse of the same text would yield.
Package shared_parameters (Fixture 1) witnesses the spec-level shared namespace for the shared-parameters feature (go-swagger#2632): the wildcard target, both parameter reference channels, and a shared response.
Package shared_parameters (Fixture 1) witnesses the spec-level shared namespace for the shared-parameters feature (go-swagger#2632): the wildcard target, both parameter reference channels, and a shared response.
shared-parameters-conflict
pkga
Package pkga is the FIRST package of Fixture 3 (cross-package conflicts).
Package pkga is the FIRST package of Fixture 3 (cross-package conflicts).
pkgb
Package pkgb is the SECOND package of Fixture 3 (cross-package conflicts).
Package pkgb is the SECOND package of Fixture 3 (cross-package conflicts).
Package shared_parameters_overrides (Fixture 5) witnesses two caveats of the shared-parameters feature (go-swagger#2632):
Package shared_parameters_overrides (Fixture 5) witnesses two caveats of the shared-parameters feature (go-swagger#2632):
Package shared_parameters_pathitem (Fixture 2) witnesses path-item level parameters for the shared-parameters feature (go-swagger#2632): path-item inline and reference forms, an operation override on (name, in), and exact-path application (no path hierarchy).
Package shared_parameters_pathitem (Fixture 2) witnesses path-item level parameters for the shared-parameters feature (go-swagger#2632): path-item inline and reference forms, an operation override on (name, in), and exact-path application (no path hierarchy).
Package shared_parameters_prune (Fixture 6) witnesses the prune extension (C4) of the shared-parameters feature (go-swagger#2632): shared parameters/responses referenced by no operation are pruned under PruneUnusedModels, and retained without it.
Package shared_parameters_prune (Fixture 6) witnesses the prune extension (C4) of the shared-parameters feature (go-swagger#2632): shared parameters/responses referenced by no operation are pruned under PruneUnusedModels, and retained without it.
Package shared_parameters_prune_cascade witnesses the second step of the shared-parameters prune extension (C4 / P7, go-swagger#2632): pruning an unreferenced shared response also prunes the definitions reachable ONLY through it (the cascade), while definitions still reachable via a surviving shared object are kept.
Package shared_parameters_prune_cascade witnesses the second step of the shared-parameters prune extension (C4 / P7, go-swagger#2632): pruning an unreferenced shared response also prunes the definitions reachable ONLY through it (the cascade), while definitions still reachable via a surviving shared object are kept.
Package shared_parameters_yaml (Fixture 4) witnesses that the swagger:operation wholesale-YAML path runs the same shared-namespace checks: a $ref into #/parameters or #/responses is validated, and a dangling ref raises a diagnostic.
Package shared_parameters_yaml (Fixture 4) witnesses that the swagger:operation wholesale-YAML path runs the same shared-namespace checks: a $ref into #/parameters or #/responses is validated, and a dangling ref raises a diagnostic.
Package simple_schema_readonly exercises the schema builder's SimpleSchema-mode gate on the full-Schema-only `readOnly:` keyword.
Package simple_schema_readonly exercises the schema builder's SimpleSchema-mode gate on the full-Schema-only `readOnly:` keyword.
Package simple_schema_violation exercises the M1 exit validator on the parameter SimpleSchema path.
Package simple_schema_violation exercises the M1 exit validator on the parameter SimpleSchema path.
Package singlelinedesc exercises the SingleLineCommentAsDescription option: a one-line doc comment resolves to the model description instead of its title, while a multi-line comment keeps the title/description split.
Package singlelinedesc exercises the SingleLineCommentAsDescription option: a one-line doc comment resolves to the model description instead of its title, while a multi-line comment keeps the title/description split.
Package strfmt_arrays exercises strfmt handling on named array and slice types, including the byte/bsonobjectid fast paths.
Package strfmt_arrays exercises strfmt handling on named array and slice types, including the byte/bsonobjectid fast paths.
Package swaggeromit exercises `swagger:omit` — the author's escape hatch for an embed that promotes more than the API should carry (go-swagger#1992).
Package swaggeromit exercises `swagger:omit` — the author's escape hatch for an embed that promotes more than the API should carry (go-swagger#1992).
Package swagger_type_array exercises the schemaBuilder fallthrough path added by #11: when swagger:type is set to a value not recognised by swaggerSchemaForType (e.g.
Package swagger_type_array exercises the schemaBuilder fallthrough path added by #11: when swagger:type is set to a value not recognised by swaggerSchemaForType (e.g.
Package text_marshal exercises schemaBuilder.buildFromTextMarshal: a type recognised via its TextMarshaler implementation, the case-insensitive "uuid" fast-path, and a named text-marshalable type that carries a swagger:strfmt tag.
Package text_marshal exercises schemaBuilder.buildFromTextMarshal: a type recognised via its TextMarshaler implementation, the case-insensitive "uuid" fast-path, and a named text-marshalable type that carries a swagger:strfmt tag.
explicit_override
Package explicit_override exercises the precedence rule inside buildFromTextMarshal: an explicit `swagger:strfmt` annotation on a UUID-named TextMarshaler wins over the implicit UUID heuristic.
Package explicit_override exercises the precedence rule inside buildFromTextMarshal: an explicit `swagger:strfmt` annotation on a UUID-named TextMarshaler wins over the implicit UUID heuristic.
uuid_wrapping_time
Package uuid_wrapping_time documents the asymmetry between *being* `time.Time` and *wrapping* it.
Package uuid_wrapping_time documents the asymmetry between *being* `time.Time` and *wrapping* it.
Package top_level_kinds declares top-level types of every Go kind (basic, array, slice, map, interface) annotated with swagger:model so that schemaBuilder.buildFromDecl walks each non-struct case branch.
Package top_level_kinds declares top-level types of every Go kind (basic, array, slice, map, interface) annotated with swagger:model so that schemaBuilder.buildFromDecl walks each non-struct case branch.
Package unknown_annotation carries a deliberately bogus swagger annotation so the classifier returns an error from detectNodes.
Package unknown_annotation carries a deliberately bogus swagger annotation so the classifier returns an error from detectNodes.
Package unsupportedgotype carries a model with a field whose Go type cannot be represented in Swagger 2.0.
Package unsupportedgotype carries a model with a field whose Go type cannot be represented in Swagger 2.0.
Package wrapper_decl_type_override isolates Gap B' — the wrapper-type's top-level definition emits an empty schema even though the same wrapper carries `swagger:type` decoration that the classifier honours at field reference sites.
Package wrapper_decl_type_override isolates Gap B' — the wrapper-type's top-level definition emits an empty schema even though the same wrapper carries `swagger:type` decoration that the classifier honours at field reference sites.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL