Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIModel ¶
type APIModel struct {
openapi3.T
// RouteGraph represents the routing tree of the API.
RouteGraph *RouteNode
// GroupMetadata holds metadata from .Meta() calls.
GroupMetadata GroupMetadataMap
}
APIModel is the top-level container for the entire discovered API.
type GroupMetadataMap ¶ added in v0.2.2
type GroupMetadataMap map[types.Object]*respec.GroupBuilder
GroupMetadataMap is defined here to be shared across packages.
type Operation ¶
type Operation struct {
// HTTPMethod is the HTTP method of the API endpoint (e.g., GET, POST, PUT, DELETE).
HTTPMethod string
// FullPath is the full path of the API endpoint.
FullPath string
// HandlerPackage is the package name of the handler function.
HandlerPackage string
// HandlerName is the name of the handler function.
HandlerName string
// GoHandler holds a reference to the Go handler function.
GoHandler types.Object
// HandlerMetadata holds metadata from the fluent builder.
HandlerMetadata *respec.HandlerMetadata
// Spec is the OpenAPI specification of the API endpoint.
Spec *openapi3.Operation
}
Operation represents a single API endpoint (e.g., GET /users/{id}).
type RouteNode ¶
type RouteNode struct {
// GoVar holds a reference to the Go variable for this router/group.
GoVar types.Object
// PathPrefix is the path prefix of the current routing scope.
PathPrefix string
// Parent is the parent node in the routing tree.
Parent *RouteNode
// Children are the child nodes in the routing tree.
Children []*RouteNode
// Operations are the API endpoints in the current routing scope.
Operations []*Operation
// InferredSecurity holds the names of security schemes inferred from middleware.
InferredSecurity []string
// Tags holds tags from .Meta() calls for hierarchical application.
Tags []string
// Deprecated marks whether this entire node and its children are deprecated.
Deprecated bool // <-- ADDED
}
RouteNode represents a single routing scope (a router or a group).
Click to show internal directories.
Click to hide internal directories.