Skip to content

Commit

Permalink
customize schema
Browse files Browse the repository at this point in the history
  • Loading branch information
bojiang committed Feb 25, 2021
1 parent cc104f9 commit 3d910e5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bentoml/adapters/base_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class BaseInputAdapter:
def __init__(self, http_input_example=None, **base_config):
self._config = base_config
self._http_input_example = http_input_example
if base_config.get('request_schema') is not None:
self.request_schema = base_config['request_schema']

@property
def config(self):
Expand All @@ -56,6 +58,10 @@ def request_schema(self):
"""
return {"application/json": {"schema": {"type": "object"}}}

@request_schema.setter
def _set_request_schema(self, schema):
setattr(self, 'request_schema', schema)

@property
def pip_dependencies(self):
"""
Expand Down

0 comments on commit 3d910e5

Please sign in to comment.