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

16670 fix OpenAPI schema generation with nested serializers #17078

Merged
merged 4 commits into from
Aug 27, 2024

Conversation

arthanson
Copy link
Collaborator

@arthanson arthanson commented Aug 5, 2024

Fixes: #16670

Adds 'Brief' to serializer name if it is called with nested=True, Adding 'Nested' conflicts with existing Nested Serializers, so went with Brief.

@arthanson arthanson changed the title DRAFT: 16670 fix OpenAPI schema generation with nested serializers 16670 fix OpenAPI schema generation with nested serializers Aug 5, 2024
@arthanson arthanson marked this pull request as ready for review August 5, 2024 15:16
@arthanson arthanson requested a review from jeremystretch August 5, 2024 15:16
Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to incorrectly modify certain filters for related objects. For instance, the type for the region filter for circuits (which matches on a slug) is now reported as an integer rather than a string.

2510c2512,2513
<             type: string
---
>             type: integer
>         description: Region (slug)
2518c2521,2522
<             type: string
---
>             type: integer
>         description: Region (slug)

@arthanson
Copy link
Collaborator Author

This looks like develop having a fix for the id -> string that wasn't merged into this PR. I merged in the latest develop and diff'd the .yaml files and they look correct from what I see. Also note when switching/checking you may need to remove the cache line here: https://github.com/netbox-community/netbox/blob/develop/netbox/netbox/urls.py#L60

@jeremystretch jeremystretch merged commit 4f225b4 into develop Aug 27, 2024
6 checks passed
@jeremystretch jeremystretch deleted the 16670-nested-serializer branch August 27, 2024 16:57
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants