🚀 New issue to wemake-services/django-modern-rest by @joefefs
📝 None endpoints still document a JSON null response body. (#1733)
What's wrong?
For endpoints that returns nothing, the server correctly sends an empty body, but the schema describes that response as application/json with a null schema.
Anything that trusts that schema (like an SDK generator) might try to read this null body as JSON and crash.
How it should be?
The response should NOT have a content key, only a { "description": "No Content" } should suffice so that clients relying on the spec won't try to read a body that does not exist.
🚀 New issue to wemake-services/wemake-python-styleguide by @sobolevn
📝 Move skills into the `wemake_python_styleguide` folder (#3842)
https://library-skills.io requires skills to be in the source folder, see https://github.com/wemake-services/django-modern-rest/tree/master/dmr/.agents/skills
Let's move them there :)
#help_wanted #levelstarter #good_first_issue #wemake_python_styleguide #wps
sent via relator
🚀 New issue to wemake-services/django-modern-rest by @Izcarmt95
📝 Router.include() raises KeyError for a route with an empty pattern ('') (#1657)
Router.include() raises KeyError when the included router has a route with an empty pattern (path('', ...)), which is the usual way to mount a list endpoint at the router's prefix.
from dmr import Controller
from dmr.plugins.pydantic import PydanticSerializer
from dmr.routing import Router, path
class UserListController(Controller[PydanticSerializer]):
def get(self) -> str:
return 'ok'
File ".../dmr/routing.py", line 173, in include
router.metadata_for(original_path),
File ".../dmr/routing.py", line 217, in metadata_for
return self._path_metadata[pattern]
KeyError: '/users'
Router.__init__ stores the metadata of the empty route under '/users/' (normalized with original_prefix=''), but include() looks it up as '/users' (normalized with original_prefix=router.prefix). Routes with a non-empty pattern (path('/<id>', ...)) are fine.
Workaround: use an empty router prefix and write the full segment in each route (Router('', [path('/users', ...)])).
• django-modern-rest 0.15.0 (it worked in 0.13.0, before include() looked up the metadata)
• Django 5.2, Python 3.13
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
AI disclaimer: an AI assistant was used only to help write this issue.
#bug #good_first_issue #help_wanted #opensource_september #django_modern_rest
sent via relator