with version 0.25.1 having a schema like
RCloneConfig:
type: object
description: Dictionary of rclone key:value pairs (based on schema from '/storage_schema')
properties:
type:
type: string
required:
- type
additionalProperties:
oneOf:
- type: number
- type: string
nullable: true
- type: boolean
- type: object
gives python code like
class RCloneConfig(BaseAPISpec):
type: str
which causes pydantic to ignore anything except type
.
without the required property no class is generated and parent classes refer directly to Optional[Dict[str, Union[float, Optional[str], bool, Dict[str, Any]]]]
I'm not even sure this can be properly modeled in pydantic, with both validating the required property and checking that the arbitrary types conform to the correct value types (Extra.allow wouldn't check the value types). But thought I'd report it anyways just in case.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too