Skip to content

Commit

Permalink
Make init_spec more convenient
Browse files Browse the repository at this point in the history
  • Loading branch information
Fatal1ty committed Jan 30, 2024
1 parent f24f3d4 commit debd7c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 0 additions & 5 deletions openapify/core/base_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ def media_type_helper(


class BaseSchemaPlugin(BasePlugin):
spec: APISpec

def init_spec(self, spec: APISpec) -> None:
self.spec = spec

def schema_helper(
self,
obj: Union[Body, Cookie, Header, QueryParam],
Expand Down
4 changes: 3 additions & 1 deletion openapify/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@


class BasePlugin:
spec: APISpec

def init_spec(self, spec: APISpec) -> None:
pass
self.spec = spec

def schema_helper(
self,
Expand Down

0 comments on commit debd7c6

Please sign in to comment.