From 77553b35bc755a22af02736070574d8346f0b761 Mon Sep 17 00:00:00 2001 From: Onkar Dahale Date: Wed, 1 Jul 2026 20:15:35 +0900 Subject: [PATCH] python: accept free-form custom extension vendors Custom extension vendor names are free-form strings in the current OSI specification and JSON schema. The Python model still typed OSICustomExtension.vendor_name as OSIVendor, which rejects schema-valid documents using a vendor name outside the built-in well-known list. Change vendor_name to str so the Python package accepts any spec-valid custom extension vendor name. Keep OSIVendor available as well-known constants for existing callers. Update the converter guide to stop telling contributors to add new vendors to a core enum. Signed-off-by: Onkar Dahale --- converters/README.md | 2 +- python/src/ossie/models.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/converters/README.md b/converters/README.md index 1ceb3b83..9dd4f981 100644 --- a/converters/README.md +++ b/converters/README.md @@ -281,7 +281,7 @@ Given the [TPC-DS example](../examples/tpcds_semantic_model.yaml) included in th To add support for a new vendor: -1. Add the vendor to the `vendors` enum in the [core specification](../core-spec/spec.md) if not already present. +1. Use a stable `vendor_name` string in each custom extension emitted by the converter. 2. Define the custom extension schema for the vendor (what vendor-specific metadata fields are supported in the `data` JSON). 3. Implement the export converter (Ossie → Vendor). 4. Implement the import converter (Vendor → Ossie). diff --git a/python/src/ossie/models.py b/python/src/ossie/models.py index 4d0fe57a..b0db1cc0 100644 --- a/python/src/ossie/models.py +++ b/python/src/ossie/models.py @@ -35,7 +35,7 @@ class OSIDialect(str, Enum): class OSIVendor(str, Enum): - """Vendors with supported custom extensions.""" + """Well-known vendor names for custom extensions.""" COMMON = "COMMON" SNOWFLAKE = "SNOWFLAKE" @@ -63,7 +63,7 @@ class OSICustomExtension(BaseModel): model_config = ConfigDict(frozen=True) - vendor_name: OSIVendor + vendor_name: str data: str