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

Handling write_only fields on OpenAPISchema #361

Merged
merged 1 commit into from
Nov 7, 2019
Merged

Conversation

fao89
Copy link
Member

@fao89 fao89 commented Nov 4, 2019

https://pulp.plan.io/issues/5622
closes #5622

Please be sure you have read our documentation on creating PRs:
https://docs.pulpproject.org/en/3.0/nightly/contributing/pull-request-walkthrough.html

@fao89 fao89 changed the title Handling read_only/write_only fields on OpenAPISchema WIP - Handling read_only/write_only fields on OpenAPISchema Nov 4, 2019
@fao89 fao89 force-pushed the 5622 branch 3 times, most recently from 77e45ff to b032fd0 Compare November 5, 2019 13:39
@fao89 fao89 changed the title WIP - Handling read_only/write_only fields on OpenAPISchema Handling write_only fields on OpenAPISchema Nov 5, 2019
Copy link
Member

@dkliban dkliban left a comment

Choose a reason for hiding this comment

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

Thank you!

@dkliban dkliban merged commit 9a5dfe0 into pulp:master Nov 7, 2019
if self.method.lower() == "get":
new_fields = OrderedDict()
for field_name, field in serializer.fields.items():
if not field.write_only: # Removing write_only fields
Copy link
Member Author

Choose a reason for hiding this comment

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

@daviddavis this PR is half of the patch linked above, it is the equivalent to ReadOnlySerializer from that patch

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.

None yet

2 participants