Skip to content

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
@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

Development

Successfully merging this pull request may close these issues.

Full definitons of swagger responses are possibly being replaced with brief definitions due to nested serializers

2 participants