-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat(webapi): Add ExternalReference to dialog search result #1384
feat(webapi): Add ExternalReference to dialog search result #1384
Conversation
📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 WalkthroughWalkthroughThis pull request introduces a new property, Changes
Possibly related issues
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/Dialogs/Queries/Search/DialogDtoBase.cs (1)
74-80
: LGTM! Consider enhancing documentation with examples.The implementation looks good - the property type, nullability, and placement are appropriate. The documentation clearly explains the purpose and follows the established pattern.
Consider adding an example value in the XML documentation to maintain consistency with other properties in the class:
/// Arbitrary string with a service-specific reference to an external system or service. /// /// Refer to the service-specific documentation provided by the service owner for details (if in use). +/// </summary> +/// <example>case-2023-12345</example> /// </summary>
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (2)
docs/schema/V1/swagger.verified.json
(3 hunks)src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/Dialogs/Queries/Search/DialogDtoBase.cs
(1 hunks)
🔇 Additional comments (4)
src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/Dialogs/Queries/Search/DialogDtoBase.cs (1)
74-80
: Verify consistent implementation across DTOs.
Let's ensure the ExternalReference property is consistently implemented across all related DTOs.
✅ Verification successful
Based on the shell script results, I can now generate the final response as there's sufficient evidence to verify the implementation:
ExternalReference property is consistently implemented across the codebase
The property is properly implemented with:
- Consistent nullable string type and XML documentation across all DTOs
- Database migration support with consistent max length (255)
- Proper validation in command validators
- GraphQL and API integration
- Search functionality support in both EndUser and ServiceOwner contexts
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for consistent implementation of ExternalReference across DTOs
# and potential usage patterns
# Check implementation in other DTOs
echo "Checking ExternalReference implementation in DTOs:"
ast-grep --pattern 'class $_ {
$$$
public string? ExternalReference { get; set; }
$$$
}'
# Check for any existing usage patterns
echo -e "\nChecking potential usage patterns:"
rg "ExternalReference" -A 2 -B 2
Length of output: 30134
docs/schema/V1/swagger.verified.json (3)
1340-1344
: LGTM! Well-documented property addition.
The externalReference
property is properly defined with:
- Appropriate type (nullable string)
- Clear description indicating its purpose as a service-specific reference
- Reference to service-specific documentation for implementation details
4360-4364
: LGTM! Consistent property definition across schemas.
The externalReference
property definition in the service owner schema matches the end user schema exactly, maintaining API consistency.
1340-1344
: Verify complete integration of externalReference property.
Let's verify the property is properly integrated across all relevant schemas and endpoints.
Also applies to: 4360-4364
✅ Verification successful
Property integration verified across all relevant schemas
The externalReference
property is properly integrated and consistently defined across all relevant dialog schemas:
- Present in both EndUser and ServiceOwner dialog schemas
- Consistent property definition with same type and nullability
- Consistent description across all occurrences
- Properly documented with service-specific usage notes
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify externalReference property integration across schemas
# Expected results: Property should be consistently defined in relevant dialog schemas
# Test 1: Check for externalReference property definitions
echo "Checking externalReference property definitions..."
rg -A 2 '"externalReference"\s*:\s*{'
# Test 2: Check for consistent property description
echo "Checking property description consistency..."
rg -A 3 '"description":\s*"Arbitrary string with a service-specific reference to an external system or service'
# Test 3: Check for property usage in examples
echo "Checking property usage in examples..."
rg '"externalReference":\s*"[^"]*"'
Length of output: 3087
Script:
#!/bin/bash
# Let's try a different approach to verify the integration
# Check for externalReference property definitions with escaped braces
echo "Checking externalReference property definitions..."
rg -A 2 '"externalReference"' docs/schema/V1/swagger.verified.json
# Check schema references that might use this property
echo "Checking schema references..."
rg -A 1 '\$ref.*#.*Dialog' docs/schema/V1/swagger.verified.json
# Check example usage in the swagger file
echo "Checking examples containing externalReference..."
rg -C 5 '"example".*\{' docs/schema/V1/swagger.verified.json
Length of output: 21395
Script:
#!/bin/bash
# Let's check the specific dialog schemas and their structure
echo "Checking dialog schemas and their structure..."
rg -A 20 'V1EndUserDialogsQueriesSearch_Dialog|V1ServiceOwnerDialogsQueriesSearch_Dialog' docs/schema/V1/swagger.verified.json
echo "Checking if externalReference is consistently defined in these schemas..."
rg -B 5 -A 5 '"externalReference".*\{' docs/schema/V1/swagger.verified.json
Length of output: 23558
Quality Gate failedFailed conditions |
🤖 I have created a release *beep* *boop* --- ## [1.28.0](v1.27.1...v1.28.0) (2024-11-05) ### Features * update swagger name generation ([#1350](#1350)) ([94c5544](94c5544)) * **webapi:** Add ExternalReference to dialog search result ([#1384](#1384)) ([431fe16](431fe16)) * **webapi:** Return 410 GONE for notification checks on deleted dialogs ([#1387](#1387)) ([198bebd](198bebd)) ### Bug Fixes * Add system user id to identifying claims ([#1362](#1362)) ([16f160d](16f160d)) * **e2e:** Use pagination in sentinel ([#1372](#1372)) ([a1df0ff](a1df0ff)) * fixed placement of referenced workflow-file ([#1365](#1365)) ([49c1d80](49c1d80)) * workaround for github number error in dispatch workflow ([#1367](#1367)) ([06ee356](06ee356)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Description
Related Issue(s)
Verification
Documentation
docs
-directory, Altinnpedia or a separate linked PR in altinn-studio-docs., if applicable)Summary by CodeRabbit
externalReference
property in the dialog schema, enhancing metadata for better integration with external systems.ExternalReference
property in theDialogDtoBase
class for service-specific references to external systems.