-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
Milestone
Description
When endpoint is multipart/form-data and contains both form params and query params, like this one
/profile/{id}/photo:
post:
operationId: addProfilePhoto
consumes:
- multipart/form-data
parameters:
- name: id
in: path
required: true
type: string
- name: file
in: formData
required: true
type: file
minLength: 1
maxLength: 10000000 # ~10MB
- name: attachmentType
in: query
type: string
required: true
- name: utf8FileName
in: query
type: string
required: true
Resulting code has double "falsefalse" argument in
return requestBuilder.init(method: "POST", URLString: URLString, parameters: parameters, isBody: falsefalse)I have found mustache template for this:
isBody: {{^queryParams}}{{^formParams}}true{{/formParams}}{{/queryParams}}{{#queryParams}}{{^secondaryParam}}false{{/secondaryParam}}{{/queryParams}}{{#formParams}}{{^secondaryParam}}false{{/secondaryParam}}{{/formParams}}and probably end up with PR to fix :) Any suggestions are welcome, however :)
One thing I'd like to learn is what is "secondaryParam"?