django-ninja icon indicating copy to clipboard operation
django-ninja copied to clipboard

Fix Paginated Schema default(example value)

Open esc5221 opened this issue 2 years ago • 2 comments

This PR resolves Issue https://github.com/vitalik/django-ninja/issues/560

  • Setting default value for paginator.items_attribute makes items schemas' example value not visible
  • Removed default value of Output Schema

Before

image

After

image

esc5221 avatar Sep 08 '22 03:09 esc5221

Hi @esc5221 would be able to add test cases that covers the issue you described ?

vitalik avatar Sep 08 '22 09:09 vitalik

added new test in test_openapi_schema.py, and edited existing tests, as PagedResponse schema is added in the test scope.

esc5221 avatar Sep 10 '22 03:09 esc5221

@vitalik Do tests just need fixed for this to be merged?

bpdev97 avatar Feb 27 '23 17:02 bpdev97

yes, looks like it's safe to merge if tests are working

vitalik avatar Feb 28 '23 07:02 vitalik

Eagerly waiting for this PR to be merged... @esc5221 @vitalik

jaeyongjaykim avatar Mar 08 '23 08:03 jaeyongjaykim

Merged in a separate PR

Thank you for contribution !

vitalik avatar Apr 12 '23 14:04 vitalik