Skip to content

Conversation

@HenrikHL
Copy link
Contributor

@HenrikHL HenrikHL commented Jan 8, 2026

User description

SD-2751: Add Facility Name (CS)
SD-2761: Add Facility Name (BKG, EBL)

facilityName is added next to locationName wherever a Facility object is also present


PR Type

Enhancement


Description

  • Add facilityName property to facility location schemas

  • Property supports up to 100 characters with example value

  • Applied consistently across CS, BKG, EBL, and PINT APIs


Diagram Walkthrough

flowchart LR
  A["Facility Location Schema"] -->|Add facilityName property| B["CS v1.0.2"]
  A -->|Add facilityName property| C["BKG v2.0.4"]
  A -->|Add facilityName property| D["EBL v3.0.3"]
  A -->|Add facilityName property| E["PINT v3.0.0"]
Loading

File Walkthrough

Relevant files
Enhancement
CS_v1.0.2.yaml
Add facilityName to CS facility schema                                     

cs/v1/CS_v1.0.2.yaml

  • Added facilityName property to facility location schema
  • Property is a string with maximum length of 100 characters
  • Includes description and example value "Building 123"
+5/-0     
BKG_v2.0.4.yaml
Add facilityName to BKG facility schema                                   

bkg/v2/BKG_v2.0.4.yaml

  • Added facilityName property to facility location schema
  • Property is a string with maximum length of 100 characters
  • Includes description and example value "Building 123"
+5/-0     
EBL_v3.0.3.yaml
Add facilityName to EBL facility schema                                   

ebl/v3/EBL_v3.0.3.yaml

  • Added facilityName property to facility location schema
  • Property is a string with maximum length of 100 characters
  • Includes description and example value "Building 123"
+5/-0     
EBL_ISS_v3.0.3.yaml
Add facilityName to EBL issuance facility schema                 

ebl/v3/issuance/EBL_ISS_v3.0.3.yaml

  • Added facilityName property to facility location schema
  • Property is a string with maximum length of 100 characters
  • Includes description and example value "Building 123"
+5/-0     
EBL_PINT_v3.0.0.yaml
Add facilityName to PINT facility schema                                 

pint/v3/EBL_PINT_v3.0.0.yaml

  • Added facilityName property to facility location schema
  • Property is a string with maximum length of 100 characters
  • Includes description and example value "Building 123"
+5/-0     
Configuration changes
styleguide.json
Update styleguide configuration                                                   

.stoplight/styleguide.json

  • Modified styleguide configuration file
+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-2751
🔴 Add a new optional attribute facilityName located immediately after locationName on each
Location that can be specified using a Facility object.
Ensure `facilityName` is a string with `maxLength: 100`.
Set description to "The name of the facility."
🟢
🎫 #SD-2761
🟢 Add a new optional attribute `facilityName` inside the Facility object.
Ensure `facilityName` is a string with `maxLength: 100`.
Set description to "The name of the facility."
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:
Weak string validation: The newly added facilityName schema field only enforces maxLength and may allow
empty/whitespace-only values, so additional validation constraints may be needed depending
on API requirements.

Referred Code
facilityName:
  maxLength: 100
  type: string
  description: The name of the facility.
  example: Building 123

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 the purpose of facilityName

The API documentation for the new facilityName field should be updated to
clarify its purpose and distinguish it from the existing locationName field to
prevent confusion and data inconsistencies.

Examples:

cs/v1/CS_v1.0.2.yaml [1527-1531]
        facilityName:
          maxLength: 100
          type: string
          description: The name of the facility.
          example: Building 123
bkg/v2/BKG_v2.0.4.yaml [2819-2823]
        facilityName:
          maxLength: 100
          type: string
          description: The name of the facility.
          example: Building 123

Solution Walkthrough:

Before:

# In cs/v1/CS_v1.0.2.yaml
...
properties:
  facilityName:
    maxLength: 100
    type: string
    description: The name of the facility.
    example: Building 123
  facilityCode:
    type: string
    ...
...

After:

# In cs/v1/CS_v1.0.2.yaml
...
properties:
  facilityName:
    maxLength: 100
    type: string
    description: |
      The specific name of the facility (e.g., a terminal or warehouse name),
      especially useful when a standard `facilityCode` is not available.
      This is distinct from `locationName`, which describes the broader location (e.g., city or port name).
    example: 'HMM Inland Terminal Hamburg'
  facilityCode:
    type: string
    ...
...
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies a potential ambiguity between the new facilityName and an existing locationName, which could lead to inconsistent API usage and data quality issues.

Medium
General
Add validation to prevent empty facility names

Add minLength: 1 and a pattern to the facilityName property to prevent it from
being an empty or whitespace-only string.

ebl/v3/issuance/EBL_ISS_v3.0.3.yaml [2953-2957]

 facilityName:
   maxLength: 100
+  minLength: 1
   type: string
+  pattern: ^\S(?:.*\S)?$
   description: The name of the facility.
   example: Building 123
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly identifies that facilityName could be an empty or whitespace-only string and proposes adding validation (minLength and pattern) to improve data quality.

Low
  • Update

@HenrikHL HenrikHL requested a review from Copilot January 9, 2026 07:29
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new facilityName property to facility location schemas across multiple DCSA OpenAPI specifications. The property provides a way to name facilities (e.g., "Building 123") alongside existing locationName fields, supporting up to 100 characters.

Key changes:

  • Added facilityName string property with 100-character maximum length to all facility location schemas
  • Applied consistently across CS v1.0.2, BKG v2.0.4, EBL v3.0.3, EBL_ISS v3.0.3, and PINT v3.0.0
  • Includes description "The name of the facility." and example value "Building 123"

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
cs/v1/CS_v1.0.2.yaml Adds facilityName to Commercial Schedule facility location schema
bkg/v2/BKG_v2.0.4.yaml Adds facilityName to Booking facility location schemas across multiple endpoints
ebl/v3/EBL_v3.0.3.yaml Adds facilityName to Electronic Bill of Lading facility location schemas
ebl/v3/issuance/EBL_ISS_v3.0.3.yaml Adds facilityName to EBL Issuance facility location schemas
pint/v3/EBL_PINT_v3.0.0.yaml Adds facilityName to Platform for Interoperability facility location schemas
.stoplight/styleguide.json Minor styleguide configuration update

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@HenrikHL HenrikHL merged commit fa3f39a into master Jan 9, 2026
1 check passed
@HenrikHL HenrikHL deleted the SD-2761_SD-2751_Add-facilityName branch January 9, 2026 10:16
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