Skip to content

Commit

Permalink
Add register_spec_plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
lafrech committed Mar 24, 2017
1 parent 43c8760 commit 0b0a49c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flask_rest_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,7 @@ def register_converter(self, converter, conv_type, conv_format):
def register_field(self, field, field_type, field_format):
"""Register Marshmallow field in docs"""
self._apispec.register_field(field, field_type, field_format)

def register_spec_plugin(self, plugin):
"""Register apispec plugin"""
self._apispec.register_spec_plugin(plugin)
3 changes: 3 additions & 0 deletions flask_rest_api/spec/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,6 @@ def register_converter(self, converter, conv_type, conv_format):

def register_field(self, field, field_type, field_format):
FIELD_MAPPING[field] = (field_type, field_format)

def register_spec_plugin(self, plugin):
self.spec.setup_plugin(plugin)

0 comments on commit 0b0a49c

Please sign in to comment.