Skip to content
This repository has been archived by the owner on Sep 29, 2022. It is now read-only.

Redundant Path annotation when router grouping pattern exists #4

Open
simplesagar opened this issue Apr 29, 2022 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@simplesagar
Copy link
Member

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
@simplesagar simplesagar added the enhancement New feature or request label Apr 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant