-
Notifications
You must be signed in to change notification settings - Fork 27
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
⬆️ Upgrade API server (Pydantic v2) #6511
Closed
giancarloromeo
wants to merge
39
commits into
ITISFoundation:pydantic_v2_migration
from
giancarloromeo:is4481/upgrade-api-server
Closed
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
079e9d4
upgrade reqs
giancarloromeo 0fb353a
fix code
giancarloromeo a7e72c2
fix url type
giancarloromeo 9c1a498
fix typeadapter
giancarloromeo 13502ac
fix download url type
giancarloromeo 7346f8a
fix url type
giancarloromeo 9294f6b
fix typecheck
giancarloromeo 0184526
Merge branch 'pydantic_v2_migration' into is4481/upgrade-api-server
giancarloromeo f592daa
fix typechecking
giancarloromeo 1d713bf
fix typecheck
giancarloromeo 7968bb3
continue migration
giancarloromeo 6c2c044
continue fixing
giancarloromeo 21d5906
fix url type
giancarloromeo 04cd728
continue upgrade
giancarloromeo ba3b868
⬆️ ♻️ Upgrade pagination customisation in api-server (#6545)
pcrespov 29f67ff
fix tests
giancarloromeo b06e171
fix pagination
giancarloromeo a974048
fix url
giancarloromeo 85d01a4
Merge branch 'pydantic_v2_migration' into is4481/upgrade-api-server
giancarloromeo df11489
fix validation
giancarloromeo 8dd57a7
fix frozen field
giancarloromeo e01f8c1
fix url
giancarloromeo 4aae323
continue fixing
giancarloromeo 00c4164
continue fixing
giancarloromeo 2331b89
continue fixing
giancarloromeo f8ac22b
fix test
giancarloromeo 866ded6
upgrade reqs
giancarloromeo f68123b
fix mypy
giancarloromeo e9abfbd
fix url
giancarloromeo 51d1aca
fix wallet
giancarloromeo 245739e
fix mypy
giancarloromeo f8145be
fix test
giancarloromeo 55f5af5
fix openapi spec validation
giancarloromeo 8bdfa5e
fix serialization
giancarloromeo be61302
revert HttpUrl legacy
giancarloromeo c15224e
fix url
giancarloromeo 003aff8
fix http
giancarloromeo 3c0c9fe
fix mock
giancarloromeo 08ea530
fix starlette exception handlers
giancarloromeo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,8 @@ reqs: ## compiles pip requirements (.in -> .txt) | |
|
||
|
||
# specification of the used openapi-generator-cli (see also https://github.com/ITISFoundation/openapi-generator) | ||
OPENAPI_GENERATOR_NAME := itisfoundation/openapi-generator-cli-openapi-generator-v4.2.3 | ||
OPENAPI_GENERATOR_TAG := v0 | ||
OPENAPI_GENERATOR_NAME := openapitools/openapi-generator-cli | ||
OPENAPI_GENERATOR_TAG := latest | ||
OPENAPI_GENERATOR_IMAGE := $(OPENAPI_GENERATOR_NAME):$(OPENAPI_GENERATOR_TAG) | ||
|
||
define _create_and_validate_openapi | ||
|
@@ -25,10 +25,6 @@ define _create_and_validate_openapi | |
export API_SERVER_DEV_FEATURES_ENABLED=$1; \ | ||
python3 -c "import json; from $(APP_PACKAGE_NAME).main import *; print( json.dumps(the_app.openapi(), indent=2) )" > $@ | ||
|
||
# patching version until tools adapted | ||
@sed -i 's/"openapi": "3.1.0",/"openapi": "3.0.2",/g' $@ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not needed anymore |
||
|
||
|
||
# validates OAS file: $@ | ||
docker run --rm \ | ||
--volume "$(CURDIR):/local" \ | ||
|
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Official tool used for validation