model

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

Overview

Package model reproduces go-swagger issue #3107 ("No struct definition in swagger generate"): under `generate spec -m`, MyStruct was emitted as an empty definition carrying only `x-go-package`, with its fields dropped. The model lives in its own package, referenced cross-package by the api package's response body, so the fix must resolve the type through the import graph rather than only from directly-scanned files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MyStruct

type MyStruct struct {
	Field1 string `json:"field1" binding:"required"`
	Field2 string `json:"field2" binding:"required"`
}

swagger:model MyStruct

Jump to

Keyboard shortcuts

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