Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 Creature Traits #608

Merged
merged 3 commits into from
Nov 23, 2024
Merged

Conversation

calumbell
Copy link
Contributor

This PR closes #541 by updating the v2/creatures endpoint to also return a creature's traits. As this information was already part of the dataset it was simply a case of creating a new Serializer and ViewSet based on the CreatureTrait model.

Additional code was added to the /creatures view to avoid an N+1 error on th new traits fields, see issue #577

@calumbell
Copy link
Contributor Author

Ah, of course this would explode the tests. It changes the shape of the API response for the /creatures endpoint by adding the traits field so that it no longer matches the expected result. Will go ahead and update that

@augustjohnson augustjohnson merged commit 2df92ba into open5e:staging Nov 23, 2024
2 checks passed
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.

API V2 - /creatures endpoint does not return Creature Traits
2 participants