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

Print warning for optional path parameters #46

Closed
bajtos opened this issue Jun 14, 2016 · 2 comments
Closed

Print warning for optional path parameters #46

bajtos opened this issue Jun 14, 2016 · 2 comments

Comments

@bajtos
Copy link
Member

bajtos commented Jun 14, 2016

Path parameters (remote "accepts" arguments mapped with { http: { source: 'path' } } are optional by default. At the moment, Swagger does not support optional path parameters (see OAI/OpenAPI-Specification#93).

This constraint is not clear to novice users. When they create remote methods with path parameters and don't pay attention to the required flag, they will end up with invalid swagger that's difficult to troubleshoot.

I'd like loopback-swagger to print a helpful warning explaining the users what's wrong and how to fix it when an optional path parameter is encountered.

Another option is to change loopback-swagger to always mark path parameters as required. However, I think it may close our future options for re-introducing optional path parameters again, which is something that was already requested by LoopBack users.

@stale
Copy link

stale bot commented Aug 23, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot closed this as completed Sep 6, 2017
@stale
Copy link

stale bot commented Sep 6, 2017

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants