-
Notifications
You must be signed in to change notification settings - Fork 29
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
Making file type an optional argument #155
Conversation
description: |- | ||
Define if input/output element is a file or a directory. It is not required | ||
that the user provide this value, but it is required that the server fill in the | ||
value once the information is avalible at run time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small typo with "avalible"
If input/output types are not mandatory, should they have a default value then? How does a default behave for an optional parameter? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure of the behaviour of the default values for optional parameters, especially in the context of generated code. I will check it with code generation.
Any feedback on your tests, @aniewielska? Intuitively I would think that handling defaults should be pretty standard for any validator and code generator based on JSON Schema... |
I think at the moment the type is still mandatory, if we leave defaults with optional. I think the spec was wrong previously in combining defaults and required. But the behaviour we want is no default. When no type of in/output is provided the implementation needs to figure it out itself and not assume it is FILE. |
Given that the accepted values are defined in an enum, the value passed for EDIT: I kinda lost track of the point here - that |
Right. So, if we cannot have null enums, I vote for adding |
No description provided.