bug1635

package
v0.36.3 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NamedSetPosition

func NamedSetPosition()

NamedSetPosition uses the named-Body-field params (guard rail).

swagger:route POST /position-named things namedSetPosition

Set position (named).

Responses:
  200: description: ok

func SetPosition

func SetPosition()

SetPosition uses the anonymous-embed body params.

swagger:route POST /position things setPosition

Set position.

Responses:
  200: description: ok

Types

type NamedBodyParams

type NamedBodyParams struct {
	// in: body
	Body PositionResponseBody
}

NamedBodyParams is the recommended form (a named Body field) — a green guard rail showing the correct single body parameter is produced.

swagger:parameters namedSetPosition

type NamedBodyResponse

type NamedBodyResponse struct {
	// in: body
	Body PositionResponseBody
}

NamedBodyResponse is the recommended form (a named Body field) — included as a green guard rail showing the correct object schema is produced.

swagger:response namedBodyResponse

type PositionParams

type PositionParams struct {
	// in: body
	PositionResponseBody
}

PositionParams anonymously embeds a named body struct marked in:body. This is the parameters counterpart of #1635: the embed IS the single body parameter (schema $ref'ing the embedded struct), not one body param per promoted field (which would be invalid — an operation allows at most one body parameter).

swagger:parameters setPosition

type PositionResponse

type PositionResponse struct {
	// in: body
	PositionResponseBody
}

PositionResponse embeds a NAMED body struct anonymously with in:body. This is the #1635 case: the body should be the embedded struct's object schema (or a $ref), but the scanner emits schema {type: string}.

swagger:response positionResponse

type PositionResponseBody

type PositionResponseBody struct {
	// X Position
	Positionx string `json:"positionx"`
	// Y Position
	Positiony string `json:"positiony"`
}

PositionResponseBody is the named body struct.

Jump to

Keyboard shortcuts

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