Feature/expand validation pydantic models 3d api#33
Conversation
wholmgren
left a comment
There was a problem hiding this comment.
agent discovered a new issue when trying to do a round trip test with the Matera data: TrackerSystem.east_west_gcr needs an alias to map onto the correct SF property. Recommend an integration test to ensure 3d pydantic models serialize into known working json.
east_west_gcr: float | None = Field(None, alias="eastWestGCR")
| raise ValueError( | ||
| "fixed_voltage_from_inverter is required when power optimizers are configured" | ||
| ) | ||
| if self.dc_ohmic_connector_resistance is not None and self.dc_ohmic_connector_loss != 0.0: |
There was a problem hiding this comment.
is this pre-existing block more strict than sf-core validation and should be removed? the new block and pydantic limits are sufficient?
There was a problem hiding this comment.
This is a new validation check for API v7 (in the upcoming release) that originated from a couple of support issues recently. For those using the SDK, it gets validated it. Those using their own code, the validation service will catch it.
…3D pydantic model to serialize into sample Matera tutorial 3D payload.
@wholmgren thanks for the comments. I have committed the changes for this issue. Explicit alias |
Extend 3D API Pydantic models with contract-compatible validation and optional fields:
Additionally, fix an integration test for the About endpoint for the deprecated API v4.