Skip to content

ParameterDescriptor should allow optional() declaration #169

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

Closed
nebhale opened this issue Nov 18, 2015 · 3 comments
Closed

ParameterDescriptor should allow optional() declaration #169

nebhale opened this issue Nov 18, 2015 · 3 comments
Labels
type: enhancement Enhancement that adds a new feature
Milestone

Comments

@nebhale
Copy link

nebhale commented Nov 18, 2015

Currently, the ParameterDescriptor does not allow an optional() descriptor. This makes it difficulty to document parameters that are not required, and do not exist in the current example. The ParameterDescriptor should be able to be declared optional.

@wilkinsona
Copy link
Member

I thought this was going to be annoyingly hard to change due to the ParameterDescriptor being shared between path parameters and request parameters as optional path parameters seemed a bit strange. However, it would appear that JAX-RS supports them so it makes sense for REST Docs to be able to document them as I don't want REST Docs to restrict people's API design unnecessarily, however strange I think it may be.

@wilkinsona wilkinsona added the type: enhancement Enhancement that adds a new feature label Nov 19, 2015
@wilkinsona wilkinsona added this to the 1.1.0.M1 milestone Nov 19, 2015
@wilkinsona wilkinsona modified the milestones: 1.1.0 backlog, 1.1.0.M1 Dec 10, 2015
@wilkinsona wilkinsona modified the milestones: 1.1.0.RC1, 1.1.0 backlog Feb 16, 2016
@adamdec
Copy link

adamdec commented Mar 19, 2016

Let me work on that if you do not mind.

@wilkinsona
Copy link
Member

@adamdec How's it going?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Enhancement that adds a new feature
Projects
None yet
Development

No branches or pull requests

3 participants