python-restx / flask-restx

Fork of Flask-RESTPlus: Fully featured framework for fast, easy and documented API development with Flask
https://flask-restx.readthedocs.io/en/latest/
Other
2.16k stars 335 forks source link

fix: :bug: Silently document id collision namespace.py #615

Closed SebastianLopezTuring closed 2 months ago

SebastianLopezTuring commented 2 months ago

Shortcuts can silently collide and overwrite end-points, generating incorrect swagger documentation.

The following example is incorrectly generating the swagger document: image

If you press the first get method all the methods having the same doc will expand at the same time: image

image

It should raise a ValidationError with the proposed fixed as follows:

image

SebastianLopezTuring commented 2 months ago

I made this pull request using a non-authorized user.