Skip to content

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

Open
@sevenseacat

Description

@sevenseacat

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

Activity

changed the title [-]Cae[/-] [+]Can't provide descriptions for routes at the route level [/+] on Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Soon

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @sevenseacat@zachdaniel

        Issue actions

          Can't provide descriptions for routes at the route level · Issue #202 · ash-project/ash_json_api