Documentation
¶
Index ¶
- Variables
- func BodyTypable(in string, schema *oaispec.Schema, skipExt bool) (ifaces.SwaggerTypable, *oaispec.Schema)
- type Builder
- func (s *Builder) Build(definitions map[string]oaispec.Schema) error
- func (s *Builder) BuildFromType(tpe types.Type, tgt ifaces.SwaggerTypable) error
- func (s *Builder) InferNames()
- func (s *Builder) PostDeclarations() []*scanner.EntityDecl
- func (s *Builder) SetDiscovered(discovered []*scanner.EntityDecl)
- type Typable
- func (st Typable) AddExtension(key string, value any)
- func (st Typable) AdditionalProperties() ifaces.SwaggerTypable
- func (st Typable) In() string
- func (st Typable) Items() ifaces.SwaggerTypable
- func (st Typable) Level() int
- func (st Typable) Schema() *oaispec.Schema
- func (st Typable) SetRef(ref oaispec.Ref)
- func (st Typable) Typed(tpe, format string)
- func (st Typable) WithEnum(values ...any)
- func (st Typable) WithEnumDescription(desc string)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSchema = errors.New("codescan:builders:schema")
ErrSchema is the sentinel error for all errors originating from the schema builder package.
Functions ¶
func BodyTypable ¶
Types ¶
type Builder ¶
func NewBuilder ¶
func NewBuilder(ctx *scanner.ScanCtx, decl *scanner.EntityDecl) *Builder
func (*Builder) BuildFromType ¶
func (*Builder) InferNames ¶
func (s *Builder) InferNames()
func (*Builder) PostDeclarations ¶
func (s *Builder) PostDeclarations() []*scanner.EntityDecl
func (*Builder) SetDiscovered ¶
func (s *Builder) SetDiscovered(discovered []*scanner.EntityDecl)
type Typable ¶
type Typable struct {
// contains filtered or unexported fields
}
func (Typable) AddExtension ¶
func (Typable) AdditionalProperties ¶
func (st Typable) AdditionalProperties() ifaces.SwaggerTypable
func (Typable) Items ¶
func (st Typable) Items() ifaces.SwaggerTypable
func (Typable) WithEnumDescription ¶
Click to show internal directories.
Click to hide internal directories.