def __init__(self, app, name=None, description=None, security=None): """ Initialize the OpenAPI resource. :param name: The short name of the resource. :param description: A short description of the resource. :param security: The security requirements to read the resource. """ super().__init__() self.app = app self.read = operation(params={}, returns=_schema, security=security)(self.read) self.content = None
def __init__(self, content, schema, name=None, description=None, security=None): """ Initialize the static resource. :param content: Static content to return in a read operation. :param schema: Schema of the static content. :param name: Short name of the resource. :param description: Short description of the resource. :param security: Security requirements to read the resource. """ super().__init__(name, description) self.content = content self.schema = schema description = "Read the {} resource.".format(self.name) self.read = operation(params={}, returns=self.schema, description=description, security=security)(self.read)
def __init__(self): super().__init__() self.not_a_valid_operation_type = operation()( self.not_a_valid_operation_type)
def __init__(self): super().__init__() self.create = operation(params={"body": body_schema}, returns=s.uuid())(self.create)