django-rest-framework icon indicating copy to clipboard operation
django-rest-framework copied to clipboard

Represent SafeString as plain string on schema rendering.

Open hashlash opened this issue 3 years ago • 5 comments

Note: Before submitting this pull request, please review our contributing guidelines.

Description

Fix #8428.

hashlash avatar Mar 25 '22 01:03 hashlash

I tried running tox -e docs on branch master, and it also failed (with the same error). So the problem shouldn't be from the changes in this PR.

Should we wait for the fix, or can we merge it first?

hashlash avatar Mar 25 '22 03:03 hashlash

The source of error: https://github.com/mkdocs/mkdocs/issues/2799

hashlash avatar Mar 25 '22 03:03 hashlash

The error should be fixed in #8433.

hashlash avatar Mar 27 '22 00:03 hashlash

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 13 '22 01:06 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 13 '22 02:08 stale[bot]

can you add more relevant tests for the changes?

@auvipy I think the test is sufficient. As long as it can render SafeString, I think it's good enough.

Or could you elaborate on what kind of test I should add?

hashlash avatar Nov 23 '22 13:11 hashlash

I have requested review from another OpenAPI specialist

auvipy avatar Nov 23 '22 13:11 auvipy

Btw, here's the section in PyYAML that discuss about representing custom object: https://pyyaml.org/wiki/PyYAMLDocumentation#constructors-representers-resolvers

hashlash avatar Nov 23 '22 14:11 hashlash

Oops, you're right. I just read the discussion #8453, but wasn't aware with the drf-spectacular renderer implementation. Based on the discussion, going forward, the renderer part will also be deprecated from rest_framework?

hashlash avatar Nov 23 '22 15:11 hashlash

@hashlash, yes. everything that does not belong to the schema interface itself will be retired and removed eventually.

tfranzel avatar Nov 23 '22 16:11 tfranzel