-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Fix isPrimitiveType
for file property
#4421
Conversation
@@ -3309,7 +3309,8 @@ public void setParameterBooleanFlagWithCodegenProperty(CodegenParameter paramete | |||
parameter.isPrimitiveType = true; | |||
} else if (Boolean.TRUE.equals(property.isFile)) { | |||
parameter.isFile = true; | |||
parameter.isPrimitiveType = true; | |||
// file is *not* a primitive type |
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 confused with the term primitive
. (I did not notice additional
.)
An additional primitive data type "file" is used by the Parameter Object and the Response Object to set the parameter type or the response as being a file.
from http://swagger.io/specification/#data-types-12
To clarify, I want to know whether additional primitive data type
is isPrimitiveType
or not.
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.
To clarify, I want to know whether additional primitive data type is isPrimitiveType or not.
@www2k we've been treating isFile
as a non-primitive type (which means isPrimitiveType
set to false). It's definitely arguable as you've pointed out the following:
An additional primitive data type "file" is used by the Parameter Object and the Response Object to set the parameter type or the response as being a file.
What I noticed is that some mustache values rely on isFile
set to true and isPrimitiveType
set to false. My take is to keep the old logic and to revise it with a valid use case in 2.3.0
branch.
Does your enhancement rely on both isFile
and isPrimitiveType
set to true?
Fix `isPrimitiveType` for file property
* Merge branch 'www2k-feature/file-response' * Merge pull request #4421 from wing328/fix_isfile_boolean Fix `isPrimitiveType` for file property * roll back to latest working version of swagger paresr for codegen * enable typescript-angular2 to upload file * update typescript-angular2 samples
Fix `isPrimitiveType` for file property
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)2.3.0
branch for breaking (non-backward compatible) changes.Description of the PR
To fix #4420
cc @www2k