MonkeyCanCode commented on code in PR #18428:
URL: https://github.com/apache/iceberg/pull/18428#discussion_r4689893285


##########
open-api/rest-catalog-open-api.py:
##########
@@ -1049,7 +1049,7 @@ class CreateNamespaceResponse(BaseModel):
 
 class GetNamespaceResponse(BaseModel):
     namespace: Namespace
-    properties: dict[str, str] | None = Field(
+    properties: dict[str, Any] | None = Field(

Review Comment:
   No — namespace property values are still strings only. `dict[str, Any]` was 
generated by datamodel-code-generator for `type: [object, "null"]` where  it 
falls back to a generic object and ignores additionalProperties.
   The Python file is generated by make generate, not edited manually. I 
changed this schema to the equivalent OpenAPI 3.1 anyOf form so the generator 
keeps the value type:
   ```
            properties:
   -          type: [ object, "null" ]
   +          anyOf:
   +            - type: object
   +              additionalProperties:
   +                type: string
   +            - type: "null"
              description:
                Properties stored on the namespace, if supported by the server.
                If the server does not support namespace properties, it should 
return null for this field.
                If namespace properties are supported, but none are set, it 
should return an empty object.
   -          additionalProperties:
   -            type: string
              examples:
                - { "owner": "Ralph", 'transient_lastDdlTime': '1452120468' }
              default: { }
   ```
   After regeneration, it produces `dict[str, str] | None` instead of 
`dict[str, Any] | None`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to