restdocs-api-spec icon indicating copy to clipboard operation
restdocs-api-spec copied to clipboard

How to set response status description?

Open lzhoucs opened this issue 5 years ago • 4 comments

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"

lzhoucs avatar Mar 20 '19 20:03 lzhoucs

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 avatar Mar 21 '19 07:03 mduesterhoeft

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?

oleksandr-abasov avatar Nov 02 '19 11:11 oleksandr-abasov

Hey @oleksandr-abasov ,

sorry for missing this! :sweat_smile:

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 avatar Feb 18 '22 18:02 ozscheyge

Related to https://github.com/ePages-de/restdocs-api-spec/issues/177 (which expects the response description to always be the reason phrase, here it is desired to be freely configurable).

ozscheyge avatar Feb 18 '22 18:02 ozscheyge