Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var KnownRouters = map[string]string{
"github.com/gin-gonic/gin": "New",
"github.com/go-chi/chi/v5": "NewRouter",
"net/http": "NewServeMux",
}
KnownRouters defines the constructor functions for popular routers. The key is the package path, the value is the function name.
Functions ¶
This section is empty.
Types ¶
type Analyzer ¶
type Analyzer struct {
// contains filtered or unexported fields
}
Analyzer holds the state for a single analysis run.
type ParsedComment ¶
ParsedComment holds the structured data extracted from a doc comment.
type SchemaGenerator ¶
type SchemaGenerator struct {
// contains filtered or unexported fields
}
SchemaGenerator holds state for schema generation, like a cache for already-generated types.
func NewSchemaGenerator ¶
func NewSchemaGenerator() *SchemaGenerator
func (*SchemaGenerator) GenerateSchemaRef ¶
func (sg *SchemaGenerator) GenerateSchemaRef(typeObj types.Type) *openapi3.SchemaRef
GenerateSchemaRef creates a JSON Schema for a given Go type and adds it to the component map. It returns a reference to the schema.
Click to show internal directories.
Click to hide internal directories.