Add pydantic Field requirements to API model attributes#928
Open
Chennamma-Hotkar wants to merge 2 commits into
Open
Add pydantic Field requirements to API model attributes#928Chennamma-Hotkar wants to merge 2 commits into
Chennamma-Hotkar wants to merge 2 commits into
Conversation
Signed-off-by: Chennamma Hotkar <channuhotkar@gmail.com>
1 task
Member
|
Linting is failing, have a look at the failed pipeline at the bottom of the pr. |
Author
|
Thanks for the review @MVrachev! I see the linting failure — some lines exceeded 79 characters due to the description parameter in Field(). I'll fix this by keeping the Field constraints minimal (without descriptions) and push an update shortly. |
Signed-off-by: Chennamma Hotkar <channuhotkar@gmail.com>
Author
|
@MVrachev I've pushed a fix — removed Field descriptions to stay within the 79-char line limit, and all lint checks (flake8, isort, black, bandit) pass locally via tox -e lint. Please re-approve the workflow when you get a chance. |
Member
|
Hi @Chennamma-Hotkar, could you please solve the conflicts? |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Adds pydantic
Field()constraints to model attributes that previously accepted any integer without validation, as described in #520.TUFSignedDelegationsRolesthresholdge=1TUFSignedDelegationsSuccinctRolesthresholdge=1TUFSignedRolesthresholdge=1TUFSignedMetaFileversionge=1TUFSignedversionge=1ArtifactInfolengthge=0BootstrapPayloadtimeoutgt=0Tests: 13 new unit tests, 99 total pass,
tox -e lintclean.Docs: Regenerated
docs/swagger.json.