You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should the methods of the class been the operationId?
Yeah, this exactly. Did you get it working?
You'll also need to instantiate the class yourself:
exportclassMyController(){sayHello(context){...}}
And then when you create your Exegesis instance, the controllers option should be:
controllers: [ new MyController() ],
I've been thinking about adding something like a controllerFactory option for a while, where you can specify how controllers get loaded, but right now exegesis won't instantiate that class for you (it wouldn't know what to pass to the constructor), so you have to do it yourself.
I'm trying to export a class instead of functions on my controller file, as show in this example:
https://github.com/exegesis-js/exegesis/blob/40b0b34ed7d5a692e403197f9d510e5972acb2ae/samples/typescript-example/controllers/greetController.ts
But I'm not able to get it working. Should the methods of the class been the operationId?
Thank you
The text was updated successfully, but these errors were encountered: