Add API new version cloning and complete fork endpoints for all work …#268
Open
pellecchialuigi wants to merge 2 commits intomainfrom
Open
Add API new version cloning and complete fork endpoints for all work …#268pellecchialuigi wants to merge 2 commits intomainfrom
pellecchialuigi wants to merge 2 commits intomainfrom
Conversation
…item types - Add /apis/new-version endpoint to clone a software component with all its mappings (sw-requirements, test-specifications, test-cases, documents, justifications) into a new library version - Implement remaining fork endpoints: test-specification, test-case, and justification for both direct API and indirect sw-requirement/ test-specification parent mappings - Extract get_api_from_indirect_test_specification_mapping helper to resolve parent API from TestSpecificationTestCase mappings - Fix fork() methods in mapping models to correctly propagate parent links (if/elif mutual exclusivity, FK-only assignment to avoid SQLAlchemy cascade issues on self-referential relationships) - Add fork() method to JustificationModel, TestCaseModel, and TestSpecificationModel - Remove redundant session.add() calls on already-tracked objects - Extract permission helpers (hasReadPermission, hasWritePermission, etc.) into constants.tsx replacing inline indexOf checks - Add New Version modal and menu entries in the frontend - Add unit tests for all 10 fork endpoints (api/test/test_fork.py) Signed-off-by: Luigi Pellecchia <lpellecc@redhat.com>
Extract status codes, response types, and ApiResponse/api_response_decorator into api/api_response.py and route handlers through it. Replace ad hoc field checks with get_wrong_mandatory_fields for clearer validation feedback. Remove the obsolete api_url.py stub and containerfile comments that referenced it. Add .coveragerc to omit api/test from coverage; adjust pyproject.toml. Frontend: expand Constants (API_BASE_URL, endpoint paths, mapping path builders, HTTP success helpers) and update screens to use them instead of scattered literals. Add broad API integration tests for mappings, user flows, files, notifications, permissions, and related routes. Signed-off-by: Luigi Pellecchia <lpellecc@redhat.com>
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.
Refers to #228