contributte / apitte

:wrench: An opinionated and enjoyable API framework based on Nette Framework. Supporting content negotiation, debugging, middlewares, attributes, annotations and loving openapi/swagger.
https://contributte.org/packages/contributte/apitte/
MIT License
61 stars 37 forks source link

Improve routing - routes order #69

Closed mabar closed 5 years ago

mabar commented 5 years ago

If routes /foo/bar and /foo/{var} are defined then route /foo/bar should always match for /foo/bar url, no matter in which order are controllers registered. We should also check for collisions.

See also swagger docs

mabar commented 5 years ago

Also /foo and /foo/{bar}/baz should work. Order should be corrected during Schema building, solving that in SimpleRouter would cause performance decrease.

It would be also nice to replace this with endpoints grouping to reduce schema lookups