Documentation
¶
Overview ¶
Package route holds the shared logic every framework adapter uses to turn a (method, path) route into an ir.Operation. Adapters differ only in how they enumerate routes and in their path-parameter syntax; everything downstream of that is identical, so it lives here once.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColonToBrace ¶
ColonToBrace converts router-style path params (":id", "*filepath") into the OpenAPI "{id}" form used by the IR. gin, echo and fiber all use the colon/star syntax; chi already uses braces and skips this.
func FromTemplate ¶
FromTemplate builds an ir.Operation from an HTTP method and an OpenAPI-style templated path such as "/users/{id}". Each "{name}" segment becomes a required string path parameter. Routers carry no body/query schema, so those are left empty for a schema provider (M4) to enrich later.
func StandardMethod ¶
StandardMethod reports whether m is an HTTP verb worth exposing as a tool (filters out router-internal entries and the rarely-useful TRACE/CONNECT).
Types ¶
This section is empty.