restdocs-api-spec
restdocs-api-spec copied to clipboard
How to set response status description?
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"
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.
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?
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
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).