Versions in this module Expand all Collapse all v0 v0.0.2 Dec 20, 2023 Changes in this version + const DescriptionAttr + const TitleAttr + var StructFieldTypeMap = map[string]*SpecField + type CommentRegistry struct + func NewCommentRegistry() *CommentRegistry + func (c *CommentRegistry) Load(pkgs ...*packages.Package) + func (c *CommentRegistry) Lookup(key string) string + type MetadataParser struct + func NewMetadataParser() *MetadataParser + func (o *MetadataParser) ParseStructDesc(desc string) StructMetadata + type SpecField struct + func NewArraySpecField(itemsType SpecType) *SpecField + func NewSpecField(baseType SpecType) *SpecField + func NewSpecFieldWithFormat(baseType SpecType, format string) *SpecField + func NewStructSpecField(ref string) *SpecField + func (s *SpecField) BaseType() SpecType + func (s *SpecField) IsValid() bool + func (s *SpecField) SetFormat(format string) + func (s *SpecField) SetItemsType(itemsType SpecType) + func (s *SpecField) SetRef(ref string) + func (s *SpecField) ToSchemaProp(description string) spec.SchemaProps + type SpecType string + const ArrayType + const BooleanType + const IntegerType + const NumberType + const ObjectType + const StringType + const StructType + const TimeFormat + func (s SpecType) String() string + type StructMetadata map[string]string + func (s StructMetadata) Lookup(key string, _default string) string + type TargetField struct + func NewTargetField(packageID string, structName string, fieldTag string, fieldName string) *TargetField + func (t *TargetField) AdditionalProperties() *SpecField + func (t *TargetField) CanonicalFieldName(structTag string) string + func (t *TargetField) Elem() types.Type + func (t *TargetField) HasAdditionalProperties() bool + func (t *TargetField) ID() string + func (t *TargetField) IsAdditionalProperties() bool + func (t *TargetField) IsArrayType() bool + func (t *TargetField) SetAdditionalProperties(additionalProperties *SpecField) + func (t *TargetField) SetElem(elem types.Type) + func (t *TargetField) SetIsAdditionalProperties() + func (t *TargetField) SetIsArrayType() + func (t *TargetField) SetSpecField(specField *SpecField) + func (t *TargetField) SpecField() *SpecField + func (t *TargetField) UnderlyingElem() types.Type + type TargetStruct struct + func NewTargetStruct(name string, origType types.Type, origStruct *types.Struct) *TargetStruct + func (t *TargetStruct) ID() string + func (t *TargetStruct) IsNamedType() bool + func (t *TargetStruct) Name() string + func (t *TargetStruct) OriginalStruct() *types.Struct + func (t *TargetStruct) OriginalType() types.Type + func (t *TargetStruct) ToNamedType() *types.Named + type TargetType struct + func NewTargetType(name string, origObj types.Object) *TargetType + func (t *TargetType) IsNamedType() bool + func (t *TargetType) IsStruct() bool + func (t *TargetType) IsValid() bool + func (t *TargetType) ToNamedType() *types.Named + func (t *TargetType) ToTargetStruct() *TargetStruct