Cloud Endpoints with Multiple Services Classes

后端 未结 5 734
梦谈多话
梦谈多话 2021-01-03 02:51

I am starting to use Google Cloud Endpoints and I am running in a problem when specifying multiple services classes. Any idea how to get this working?

ApiCon         


        
5条回答
  •  春和景丽
    2021-01-03 03:34

    If I'm not mistaken, you should give different names to each service, so you'll be able to access both, each one with the specific "address".

    @endpoints.api(name='myservice_one', version='v1', description='MyService One API')
    class FirstService(remote.Service):
    ...
    
    @endpoints.api(name='myservice_two', version='v1', description='MyService Two API')
    class SecondService(remote.Service):
    ...
    

提交回复
热议问题