Skip to content

Conversation

arttuperala
Copy link
Contributor

Description of the Change

Omits the #/components/parameters/include reference from operation parameters if the given serializer does not implement included_serializers.

At least the documentation makes it seem that included_serializers is the only official way of adding include to the parameters, so I assume checking it like this would be safe.

Checklist

  • PR only contains one change (considered splitting up PR)
  • unit-test added
  • documentation updated
  • CHANGELOG.md updated (only for user relevant changes)
  • author name in AUTHORS

Copy link
Member

@sliverc sliverc left a comment

Choose a reason for hiding this comment

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

Thanks for this addition. I am happy to merge this.

Just for your information the OpenAPI schema support within DJA will be deprecated in the near future, see discussion at #1082. The recommended way will be to use drf-spectecular-json-api. Best have a look there and see whether you can support the project.

@sliverc sliverc merged commit a7c1a00 into django-json-api:main Jun 12, 2023
@arttuperala arttuperala deleted the autoschema-skip-include branch June 13, 2023 04:54
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