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.
feat: rich filters + pql on work-item list endpoints, add list_workspace [WEB-7393][PAI-1461] #37
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
base: main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
feat: rich filters + pql on work-item list endpoints, add list_workspace [WEB-7393][PAI-1461] #37
Changes from 1 commit
d55f45e0ddae269b34a71File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
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.
Enforce DTO-only params for resource method inputs
Cycles.list_work_itemsstill accepts plain mappings (Line 142, Line 159-Line 160). This conflicts with the resource contract and weakens typed validation for filters/pql input.Suggested direction
As per coding guidelines, "Resource methods must accept Pydantic DTOs, serialize with
model_dump(exclude_none=True), and validate responses withModel.model_validate()."🤖 Prompt for AI Agents
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.
Endpoint path naming/convention is out of policy
Line 162 uses
cycle-issues, and Lines 162, 195, and 206 omit trailing/. This violates endpoint naming and URL-format rules for API resources.Suggested patch
As per coding guidelines, "Never use 'Issue' in endpoint or parameter names — always use 'Work Item' instead" and "All API endpoints should end with a trailing
/and follow URL convention:{base_path}/api/v1{resource_base_path}/{endpoint}/."Also applies to: 195-195, 206-206
🤖 Prompt for AI Agents
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.
Keep
list_work_itemsstrictly typed to query DTOLine 141 and Line 159 permit raw mappings, bypassing DTO constraints and creating a second unvalidated input path.
Suggested direction
As per coding guidelines, "Resource methods must accept Pydantic DTOs, serialize with
model_dump(exclude_none=True), and validate responses withModel.model_validate()."📝 Committable suggestion
🤖 Prompt for AI Agents
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.
module-issuespath and missing trailing slash violate API conventionsLine 161 uses
module-issuesand does not end the endpoint with/.Suggested patch
As per coding guidelines, "Never use 'Issue' in endpoint or parameter names — always use 'Work Item' instead" and "All API endpoints should end with a trailing
/and follow URL convention:{base_path}/api/v1{resource_base_path}/{endpoint}/."📝 Committable suggestion
🤖 Prompt for AI Agents
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.
Add trailing slashes to touched endpoint paths.
These changed URLs still omit the terminal
/, which breaks the API path convention and can cause routing/redirect inconsistencies.Suggested patch
As per coding guidelines, "All API endpoints should end with a trailing
/and follow URL convention:{base_path}/api/v1{resource_base_path}/{endpoint}/".Also applies to: 234-236, 319-320, 352-352
🤖 Prompt for AI Agents
Uh oh!
There was an error while loading. Please reload this page.