I'm using the connexion framework for flask. I'd like to group several related functions into a class and I'm wondering whether methods of a class can be used for operationId instead of functions.
Something like
class Job:
def get():
"something"
def post():
"something"
in the describing yaml
file:
paths:
/hello:
post:
operationId: myapp.api.Job.post
You can use the methods if they are available as staticmethods on the class:
class Job:
@staticmethod
def get():
"something"
@staticmethod
def post():
"something"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With