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

How to set response status description? #83

Open
lzhoucs opened this issue Mar 20, 2019 · 4 comments
Open

How to set response status description? #83

lzhoucs opened this issue Mar 20, 2019 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@lzhoucs
Copy link
Contributor

lzhoucs commented Mar 20, 2019

I couldn't seem to find a way to set response status description. It is currently always using the status code by default:

responses:
        200:
          description: "200"
        400:
          description: "400"
@mduesterhoeft
Copy link
Contributor

At the moment this is not implemented. But feel free to give it a try. We could add such a description to ResourceSnippetParameters - https://github.com/ePages-de/restdocs-api-spec/blob/master/restdocs-api-spec/src/main/kotlin/com/epages/restdocs/apispec/ResourceSnippetParameters.kt#L17

And in turn make use of it when generating the openApi specification.

@mduesterhoeft mduesterhoeft added help wanted Extra attention is needed good first issue Good for newcomers enhancement New feature or request labels Mar 21, 2019
@oleksandr-abasov
Copy link
Contributor

oleksandr-abasov commented Nov 2, 2019

Hi, @mduesterhoeft , @ozscheyge
please find the forked project and branch where I've added the status description:
https://github.com/axkb/restdocs-api-spec/tree/status_description
Hope it will be added

Don't have the permissions to commit in your branches to create a PR
Is there any chance to receive perms, just to have an ability to create PRs from branches for such changes?

@jmewes jmewes added good first issue Good for newcomers help wanted Extra attention is needed and removed help wanted Extra attention is needed good first issue Good for newcomers labels Feb 14, 2022
@ozscheyge
Copy link
Contributor

Hey @oleksandr-abasov ,

sorry for missing this! 😅

You can issue PRs from your branch on your fork towards this repository by changing the "base" branch to ePages-de:master in GitHub UI.

GitHub docs:
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request

@ozscheyge
Copy link
Contributor

Related to #177 (which expects the response description to always be the reason phrase, here it is desired to be freely configurable).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants