Skip to content

[C-libcurl] Change baseName to name to escape the field name of struct#4735

Merged
wing328 merged 1 commit intoOpenAPITools:masterfrom
ityuhui:yhworking
Dec 10, 2019
Merged

[C-libcurl] Change baseName to name to escape the field name of struct#4735
wing328 merged 1 commit intoOpenAPITools:masterfrom
ityuhui:yhworking

Conversation

@ityuhui
Copy link
Contributor

@ityuhui ityuhui commented Dec 9, 2019

Change "baseName" to "name" to escape the field name of struct when it includes C programming language keyword

As described in Issue 4700
I found "baseName" cannot be escaped for the keyword, only "name" can.
I checked this part in cpp-rest-sdk-client and cpp-qt5-client, they do not use "baseName", but use "name". So I have made these code change.

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project before.
  • Run the shell script(s) under ./bin/ (or Windows batch scripts under.\bin\windows) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the code or mustache templates for a language ({LANG}) (e.g. php, ruby, python, etc).
  • File the PR against the master: master, 4.3.x, 5.0.x. Default: master.
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

@wing328 @PowerOfCreation @zhemant

@ityuhui ityuhui marked this pull request as ready for review December 10, 2019 01:25
@ityuhui ityuhui changed the title change baseName to name to escape the field name of struct when it in… [C-libcurl] Change baseName to name to escape the field name of struct when it in… Dec 10, 2019
@wing328 wing328 added this to the 4.2.3 milestone Dec 10, 2019
@wing328
Copy link
Member

wing328 commented Dec 10, 2019

Right, let's go with name instead of baseName but we may need to provide an option to let people choose or we need to implement better serialization between property name in the C client (e.g. created_by) and the JSON key name (e.g. created-by).

@wing328 wing328 merged commit 00abb47 into OpenAPITools:master Dec 10, 2019
@ityuhui ityuhui deleted the yhworking branch December 10, 2019 08:43
@wing328 wing328 changed the title [C-libcurl] Change baseName to name to escape the field name of struct when it in… [C-libcurl] Change baseName to name to escape the field name of struct Jan 31, 2020
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