8000 Redundant Path annotation when router grouping pattern exists · Issue #4 · speakeasy-api/cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
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.
Redundant Path annotation when router grouping pattern exists #4
Open
@simplesagar

Description

@simplesagar

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0