Skip to content

[PYTHON] generate code based on pydantic v2#16636

Closed
fa0311 wants to merge 60 commits intoOpenAPITools:oshmoun-masterfrom
fa0311:oshmoun-master
Closed

[PYTHON] generate code based on pydantic v2#16636
fa0311 wants to merge 60 commits intoOpenAPITools:oshmoun-masterfrom
fa0311:oshmoun-master

Conversation

@fa0311
Copy link
Contributor

@fa0311 fa0311 commented Sep 21, 2023

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh ./bin/configs/*.yaml
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master (upcoming 7.1.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

spacether and others added 30 commits September 11, 2023 12:49
* Update README.md

* Update team.yml

* Update pom.xml
* Fix spring scope property

* Adapt test files
… skipIfSpecIsUnchanged=true (Fixes OpenAPITools#16490) (OpenAPITools#16491)

* Don't delete output directory if spec is unchanged

Resolves OpenAPITools#16490

* Fix some typos
* add nullable case to spring test spec

* generate samples for changed spring input

* add nullable case to general test spec

* generate samples for changed general input

* generate samples again

* generates samples again

* re-build from new sources, generates samples again
…ITools#16565)

* update github workflow, use debug instead of warning

* use debug instead of warn
…rator) (OpenAPITools#16563)

* fix integer default value with double qutoe (kotlin jaxrs)

* add enum tests

* fix typo

* update samples
…ols#16525)

* [Go] return errors that happen while unmarshalling objects

* Update model samples

* More updates to samples

* Update failing Go store API test to match the one that passes
* better tests for php nextgen

* add new files
Fixed a bug in postProcessAllModels, changing an anyOf to a oneOf.
…6580)

* spec for recommend test

* add ValidateTask test for custom defined tasks

* add ValidateTask test for recommend option

* ValidateTask recommend default value is true
…va (OkHttp) Implementation of OpenAPITools#16547 (OpenAPITools#16550)

* Autosets the parameters with the only value specified as enum if the parameter is also marked as required

* Autosets the parameters with the only value specified as enum if the parameter is also marked as required

* Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client.

* Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client.

* Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client.

* Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client.
* update go gin to newer version

* update test
* update java undertow to newer version

* update compiler plugin to newer version

* test undertow in circleci

* use 3.0 spec
* fix(go-server): Allow optional request bodies

Closes OpenAPITools#16578

* chore: Run scripts

* chore: Remove unnecessary whitespace change

* fix: Use correct error
* v7.0.1 release

* update readme

* update template

* update readme
* prepare v7.1.0 in master

* update
@fa0311 fa0311 changed the base branch from oshmoun-master to master September 22, 2023 01:19
@wing328
Copy link
Member

wing328 commented Sep 22, 2023

thank you 👍

but looks like a recent rebase messed up this PR which now contains commits not authored by you.

do you mind submitting a new PR by cherry-picking the commits owned by you?

@fa0311
Copy link
Contributor Author

fa0311 commented Sep 22, 2023

but looks like a recent rebase messed up this PR which now contains commits not authored by you.

This PR is based on #16549 and contains commits I have not made.
Should the base branch be OpenAPITools:oshmoun-master?

@wing328 wing328 changed the base branch from master to oshmoun-master September 22, 2023 02:30
@wing328 wing328 changed the base branch from oshmoun-master to master September 22, 2023 02:30
@wing328
Copy link
Member

wing328 commented Sep 22, 2023

Should the base branch be OpenAPITools:oshmoun-master?

yes please as I made some enhancements on top of #16469

@fa0311 fa0311 changed the base branch from master to oshmoun-master September 22, 2023 02:32
@fa0311
Copy link
Contributor Author

fa0311 commented Sep 22, 2023

This PR contains a commit to resolve a conflict with OpenAPITools:master.

@wing328
Copy link
Member

wing328 commented Sep 22, 2023

Just PM you via Slack to further discuss this.

@multani
Copy link
Contributor

multani commented Sep 23, 2023

Hey @fa0311 , I was doing something related in #16624: I'm not sure how much it will conflict with your changes for Pydantic v2, but I'm putting my work on hold and I'll wait for your pull request to be merged first because I will need Pydantic v2 to actually achieve what I want to do.

I'll rebase/readjust my work once your pull request has been merged, it's hard how much work it will be right now ;)

I'll keep an eye on your changes, let me know if I can help!

@wing328
Copy link
Member

wing328 commented Sep 23, 2023

@multani I'd a discussion with @fa0311 yesterday about your PR and we would like to get your PR merged first.

Signed-off-by: ふぁ <yuki@yuki0311.com>
Signed-off-by: ふぁ <yuki@yuki0311.com>
Signed-off-by: ふぁ <yuki@yuki0311.com>
Signed-off-by: ふぁ <yuki@yuki0311.com>
Signed-off-by: ふぁ <yuki@yuki0311.com>
Signed-off-by: ふぁ <yuki@yuki0311.com>
Signed-off-by: ふぁ <yuki@yuki0311.com>
@fa0311
Copy link
Contributor Author

fa0311 commented Sep 24, 2023

My environmental test was 206 passed, 2 skipped, 1 warning in 33.10s 🎉

Signed-off-by: ふぁ <yuki@yuki0311.com>
@fa0311 fa0311 marked this pull request as ready for review September 24, 2023 00:42
@fa0311 fa0311 requested a review from jimschubert as a code owner September 24, 2023 00:42
@wing328
Copy link
Member

wing328 commented Sep 24, 2023

@fa0311 I'd a discussion with @multani last night and just want to share the game plan with you and get your feedback as well.

We'll create another client generator called python-pydantic-v1 and python client generator will support pydantic v2 only moving forward since it's not easy to maintain both pydantic v1 and v2 in the same generator, and we can then more easily consolidate efforts to focus on pydantic v2 support.

We'll get #16624 merged first (as it was tested with pydantic v2 when @multani worked on it) and then we will merge this one.

Let me know your thought as well.

@wing328
Copy link
Member

wing328 commented Sep 24, 2023

(and looks like a rebase wasn't performed correctly as this PR contains commits not authored by you)

@fa0311
Copy link
Contributor Author

fa0311 commented Sep 24, 2023

Continue to #16655

@fa0311 fa0311 closed this Sep 24, 2023
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.