This repository was archived by the owner on Sep 29, 2022. It is now read-only.
This repository was archived by the owner on Sep 29, 2022. It is now read-only.
Open
Description
Slack: https://speakeasyapi.slack.com/archives/C03BEMS60GZ/p1651184009523929
For Speakeasy, we need to annotate each handler with // @Router /v1/endpoint/path_a [post]
. However, we already have this information because each of our routes has a Pattern
with the same information
router.Route{
Name: "name of handler",
Method: http.MethodPost,
Pattern: "/v1/endpoint/path_a",
APIHandler: apiApp.Handler,
},
It would reduce redundant dev work if we didn't need to have the extra annotations in both places
Acceptance Criteria:
- Code parser should recognise the presence of a route grouping and automatically infer path information