feat(generated): Authorization (batch c64ce1e7) - #734
Conversation
|
| @@ -1,9 +1,6 @@ | |||
| # This file is auto-generated by oagen. Do not edit. | |||
|
|
|||
| from workos.common.models.connected_account import ConnectedAccount as ConnectedAccount | |||
There was a problem hiding this comment.
Pipes model import removed
Callers that use from workos.pipes.models import ConnectedAccountInput could import it before this change. The re-export is now gone, so that import raises ImportError. Please restore the existing import path.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/workos/pipes/models/__init__.py
Line: 3
Comment:
**Pipes model import removed**
Callers that use `from workos.pipes.models import ConnectedAccountInput` could import it before this change. The re-export is now gone, so that import raises `ImportError`. Please restore the existing import path.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| from .agent_instance_created_data import ( | ||
| AgentInstanceCreatedData as AgentInstanceCreatedData, | ||
| ) | ||
| from .agent_instance_created_data_type import * |
There was a problem hiding this comment.
Wildcard imports expose unrelated names
The new wildcard imports also export names such as Enum, Literal, and TypeAlias from model modules. The wildcard import in workos.common passes those names on again. This makes the public namespace harder to use and maintain; explicit model exports would keep unrelated names out.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/workos/common/models/__init__.py
Line: 57
Comment:
**Wildcard imports expose unrelated names**
The new wildcard imports also export names such as `Enum`, `Literal`, and `TypeAlias` from model modules. The wildcard import in `workos.common` passes those names on again. This makes the public namespace harder to use and maintain; explicit model exports would keep unrelated names out.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| def test_user_role_assignment_source_group_round_trip(self): | ||
| data = load_fixture("user_role_assignment_source_group.json") | ||
| instance = UserRoleAssignmentSourceGroup.from_dict(data) | ||
| serialized = instance.to_dict() | ||
| assert serialized == data | ||
| restored = UserRoleAssignmentSourceGroup.from_dict(serialized) | ||
| assert restored.to_dict() == serialized |
There was a problem hiding this comment.
Populated source group remains untested
This test round-trips the group model by itself, but every source and role-assignment fixture has group: null. A test with a populated group nested in a role assignment would cover the new deserialization and serialization path, so a regression there does not go unnoticed.
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/test_authorization_models_round_trip.py
Line: 529-535
Comment:
**Populated source group remains untested**
This test round-trips the group model by itself, but every source and role-assignment fixture has `group: null`. A test with a populated group nested in a role assignment would cover the new deserialization and serialization path, so a regression there does not go unnoticed.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
Regenerated SDK from spec changes.
Triggered by workos/openapi-spec@e2873c2