Aller au contenu
login
arrow_backRetour aux issues
wemake-services/django-modern-rest #1300

Fix how `Controller` generates `additionalOperations`

ecoDébutant bug good first issue help wanted openapi

descriptionDescription

See https://spec.openapis.org/oas/v3.2.0.html#path-item-object `django-modern-rest` can use custom `allowed_http_methods` to add any desired additional HTTP methods. But, right now `Controller` does not respect to this option when generating schema: https://github.com/wemake-services/django-modern-rest/blob/3e2874f216bd9507efa46a4e45e32072f86cc327/dmr/controller.py#L529-L555 But, this is not correct. We can only add methods that are defined on `PathItem` directly. All other items must go to `additionalOperations` dict. This needs to be fixed, tested, and schema must be generated and tested as well.
codeOuvre sur GitHub