Skip to content

OH20-1449: Merge carrierServiceCode and carrierSMDGCode into 1 object - #646

Merged
HenrikHL merged 5 commits into
masterfrom
OH20-1449
Aug 20, 2026
Merged

OH20-1449: Merge carrierServiceCode and carrierSMDGCode into 1 object#646
HenrikHL merged 5 commits into
masterfrom
OH20-1449

Conversation

@HenrikHL

@HenrikHL HenrikHL commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

OH20-1449: Merge carrierServiceCode and carrierSMDGCode into a single object array in subsciption filters

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

OH20-1449: Unify carrier service subscription filters

✨ Enhancement 📝 Documentation 🕐 10-20 Minutes

Grey Divider

AI Description

• Replaces separate service and carrier filters with a unified carrierServices object array.
• Supports optional carrier scoping while requiring carrierServiceCode for every filter.
• Clarifies subscription descriptions, filter semantics, and logical OR examples.
Diagram

classDiagram
class Subscription {
  +CarrierServiceFilter[] carrierServices
}
class SubscriptionBodyWithSecret {
  +CarrierServiceFilter[] carrierServices
}
class CarrierServiceFilter {
  +string carrierServiceCode
  +string carrierSMDGCode
}
Subscription "1" *-- "0..*" CarrierServiceFilter : filters
SubscriptionBodyWithSecret "1" *-- "0..*" CarrierServiceFilter : filters
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Extract a shared CarrierServiceFilter schema
  • ➕ Eliminates duplicate object definitions across request and response schemas
  • ➕ Prevents validation rules and descriptions from drifting
  • ➕ Provides a reusable contract component for future subscription models
  • ➖ Introduces schema-reference indirection
  • ➖ Expands the change beyond the existing inline-schema convention

Recommendation: The unified object array correctly models carrier-specific service identity and preserves unscoped service matching. Consider extracting the repeated item definition into a shared component referenced by both subscription schemas; otherwise, the current focused approach is suitable if inline duplication is intentional.

Files changed (1) +60 / -54

Enhancement (1) +60 / -54
OVS_HUB_NTF_v1.0.0.yamlUnify carrier service and SMDG subscription filters +60/-54

Unify carrier service and SMDG subscription filters

• Replaces the separate 'carrierServiceCodes' and 'carrierSMDGCodes' arrays with 'carrierServices', whose objects require 'carrierServiceCode' and optionally identify the carrier through 'carrierSMDGCode'. Applies the contract to subscription request and response schemas, revises examples and matching semantics, and replaces placeholder schema descriptions.

ovs_hub_ntf/v1/OVS_HUB_NTF_v1.0.0.yaml

@qodo-code-review

qodo-code-review Bot commented Aug 19, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Service examples use obsolete field ✓ Resolved 🐞 Bug ≡ Correctness
Description
The POST subscription examples still send carrierServiceCodes even though
SubscriptionBodyWithSecret now defines only carrierServices, so clients copying them will not
populate the intended service filter. The explanatory request text also retains the obsolete field
name and syntax.
Code

ovs_hub_ntf/v1/OVS_HUB_NTF_v1.0.0.yaml[R894-895]

+        carrierServices:
          type: array
Evidence
The POST request body references SubscriptionBodyWithSecret, and that schema now declares
carrierServices. However, the request explanation at line 236 and both service-filter examples at
lines 283-301 still use carrierServiceCodes, making the documented payload inconsistent with the
changed contract.

ovs_hub_ntf/v1/OVS_HUB_NTF_v1.0.0.yaml[230-251]
ovs_hub_ntf/v1/OVS_HUB_NTF_v1.0.0.yaml[279-301]
ovs_hub_ntf/v1/OVS_HUB_NTF_v1.0.0.yaml[894-927]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Update the POST subscription documentation and examples to use the new `carrierServices` array of objects instead of the removed `carrierServiceCodes` string array.

## Issue Context
`POST /subscriptions` references `SubscriptionBodyWithSecret`, whose service filter was changed to `carrierServices`. The prose and two email examples still demonstrate the obsolete request shape.

## Fix Focus Areas
- ovs_hub_ntf/v1/OVS_HUB_NTF_v1.0.0.yaml[231-301]
- ovs_hub_ntf/v1/OVS_HUB_NTF_v1.0.0.yaml[894-927]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
⚠️ Tickets: not configured — ticket URL found in PR but could not be fetched — check ticket provider credentials
Review mode: ⚖️ Balanced: This is a public OpenAPI contract/example update changing the subscription filter field from carrierServiceCodes to carrierServices, so it carries real compatibility and schema-consistency risk despite the small localized diff.

Grey Divider

Tip of the day
💡 Did you know, you can copy the agent prompt from any finding and feed it to your IDE agent

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread ovs_hub_ntf/v1/OVS_HUB_NTF_v1.0.0.yaml

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the OVS Hub Notification (OVS_HUB_NTF) OpenAPI contract to represent carrier service filtering as a single array of objects, allowing carrierServiceCode to be optionally disambiguated by carrierSMDGCode.

Changes:

  • Replaces carrierServiceCodes: string[] with carrierServices: { carrierServiceCode: string, carrierSMDGCode?: string }[] in subscription filter schemas.
  • Removes the separate carrierSMDGCodes subscription filter from the schemas.
  • Improves the Subscription / SubscriptionBodyWithSecret schema descriptions and adds richer examples for carrierServices.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread ovs_hub_ntf/v1/OVS_HUB_NTF_v1.0.0.yaml
@HenrikHL

Copy link
Copy Markdown
Contributor Author

/agentic_review

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 5cc6427

@HenrikHL

Copy link
Copy Markdown
Contributor Author

/agentic_review

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 52b4004

@HenrikHL
HenrikHL merged commit e2effea into master Aug 20, 2026
1 check passed
@HenrikHL
HenrikHL deleted the OH20-1449 branch August 20, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants