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 can I add a description for a Header' '[Required, Strict] #122

Open
Gau-thier opened this issue Jul 29, 2020 · 2 comments
Open

How can I add a description for a Header' '[Required, Strict] #122

Gau-thier opened this issue Jul 29, 2020 · 2 comments

Comments

@Gau-thier
Copy link

Gau-thier commented Jul 29, 2020

In our APIs, we have one header which is declared as required because it is automatically added by our API Management.

Since none of the request will be done directly to our endpoint (100% pass through API Management), we find this confusing for our clients to have this header as required in our Swagger.
We would like to add a description like:

added by API Management, do not care

Moreover, as we do not control anything on this header, it cannot be invalid:
image

should be hidden (or even not generated).

Thanks!

@sir4ur0n
Copy link

Though this feature is not well documented (in my opinion 😄 ), you can add a description to pretty much everything, usually by using the more generic ' version, which allows to pass a Description:

QueryParam' '[Required, Strict, Description "My description!"] "foobar"

image

Capture' '[Description "My description!"] "foobar"

image

Header' '[Required, Strict, Description "My description!"] "foobar"

image

@akhesaCaro
Copy link
Contributor

Hi,
Servant-swagger will be moved into the main Servant repo (see : haskell-servant/servant#1475)
If this issue is still relevant, would it be possible for you to summit it there? : https://github.com/haskell-servant/servant/issues

Thanks in advance!

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

3 participants