Skip to content

Conversation

@mattt
Copy link
Contributor

@mattt mattt commented Nov 7, 2023

Related to #188

API resources define a common id field, which requires additional bookkeeping in _prepare_model. However, these fields aren't used, and either shadow a field on the resource or can be computed. This PR removes id from the base model, adds properties for subclasses that don't have an id field (like Hardware and Collection), and marks them as deprecated, for anyone who is relying on that behavior.

mattt added 2 commits November 7, 2023 10:20
Replace id with property for aliased fields

Signed-off-by: Mattt Zmuda <[email protected]>
@mattt mattt merged commit db51ee0 into main Nov 7, 2023
@mattt mattt deleted the mattt/remove-id-field branch November 7, 2023 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants