hugapi / hug

Embrace the APIs of the future. Hug aims to make developing APIs as simple as possible, but no simpler.
MIT License
6.86k stars 388 forks source link

GET endpoints not working when using prefixes in @hug.object.urls #892

Open Hantlowt opened 2 years ago

Hantlowt commented 2 years ago

I'm using hug 2.6.1 with Python 3.8.0 and i have a problem with GET endpoints when i use prefixes in hug.object.urls. For example, this code not working (/test/myendpoint return a 404 http status error) :

@hug.object.urls(prefixes='/test')
class Test:
    def __init__(self):
        pass
    @hug.get('/myendpoint')
    def test():
        return 0

I'm doing something badly ? Or is it really an issue ?