named_basic

package
v0.36.2 Latest Latest
Warning

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

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

Documentation

Overview

Package named_basic exercises the schemaBuilder.buildNamedBasic branches for named basic types carrying swagger:strfmt, swagger:type and swagger:default annotations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Colour

type Colour int

Colour is a named int whose representation is overridden via swagger:type so the scanner emits it as a string instead of an integer.

swagger:type string

type Email

type Email string

Email is a named string with a swagger:strfmt tag. The scanner must emit {"type": "string", "format": "email"} via the strfmt branch.

swagger:strfmt email

type Grade

type Grade int

Grade is a named int tagged with swagger:default which causes the scanner to emit an empty schema for the declared type.

swagger:default Grade

type User

type User struct {
	// required: true
	ID int64 `json:"id"`

	Email Email `json:"email"`

	Colour Colour `json:"colour"`

	Grade Grade `json:"grade"`
}

User embeds the three named basic types above so that the full scan walks buildNamedBasic for each field.

swagger:model User

Jump to

Keyboard shortcuts

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