FOUR-15867 Refactor API Route Definitions for Version 1.1 by caleeli · Pull Request #6890 · ProcessMaker/processmaker
Refactor API Route Definitions for Version 1.1
Overview
This PR refactors the API route definitions for version 1.1 of our application. The changes include:
- Grouping
usestatements together for better organization. - Applying middleware to the entire route group, making it clearer and easier to manage.
- Improving route naming conventions for better readability and consistency.
- Adding detailed comments to provide better context and understanding of the code.
Changes
- Create a minimilized middleware for the v1.1 endpoints.
- Defined a route group with middleware to apply it to all relevant routes within the group.
- Create a first simple
tasks.index
How to Test
- Try the endpoint
/api/1.1/tasks
Related Tickets & Packages
Code Review Checklist
- I have pulled this code locally and tested it on my instance, along with any associated packages.
- This code adheres to ProcessMaker Coding Guidelines.
- This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
- This solution fixes the bug reported in the original ticket.
- This solution does not alter the expected output of a component in a way that would break existing Processes.
- This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
- This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
- This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
- This ticket conforms to the PRD associated with this part of ProcessMaker.
ci:next