connexion.resolver
¶
Module Contents¶
Classes¶
Resolves endpoint functions using REST semantics (unless overridden by specifying operationId) |
|
Resolves endpoint functions based on Flask’s MethodView semantics, e.g. |
Attributes¶
- connexion.resolver.logger¶
- class connexion.resolver.Resolution(function, operation_id)¶
- class connexion.resolver.Resolver(function_resolver=utils.get_function_from_name)¶
- resolve(self, operation)¶
Default operation resolver
- resolve_operation_id(self, operation)¶
Default operationId resolver
- resolve_function_from_operation_id(self, operation_id)¶
Invokes the function_resolver
- class connexion.resolver.RestyResolver(default_module_name, collection_endpoint_name='search')¶
Bases:
Resolver
Resolves endpoint functions using REST semantics (unless overridden by specifying operationId)
- resolve_operation_id(self, operation)¶
Resolves the operationId using REST semantics unless explicitly configured in the spec
- resolve_operation_id_using_rest_semantics(self, operation)¶
Resolves the operationId using REST semantics
- resolve(self, operation)¶
Default operation resolver
- resolve_function_from_operation_id(self, operation_id)¶
Invokes the function_resolver
- class connexion.resolver.MethodViewResolver(default_module_name, collection_endpoint_name='search')¶
Bases:
RestyResolver
Resolves endpoint functions based on Flask’s MethodView semantics, e.g.
- paths:
- /foo_bar:
- get:
# Implied function call: api.FooBarView().get
- class FooBarView(MethodView):
- def get(self):
return …
- def post(self):
return …
- resolve_operation_id(self, operation)¶
Resolves the operationId using REST semantics unless explicitly configured in the spec Once resolved with REST semantics the view_name is capitalised and has ‘View’ added to it so it now matches the Class names of the MethodView
- resolve_function_from_operation_id(self, operation_id)¶
Invokes the function_resolver
- resolve_operation_id_using_rest_semantics(self, operation)¶
Resolves the operationId using REST semantics
- resolve(self, operation)¶
Default operation resolver