Open ewarchul opened 3 months ago
@ewarchul I tried using two class variables and not using the classmethod route
and then passing these two variables to the operation decorator and everything works for both parent and child classes. Something like this
Result is
> curl -X GET 'http://localhost:8000/api/base/foo'
Path: /api/base/foo
> curl -X GET 'http://localhost:8000/api/derived/foo'
Path: /api/derived/foo
> curl -X GET 'http://localhost:8000/api/other/foo'
Path: /api/other/foo
> curl -X GET 'http://localhost:8000/api/base/foo/John'
Hello John, Path is /api/base/foo/John
> curl -X GET 'http://localhost:8000/api/derived/foo/John'
Hello John, Path is /api/derived/foo/John
> curl -X GET 'http://localhost:8000/api/other/foo/John'
Hello John, Path is /api/other/foo/John
Hope this helps and sorry if I missed your point.
Hello, first off -- thank you for your work on this great framework! I would like to know if the framework somehow allows the inheritance of registered endpoints from the base class.
Example:
Expected behavior:
It should be possible to
GET
the following endpoints/api/base/foo
and/api/derived/foo
.Currently, only the former endpoint is accessible.