Conversation
feat(dossiers): add support for bug types in campaign creation and validation
Tests difference:New Tests |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR extends the dossier creation flow to support custom additional fields and bug-type selections. It adds schema definitions, request validation, database persistence, test coverage, and updates the OpenAPI spec accordingly.
- Introduce
additionalsandbugTypesin the campaign schema - Validate and persist additional fields & bug types in the POST
/dossiersroute - Extend tests and update OpenAPI documentation for new fields
- Bump
@appquality/tryber-databasedependency
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/schema.ts | Added optional additionals and bugTypes arrays to campaign type |
| src/routes/dossiers/_post/index.ts | Validate and insert additional fields and bug types |
| src/routes/dossiers/_post/creation.spec.ts | New tests for additionals and bug types; seed and cleanup updates |
| src/reference/openapi.yml | Document additionals and bugTypes in the OpenAPI contract |
| package.json | Bumped @appquality/tryber-database to ^0.44.6 |
Comments suppressed due to low confidence (3)
src/routes/dossiers/_post/creation.spec.ts:120
- Add cleanup for the
WpAppqAdditionalBugTypestable here to ensure tests remain isolated and previous runs don't affect this suite.
await tryber.tables.WpAppqCampaignAdditionalFields.do().delete();
src/routes/dossiers/_post/index.ts:111
- [nitpick] The method name uses a double negative (
invalidBugTypesSubmitted); consider renaming tohasInvalidBugTypesorareBugTypesInvalidfor clearer intent.
private async invalidBugTypesSubmitted() {
src/reference/openapi.yml:10777
- [nitpick] This
requiredblock appears to duplicate the role/user requirement already defined earlier; consider consolidating to prevent inconsistencies in the API spec.
required:
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.
No description provided.