Hi Ron,
Thanks for the clarification. 

Manchun

On Monday, April 24, 2017 at 1:35:28 PM UTC-7, Ron wrote:
>
> There’s nothing to be generated in the client for default values.
>
> It just means that if the client doesn’t send the value, the default value 
> will be used by the server.
>
>  
>
> If the generated client had sent the default value because it’s default, 
> that would defeat the purpose of having a default value.
>
>  
>
>  
>
>  
>
> *From: *<[email protected] <javascript:>> on behalf of 
> Manchun Zheng <[email protected] <javascript:>>
> *Reply-To: *"[email protected] <javascript:>" <
> [email protected] <javascript:>>
> *Date: *Monday, 24 April 2017 at 11:57
> *To: *Swagger <[email protected] <javascript:>>
> *Subject: *swagger-codegen default value of parameter doesn't work
>
>  
>
> Hi I'm using swagger-codegen v2.2.2 to generate python client for my 
> server. 
>
> It seems that the default value of a parameter in the specification is 
> always ignored by the generator.
>
>  
>
> A part of my spec is shown below, the default value of "overwrite" is set 
> to true but when I generate the code, it never gets set.
>
>  
>
> put:
>
>       tags:
>
>         - AccessFile
>
>       summary: writes to a file
>
>       description: writes to a file with a string input
>
>       operationId: write_file
>
>       produces:
>
>         - application/json
>
>         - application/xml
>
>       parameters:
>
>         - name: data
>
>           in: body
>
>           description: the data to write to the file
>
>           schema: 
>
>             type: string
>
>           required: true
>
>         - name: overwrite
>
>           in: query
>
>           type: boolean
>
>           description: overwrite or not?
>
>           default: true
>
>  
>
> Is this a bug of swagger-codegen or do I miss anything here?
>
>  
>
> Thanks & Best Regards,
>
> Manchun
>
>  
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to