You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 and ./bin/security/{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, 3.4.x, 4.0.x. Default: master.
This PR adds the model XmlItem and a route that uses it to the swagger 2.0 sample spec.
It also includes 6 xml mime types that are produced + consumed in that route.
Downstream clients can use this model and that route for their xml tests.
It adds an Api suffix on the java rest-assured client to pass CircleCi tests
It pegs the versions of pytest and pytest-cov to fix and pass TravisCI tests
It fixes the python models get_real_child_model method so deserialization tests pass
Removes unused models and tests from the sample python clients
The examples currently in the spec do not include all xml attributes. The XmlItem model includes all xml attributes:
That line is: public DefaultApi default() {
And position 22 is right after DefaultApi. Is default a reserved keyword in Java?
It looks like it is per: https://en.wikipedia.org/wiki/List_of_Java_keywords
My guess is that someone updated the java generator without regenerating the java client, and now that I regenerated the client we now see this error.
Where is the rest-assured java generator file?
Any Idea on how to fix this?
Can I use setReservedWordsLowerCase?
The reason will be displayed to describe this comment to others. Learn more.
@spacether I think you will need to add 2 more spaces to indent the new fake endpoint so that it will be grouped into the previous endpoint POST /fake/{petId}/uploadImageWithRequiredFile
The reason will be displayed to describe this comment to others. Learn more.
@wing328 Why do you think I need to further indent it?
The code I added creates a new route /fake/create_xml_item which has a post method.
Looking at higher up examples, my indenting is consistent with the definition of other routes.
Indent 2 spaces for the route
Indent 4 spaces for the method
This test must be a post route so we can submit a body.
Are you suggesting that I move the XmlItem body into the existing uploadImageWithRequiredFile post route?
I'd prefer to keep them separate as they test different features.
Did you see my comment above about the word default in Java?
The reason will be displayed to describe this comment to others. Learn more.
Why do you think I need to further indent it?
/fake/create_xml_item is put in the DefaultAPI class (a new class) so I don't think it's grouped under the same tags in the previous endpoint. Please change the indention to give it a try. (ideally I want to avoid another new class for a new fake endpoint)
Further investigation shows that the default text in the file ApiClient.java is causing the CI test to fail. I have filed a bug on it here: #1831
and will include a mustache fix in this PR to get the rest-assured tests to pass.
@wing328 the TravisCI tests were failing due to having different versions of pytest and pytest-cov installed. We had pytest==4.1.0, and pytest-cov==2.6.0. That version of pytest needed the latest version of pytest-cov==2.6.1.
So I pegged our versions of pytest and pytest-cov to the working values of:
pytest>=3.6.0
pytest-cov>=2.6.1
to ensure that this does not happen again in the future.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR checklist
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.shand./bin/security/{LANG}-petstore.shif 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\.master,. Default:3.4.x,4.0.xmaster.@wing328
@jimschubert
@cbornet
@jaz-ah
@ackintosh
@JFCote
@jmini
Description of the PR
It also includes 6 xml mime types that are produced + consumed in that route.
Downstream clients can use this model and that route for their xml tests.
The examples currently in the spec do not include all xml attributes. The XmlItem model includes all xml attributes:
Issue Closure
When merged this PR will close these issues: