Skip to content

CS 1.0: SD-2982: Add cargoType filter#620

Merged
HenrikHL merged 1 commit intomasterfrom
SD-2982_Add-cargoType-filter
Apr 10, 2026
Merged

CS 1.0: SD-2982: Add cargoType filter#620
HenrikHL merged 1 commit intomasterfrom
SD-2982_Add-cargoType-filter

Conversation

@HenrikHL
Copy link
Copy Markdown
Contributor

@HenrikHL HenrikHL commented Apr 9, 2026

SD-2982: Add a cargoType filter for the PtP endPoint

@HenrikHL HenrikHL requested a review from emiliodcsa April 9, 2026 18:12
@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Add cargoType filter parameter to PtP endpoint

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Add cargoType query filter parameter to PtP endpoint
• Supports DRY and REEFER cargo type values
• Influences routing solutions, transport leg feasibility, and footprint calculations
• Defaults to DRY when not specified
Diagram
flowchart LR
  PtP["PtP Endpoint"]
  Filter["cargoType Filter"]
  Values["DRY / REEFER"]
  Impact["Routing & Feasibility"]
  PtP -- "adds" --> Filter
  Filter -- "accepts" --> Values
  Filter -- "influences" --> Impact
Loading

Grey Divider

File Changes

1. cs/v1/CS_v1.0.3.yaml ✨ Enhancement +17/-0

Add cargoType query filter to PtP endpoint

• Added cargoType query parameter to PtP endpoint specification
• Parameter accepts DRY (default) or REEFER cargo types
• Documented impact on routing solutions, transport leg feasibility, and footprint values
• Includes example value and default behavior documentation

cs/v1/CS_v1.0.3.yaml


2. .stoplight/styleguide.json ⚙️ Configuration changes +1/-1

Update styleguide configuration

• Minor configuration changes related to style guide

.stoplight/styleguide.json


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review bot commented Apr 9, 2026

Code Review by Qodo

🐞 Bugs (0)   📘 Rule violations (0)   📎 Requirement gaps (1)   🎨 UX Issues (0)
📎\ ≡ Correctness (1)

Grey Divider


Action required

1. cargoType missing enum + optionality 📎
Description
The new cargoType query parameter is documented without a schema enum for DRY/REEFER and
does not state that provider support for this filter is optional (only a default is described). This
fails the documentation requirements for supported values and optional provider support.
Code

cs/v1/CS_v1.0.3.yaml[R236-252]

+        - schema:
+            type: string
+            default: DRY
+            example: REEFER
+          in: query
+          name: cargoType
+          description: |
+            This parameter can influence:
+            * the routing solutions returned
+            * the feasibility of individual transport legs
+            * the reported footprint values, when provided
+
+            Possible values:
+            - `DRY` (For DRY cargo)
+            - `REEFER` (Reefer cargo)
+
+            The default value is `DRY` in case this filter parameter is not used.
Evidence
PR Compliance ID 1 requires the OpenAPI docs to enumerate supported values (DRY, REEFER) and
explicitly state provider support for the filter is optional. The added parameter defines type,
default, and example but no enum, and the description omits any statement about optional
provider support.

Support optional cargoType query filter with DRY/REEFER values for routing solutions
cs/v1/CS_v1.0.3.yaml[236-252]

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

## Issue description
The OpenAPI parameter `cargoType` does not enforce/document the allowed values via schema `enum`, and it does not explicitly state that provider support for the filter is optional (as required).

## Issue Context
Compliance requires documentation to enumerate supported values `DRY` and `REEFER`, and to state that provider support is optional; when supported, consumer usage is optional and provider defaults apply when omitted.

## Fix Focus Areas
- cs/v1/CS_v1.0.3.yaml[236-252]

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


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Comment on lines +236 to +252
- schema:
type: string
default: DRY
example: REEFER
in: query
name: cargoType
description: |
This parameter can influence:
* the routing solutions returned
* the feasibility of individual transport legs
* the reported footprint values, when provided
Possible values:
- `DRY` (For DRY cargo)
- `REEFER` (Reefer cargo)
The default value is `DRY` in case this filter parameter is not used.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. cargotype missing enum + optionality 📎 Requirement gap ≡ Correctness

The new cargoType query parameter is documented without a schema enum for DRY/REEFER and
does not state that provider support for this filter is optional (only a default is described). This
fails the documentation requirements for supported values and optional provider support.
Agent Prompt
## Issue description
The OpenAPI parameter `cargoType` does not enforce/document the allowed values via schema `enum`, and it does not explicitly state that provider support for the filter is optional (as required).

## Issue Context
Compliance requires documentation to enumerate supported values `DRY` and `REEFER`, and to state that provider support is optional; when supported, consumer usage is optional and provider defaults apply when omitted.

## Fix Focus Areas
- cs/v1/CS_v1.0.3.yaml[236-252]

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

@HenrikHL HenrikHL merged commit 2a2f412 into master Apr 10, 2026
1 check passed
@HenrikHL HenrikHL deleted the SD-2982_Add-cargoType-filter branch April 10, 2026 08:29
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.

1 participant