TGViewer
Находки в опенсорсе: Python Находки в опенсорсе: Python @opensource_findings_python · 1.06K subscribers
Post #333 200
🚀 New issue to wemake-services/django-modern-rest by @sobolevn
📝 Improve `re_path` default parameter schema (#1439)


Currently we default to str as schema for all patterns in re_path. However, this is not the only thing we can do. We can also copy the pattern itself to the schema. Example:

re_path(r'^v(?P<version>\d+)/$', VersionController.as_view())  # schema: {type: string}

We can copy the pattern as well:

# re_path (?P<version>\d+)
- name: version
in: path
schema: {type: string, pattern: '^\d+$'}

This way users would have more info about what is expected.
See

django-modern-rest/dmr/openapi/generators/component_parsers.py

Lines 136 to 152 in 87a02f5

for current schema generation.


#feature #good_first_issue #help_wanted #openapi #opensource_september #django_modern_rest
sent via relator
More from @opensource_findings_python
  1. Sep 22, 2026🚀 New issue to faststream-community/zMQTT by @borisalekseev 📝 Mark flaky Artemis test xf…
  2. Sep 17, 2026Помните про https://github.com/ozeranskii/httptap? Я писал о нем давно еще - > тут. Наклеп…
  3. Sep 15, 2026🚀 New issue to wemake-services/django-modern-rest by @sobolevn 📝 `test_custom_union_form…
  4. Sep 13, 2026🚀 New issue to wemake-services/django-modern-rest by @milssky 📝 Changes in benchmarking…
  5. Sep 13, 2026🚀 New issue to wemake-services/django-modern-rest by @sobolevn 📝 Fix `operation_id` defa…
  6. Sep 13, 2026🚀 New issue to wemake-services/django-modern-rest by @sobolevn 📝 Fix unused `security` f…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →