Skip to content
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

Query Parameter missing in swift 3 export #4536

Closed
Vario opened this issue Jan 10, 2017 · 12 comments
Closed

Query Parameter missing in swift 3 export #4536

Vario opened this issue Jan 10, 2017 · 12 comments

Comments

@Vario
Copy link

Vario commented Jan 10, 2017

Description

We have a swagger definition with a PUT Request which contains a Body DTO with properties to update, header parameters and path parameters and one query parameter.

the parameter is in the method definition updateXXXUsingPUTWithRequestBuilder but it is not used in the code and not appended to the url..

Swagger-codegen version

2.2.2

Steps to reproduce

i assume, generating a PUT request with body, header, path and query parameters with swift 3 template

in the generated code there is this part missing
var path = "//path**?queryparametername={queryparametervalue}**"
path = path.replacingOccurrences(of: "{queryparametervalue}", with: "(queryparametervalue)", options: .literal, range: nil)

@wing328 wing328 added this to the v2.2.2 milestone Jan 12, 2017
@tomekc
Copy link
Contributor

tomekc commented Jan 13, 2017

Can you share a fragment of spec? I think I can look into it.

@tomekc
Copy link
Contributor

tomekc commented Jan 13, 2017

Did you try latest version from master? I addressed this issue (query parameters are ignored when making POST with request body) and it has been merged in #4490

@Vario
Copy link
Author

Vario commented Jan 13, 2017

Which fragment do you need from the spec? i dont know why but i cant load the master project on my machine. do you have a .jar file which i can test with my spec?

@wing328
Copy link
Contributor

wing328 commented Jan 15, 2017

@Vario what error did you get when building the project locally?

@Vario
Copy link
Author

Vario commented Jan 19, 2017

actually i'm getting stuck loading the project, the entire project is empty.

@wing328
Copy link
Contributor

wing328 commented Jan 19, 2017

@Vario you may want to try git clone https://github.com/swagger-api/swagger-codegen.git again in a new directory to see if that makes any difference.

@tomekc
Copy link
Contributor

tomekc commented Jan 19, 2017

@Vario were you trying to load project in IDE? Why not trying command line. Checkout as @wing328 say, then enter the project directory in Terminal,

mvn package

and then

java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar

should run your newly built swagger-codegen.

@Vario
Copy link
Author

Vario commented Jan 19, 2017

okay, i got the new jar file, but the query parameters are still missing. they are listed in the method description above as query but in the var path= "/url..../ nothing like ?parameter={value} can be seen or is used in the code below.

@tomekc
Copy link
Contributor

tomekc commented Jan 19, 2017

Can you share swagger specification (YAML preferred) of the method you want code generated? Rename things if you need, just want to make sure we are on the same page.

@Vario
Copy link
Author

Vario commented Jan 19, 2017

problem solved, i updated the jar file, but not the templates, and 4 days ago a commit changed them to include query parameters. this issue is solved!

@wing328
Copy link
Contributor

wing328 commented Jan 20, 2017

Glad to hear that it's now resolved.

@wing328 wing328 closed this as completed Jan 20, 2017
@wing328
Copy link
Contributor

wing328 commented Jan 20, 2017

Thanks @tomekc for addressing this issue.

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

No branches or pull requests

3 participants