Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Conversation

Aclrian
Copy link
Contributor

@Aclrian Aclrian commented Dec 8, 2022

Closes #1142.

Summary of Changes

  • add migration for @boundary annotations to another version, with the possibilities:
    • If the mapped parameter has a number boundary and its type is known, the annotation will be migrated as expected. The interval would be converted if the type of the parameter from apiv1 and the type of the parameter from apiv2 mismatch (int, float). From a floating point boundary to an integer boundary, the boundary would be smaller. E.g., The interval (0.5, 9.5) will be converted to [1, 9]. If a conversion happens, the migrated annotation will be marked as unsure.
    • If the mapped parameter is a parameter, but its type in unknown, an unsure boundary annotation will be created for this parameter, but without any conversion.
    • If the element is not a parameter, a @todo annotation will be created.

Testing Instructions

run the migrate command or view and run the test_migration.py file

@Aclrian Aclrian linked an issue Dec 8, 2022 that may be closed by this pull request
fix wrong enum annotation target
@Aclrian Aclrian force-pushed the 1142-migrate-boundary-annotations branch from e322222 to 9a1fa7e Compare December 8, 2022 14:08
@github-actions
Copy link

github-actions bot commented Dec 8, 2022

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON bandit 7 0 0.57s
✅ PYTHON black 7 0 0 1.58s
✅ PYTHON flake8 7 0 0.45s
✅ PYTHON isort 7 0 0 1.06s
✅ PYTHON mypy 7 0 2.67s
✅ PYTHON pylint 7 0 2.49s

See errors details in artifact MegaLinter reports on CI Job page
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@Aclrian Aclrian marked this pull request as ready for review December 9, 2022 12:33
@Aclrian Aclrian requested a review from lars-reimann as a code owner December 9, 2022 12:33
@Aclrian Aclrian merged commit 1987206 into main Dec 9, 2022
@Aclrian Aclrian deleted the 1142-migrate-boundary-annotations branch December 9, 2022 12:34
@github-actions
Copy link

github-actions bot commented Dec 9, 2022

🎉 This PR is included in version 1.76.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions github-actions bot added the released Included in a release label Dec 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
released Included in a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate @boundary annotations
1 participant