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
}
APIModel is the top-level container for the entire discovered API.
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
// BuilderMetadata holds metadata from the fluent builder.
BuilderMetadata *respec.Builder
// 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
}
RouteNode represents a single routing scope (a router or a group).
Click to show internal directories.
Click to hide internal directories.