-
Notifications
You must be signed in to change notification settings - Fork 440
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
Hide read_only=True nested serializers from data #824
Open
curiousKonstantin
wants to merge
68
commits into
axnsan12:master
Choose a base branch
from
curiousKonstantin:1.21.x
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curiousKonstantin
commented
Nov 29, 2022
- Use "allOf" OpenAPI property to combine $ref object with extra parameters with $ref object
- Hide definition from request payload representation if read_only=True argument was provided for a nested serializer
- Show "description" for a $ref if "help_text" was provided for a nested serializer
`permission_classes` expects tuple but list was provided
fix a bug: url from swagger_settings.DEFAULT_API_URL is not working
Check for allow_null attribute
This change fixes an `OPTIONS` request to the API page which will return a successful response, but the `TemplateHTMLRender` will not be prepared to render it since there is no template name provided in either the view or response [1]. [1]: https://github.com/encode/django-rest-framework/blob/f0a5b958a134e8cd94e3ef3263e8fa623ac9b82f/rest_framework/renderers.py#L178-L189
fix map source mapping
[readme] Fix missing re_path import
Add utf-8 support for generated formats
Remove universal wheel, python 2 is unsupported
Add prepublish compatibility checks, a composite installation action and explicitly set tox targets
…ering-with-TemplateHTMLRenderer handle errors rendering with TemplateHTMLRenderer
…one-field add support for working with pytz object field
Add checker for allow_null attr
url from DEFAULT_API_URL now works axnsan12#681
This commit will make sure that `Django :: 3.2` will show up in the classifiers list on PyPI: https://pypi.org/project/drf-yasg/ (The magic happens because we parse the README to get supported Django): https://github.com/DavidCain/drf-yasg/blob/ee29412d3cdb311/setup.py#L36 3.2 support should already exist ================================ A closed pull request, axnsan12#735, noted support for Django 3.2 in both `tox.ini`, and the README. That PR was closed in favor of axnsan12#741, which edited `tox.ini` and switched to GitHub Actions. axnsan12#735 (comment) This project has been testing on Django 3.2 for a long time (about a year). I think we can declare it supported it the README!
On `zsh` (a popular shell, and the default for macOS), install fails: $ pip install -U -e .[validation] zsh: no matches found: .[validation] Quote the arguments so that `bash` or `zsh` will succeed.
Declare Django 3.2 support in README, classifiers
Fix `pip install` command for contributors on zsh
…Only (to hide nested serializer from payload if read_only=True has been set) and description (to show different descriptions for the same ref)
I was annoyed by frontenders constantly ask "Why do you expect an object in payload?" and was frustrated by impossibility to show help_text from nested serializer on swagger schema (because each field meaning need to be explained, separately) so I've made this workaround with allOf property to fix the issues. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.