Skip to content

[Cpprest C++] Added support for datetime query parameters#4556

Merged
wing328 merged 2 commits intoswagger-api:masterfrom
genechang:master
Jan 13, 2017
Merged

[Cpprest C++] Added support for datetime query parameters#4556
wing328 merged 2 commits intoswagger-api:masterfrom
genechang:master

Conversation

@genechang
Copy link
Copy Markdown
Contributor

Signed-off-by: Gene Chang gene.chang@anyconnect.com

PR checklist

  • Read the contribution guildelines.
  • Ran the shell/batch script under ./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)
  • Filed the PR against the correct branch: master for non-breaking changes and 2.3.0 branch for breaking (non-backward compatible) changes.

Description of the PR

Added an overload in apiclient-header.mustache and apiclient-source.mustache files to parameterToString for utility:datetime. It will use datetime.to_string to convert to ISO_8601. This was tested by generating code from our swagger and verifying the datetime object is properly converted to a URL for the GET request on the server.

Signed-off-by: Gene Chang <gene.chang@anyconnect.com>
@wing328
Copy link
Copy Markdown
Contributor

wing328 commented Jan 13, 2017

@genechang thanks for the PR. Please run ./bin/cpprest-petstore.sh so as to update the Petstore sample up-to-date.

Signed-off-by: Gene Chang <gene.chang@anyconnect.com>
@genechang
Copy link
Copy Markdown
Contributor Author

@wing328 Just ran the script and updated the pull request. Let me know what else you need me to do. Thanks.

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

wing328 commented Jan 13, 2017

(linked to #4549)

@wing328
Copy link
Copy Markdown
Contributor

wing328 commented Jan 13, 2017

@genechang thanks for the PR, which has been merged into master.

(we've just added Swagger Codegen to ProductHunt: https://www.producthunt.com/posts/swagger-codegen, pleae upvote if you found Swagger Codegen useful)

@wing328 wing328 merged commit 95987fc into swagger-api:master Jan 13, 2017
@wing328 wing328 changed the title Added support for datetime query parameters in cpprest [Cpprest C++] Added support for datetime query parameters Feb 20, 2017
davidgri pushed a commit to davidgri/swagger-codegen that referenced this pull request May 11, 2017
)

* Added support for datetime query parameters in cpprest

Signed-off-by: Gene Chang <gene.chang@anyconnect.com>

* Update petstore sample app for cpprest using bin/cpprest-petstore.sh

Signed-off-by: Gene Chang <gene.chang@anyconnect.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants