Skip to content
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.

body params always required #106

Closed
timruffles opened this issue Apr 1, 2014 · 3 comments
Closed

body params always required #106

timruffles opened this issue Apr 1, 2014 · 3 comments

Comments

@timruffles
Copy link

why? Doesn't make any sense to me.

@webron
Copy link
Contributor

webron commented Apr 1, 2014

This is the current definition of swagger-spec with the assumption that if an operation expects a body, then it's mandatory. This does not mean the body cannot be empty should the model definition allow it.

If you feel strongly that this should not be this way, feel free to open an issue on swagger-spec if you feel strongly that it should be different, but please include a use case for your suggestion.

@fehguy
Copy link
Contributor

fehguy commented Oct 31, 2014

@webron i actually don't think that's true, body params should be optional:

https://github.com/swagger-api/swagger-spec/blob/master/versions/1.2.md#524-parameter-object

The fix is easy, but to avoid breaking the signature, i'm going to append the required variable to the end of the chain :-/

fehguy added a commit that referenced this issue Oct 31, 2014
@fehguy fehguy closed this as completed Oct 31, 2014
@webron
Copy link
Contributor

webron commented Oct 31, 2014

@fehguy - I believe it was an April fool's joke. That's the only explanation I can think as to why I made that statement as it is obviously wrong and we both know that doesn't make sense when it comes to me.

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

No branches or pull requests

3 participants