Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't provide descriptions for routes at the route level #202

Open
sevenseacat opened this issue Jul 6, 2024 · 0 comments
Open

Can't provide descriptions for routes at the route level #202

sevenseacat opened this issue Jul 6, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@sevenseacat
Copy link
Contributor

sevenseacat commented Jul 6, 2024

Is your feature request related to a problem? Please describe.
When documenting API endpoints, most will pull from descriptions in the actions they call, eg.

    read :search do
      description "List Artists, optionally filtering by name."

But some endpoints need more specific documentation, eg. get routes, which would usually point at a generic read action. And some endpoints, like related/relationship endpoints, can't be documented at all?

Describe the solution you'd like
A description option added for all routes, that if provided would be used in generated documentation, overriding any action-specific description.

Express the feature either with a change to resource syntax, or with a change to the resource interface

    routes do
      base_route "/artists", Tunez.Music.Artist do
        get :read, description: "Fetch an Artist record by ID."
        related :albums, :read, primary?: true, description: "Fetch all Albums released by the given Artist."
      end
@sevenseacat sevenseacat added enhancement New feature or request needs review labels Jul 6, 2024
@sevenseacat sevenseacat changed the title Cae Can't provide descriptions for routes at the route level Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants