-
Notifications
You must be signed in to change notification settings - Fork 58
test generation for xml mediatype converting body to json to check schema #168
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
I signed it! |
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
I just changed the email of the user commiter |
CLAs look good, thanks! |
lib/helpers.js
Outdated
@@ -77,6 +80,23 @@ function isJsonMediaType(type, options) { | |||
return mediaTypeContainsJson(type) ? options.fn(this) : options.inverse(this); | |||
} | |||
|
|||
/** | |||
* mustache helper method to determine if a mediaType is JSON |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This description is a copy and paste of another function
lib/helpers.js
Outdated
} | ||
|
||
/** | ||
* mustache helper method to determine if a mediaType is JSON |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This description is a copy and paste of another function
sorry, I just changed it and amended |
I just added the possibility of setting a config for the module xml2js through the config param of the gentest function |
8983784
to
38d1a79
Compare
c93b2d3
to
4971554
Compare
Hey @SrHuevo I'm sorry but I've merged a couple of other changes and now there are some merge conflicts. Furthermore, some of the CI checks failed. The checks are just running If you are willing to resolve the conflicts and fix the tests, I'd still appreciate your contribution. Thank you. |
I need to validate the body response when the response produces a XML mime type.
To do this, I transform the xml body response to json with xml2js module and I validate against the json scheme generated for swagger definition. In the same way that it was done when it was a json mime type.
I have added tests for check this feature (test/xmlConsumeTypeTest)