Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultEndpointToolName ¶
DefaultEndpointToolName synthesises an MCP tool name from an entity + method + path triple. Used as a fallback when an Endpoint doesn't supply an explicit MCPName.
func EntityEndpointPath ¶
EntityEndpointPath builds the absolute URL path for a custom Endpoint declared on an entity. Relative paths are joined under the entity's table; absolute paths pass through. ":id"-style params are converted to "{id}".
func EntityOpenAPI ¶
func EntityOpenAPI(registry entity.Registry, title, version string, basePath ...string) *openapi.Spec
EntityOpenAPI generates a full OpenAPI Spec from all registered entities. It produces:
- Schema components for each entity with typed fields
- CRUD paths (GET, POST, PUT, DELETE) with request/response schemas
- List endpoint with pagination parameters
- Proper error response schemas
EntityOpenAPI builds the spec for every registered entity. An optional basePath (e.g. "/api", from AppConfig.APIPrefix) is expressed as the server URL so the documented paths match where the routes actually mount — the per-path keys stay relative (e.g. "/posts"), and clients prepend the server.
Types ¶
This section is empty.