-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save OpenAPI definition as json, generate client and run tests #969
Conversation
a63652d
to
a027496
Compare
a027496
to
68ad0d6
Compare
To further work on this PR, I have some questions:
Run SchemathesisInstallpip3 install --user schemathesis RunPrepare the group variables in your env in a way, that your user is allowed everything. st run \
-H "Authorization: Bearer TOKEN" \
--checks all \
--validate-schema true \
http://localhost:3000/explorer-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.
Some minor changes, but overall this looks good.
The list of generated clients can also be moved into an environment variable of the repository. That way, there is no need to change the code in the case you want to add or remove one. |
bdb8cb9
to
ae9fce7
Compare
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 looks great to me. I had one quick comment on the new mongo docker-compose. While reading, I hadn't realized that that was probably there for the github action and not local development, so maybe my comment does not really apply.
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 looks great to me. I had one quick comment on the new mongo docker-compose. While reading, I hadn't realized that that was probably there for the github action and not local development, so maybe my comment does not really apply.
I tried writing the tests for the generated |
One big open question for me is still where to save/upload the client code to. Is it supposed to be a mono-repo or should they be uploaded into different repositories? |
ae9fce7
to
3c55d37
Compare
openapi/python-nextgen/test/test_partial_update_derived_dataset_dto.py
Outdated
Show resolved
Hide resolved
openapi/python-nextgen/test/test_partial_update_derived_dataset_dto.py
Outdated
Show resolved
Hide resolved
e6d224c
to
7e94fb9
Compare
I guess the mongoose-managed fields ( createdAt )etc. should have a default in the schema definition for the HistoryClass to match the other schemas. |
#1132 should fix the HistoryClass errors |
Regarding the test failing: are we able to download the openapi.json file and run the api creation successfully locally? |
@nitrosx You can download or create it yourself but it won't change the outcome. The same error will appear until the example value of |
@ChuckMoe thank you for clarifying. |
Is this PR superseded by the Core Release SDK autogeneration and pySciCat project? The plan is to generate the SDK in a different repo, right? Should this PR be closed? |
As mentioned by @sbliven, this PR as been superseeded by the completion of Core Release SDK autogeneration and pySciCat project. Closing it |
See #958