Skip to content

Conversation

@HenrikHL
Copy link
Contributor

@HenrikHL HenrikHL commented Jan 8, 2026

User description

SD-2691: Cutoff Dates -> add optional object within leg
Added a description + updated 1.0.1->1.0.2 in examples


PR Type

Enhancement, Documentation


Description

  • Update API version examples from 1.0.1 to 1.0.2

  • Add CutOffTimes array to Leg schema

  • Add descriptions to VesselSchedule and ErrorResponse

  • Enhance documentation for cut-off times functionality


Diagram Walkthrough

flowchart LR
  A["Leg Schema"] -- "adds cutOffTimes array" --> B["CutOffTime References"]
  C["API Version"] -- "updated to 1.0.2" --> D["All Response Headers"]
  E["VesselSchedule"] -- "adds description" --> F["Enhanced Documentation"]
  G["ErrorResponse"] -- "adds description" --> F
Loading

File Walkthrough

Relevant files
Enhancement
CS_v1.0.2.yaml
Add CutoffTimes to Leg and update API version                       

cs/v1/CS_v1.0.2.yaml

  • Updated API version examples from 1.0.1 to 1.0.2 across all response
    headers
  • Added cutOffTimes array property to Leg schema with reference to
    CutOffTime schema
  • Added description to VesselSchedule explaining timetable of departure
    and arrival times
  • Added description to ErrorResponse indicating unexpected error
    handling
+17/-9   
Configuration changes
styleguide.json
Update style guide configuration                                                 

.stoplight/styleguide.json

  • Minor configuration changes to style guide
+1/-1     

@qodo-code-review
Copy link

qodo-code-review bot commented Jan 8, 2026

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🟢
🎫 #SD-2691
🟢 Add a way to provide cut-off dates/times per leg by repeating/including the cut-offs
object within each leg (optional).
Enable carriers (e.g., CMA) to customize their Swagger/OpenAPI description to clarify the
meaning/scope of cut-offs (e.g., “CutOffs are for the first CMA maritime leg”).
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link

qodo-code-review bot commented Jan 8, 2026

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
High-level
Clarify relationship between general and leg-specific cut-offs

Update the API documentation to clarify the relationship and precedence between
the new leg-specific cutOffTimes and any existing general cut-off definitions to
prevent ambiguity for implementers.

Examples:

cs/v1/CS_v1.0.2.yaml [1694-1698]
        cutOffTimes:
          type: array
          description: A list of cut-offs times provided by the carrier when available for this particular leg. A cut-off time indicates the latest date and time by which a task must be completed. For example, the latest date and time by where certain documentation must be provided by the Shipper.
          items:
            $ref: '#/components/schemas/CutOffTime'

Solution Walkthrough:

Before:

# components/schemas/Leg
Leg:
  properties:
    ...
    cutOffTimes:
      type: array
      description: A list of cut-offs times provided by the carrier when available for this particular leg. A cut-off time indicates the latest date and time by which a task must be completed. For example, the latest date and time by where certain documentation must be provided by the Shipper.
      items:
        $ref: '#/components/schemas/CutOffTime'

After:

# components/schemas/Leg
Leg:
  properties:
    ...
    cutOffTimes:
      type: array
      description: |
        A list of cut-offs times for this particular leg.
        These cut-off times take precedence over any general cut-off times defined at the route level for this leg.
        If this field is not present, the general cut-off times apply.
        A cut-off time indicates the latest date and time by which a task must be completed.
      items:
        $ref: '#/components/schemas/CutOffTime'
Suggestion importance[1-10]: 8

__

Why: The suggestion correctly identifies a critical ambiguity in the API design by adding leg-specific cutOffTimes without clarifying their relationship to existing general cut-offs, which could cause implementation confusion.

Medium
General
Improve API documentation clarity and correctness

Correct grammatical errors and improve wording in the description for
cutOffTimes to enhance API documentation clarity.

cs/v1/CS_v1.0.2.yaml [1696]

-description: A list of cut-offs times provided by the carrier when available for this particular leg. A cut-off time indicates the latest date and time by which a task must be completed. For example, the latest date and time by where certain documentation must be provided by the Shipper.
+description: Cut-off times for this leg, when provided by the carrier. A cut-off time indicates the latest date and time by which a task must be completed. For example, the latest date and time by which certain documentation must be provided by the shipper.
  • Apply / Chat
Suggestion importance[1-10]: 4

__

Why: The suggestion correctly identifies and fixes grammatical errors in the API documentation, which improves its clarity and professionalism.

Low
  • Update

palatsangeetha
palatsangeetha previously approved these changes Jan 8, 2026
Co-authored-by: palatsangeetha <138600841+palatsangeetha@users.noreply.github.com>
@HenrikHL HenrikHL merged commit 37a7a76 into master Jan 8, 2026
1 check passed
@HenrikHL HenrikHL deleted the SD-2691_Add-Cutoff-Dates branch January 8, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants