Created by: f-f
PR checklist
-
Read the contribution guidelines. -
Ran the shell script under ./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
,./bin/openapi3/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
. -
Filed the PR against the correct branch: master
,. Default:3.4.x
,4.0.x
master
. -
Copied the technical committee to review the pull request if your PR is targeting a particular programming language.
Description of the PR
This reverts the change from #1850, as that patch broke the generator for our APIs.
In fact, after updating to upstream our service wanted to parse the following JSON:
[
{
"subscriptionStartDate": "2016-07-22",
"subscriptionEndDate": "2016-07-22",
}
]
..as this, which doesn't look correct:
[
{
"subscription*tDate": "2016-07-22",
"subscriptionEndDate": "2016-07-22",
}
]
The change was motivated as "a dependency upstream changed", but the only dependency involved here is text
, and the signature of Data.Text.replace
didn't change since the last time I updated this piece of code (version was 1.2.3.0
, now we're at 1.2.3.1
)
Also it looks like the change started to ignore the quote ('
) before the symbols to replace, which is purposefully there, so that the special characters are substituted only for name mangling, and not in every case as it happens here.
So this makes me guess that this was just a misunderstanding of the meaning of that code, so I added a comment on top of the function to explain better what's going on in there.
/cc @wing328 @jonschoning @algas @Drezil