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

Expose more description information #9

Open
dim opened this issue Apr 28, 2021 · 0 comments
Open

Expose more description information #9

dim opened this issue Apr 28, 2021 · 0 comments

Comments

@dim
Copy link
Member

dim commented Apr 28, 2021

See https://github.com/ruby-grape/grape/blob/master/lib/grape/dsl/desc.rb. We should expose:

  • headers - HTTP headers this method can accept
  • hidden - hide endpoint from doc if set
  • deprecated
  • produces + consumes - MIME types
  • http_codes - we should expose this
  • entity - please note that success is now just an alias, we should use entity instead

Here's an idea on format:

### `GET /resources`

Description first, append a period unless `ends_with?(/[[:punct:]]/)`.

- **Status**: **DEPRECATED**
- **Resource**: Array of [Mock:Foo](#mock-foo)
- **Security**: `required=["foo/bar.baz", "foo/bar.qux"]`

**Content Types**:

- **Consumes**: `application/json`, `application/yaml`
- **Produces**: `application/json`, `application/pdf`

**Headers**:

- **X-Auth-Token**: Validates your identity (required)
- **Per-Page**: number of items per page

**Params**:

| Field                | Type       | Description                              |
| -------------------- | ---------- | ---------------------------------------- |

Omit sections if there's no informations about the,

@mxmCherry mxmCherry removed their assignment May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants