Add table name to the schema objects
Every object now has an attribute with the name of the table holding it. the attribute for it is x-table-name Change-Id: I2c86c5dc068ed9a408cf2ffbf917f21c9e16fafe
This commit is contained in:
parent
ca688e4290
commit
7293abc01a
|
@ -366,6 +366,7 @@ class OASPrinter(ModelsPrinter):
|
|||
self._models_obj['components']['schemas'][model.__name__] = self._model
|
||||
self._model['type'] = 'object'
|
||||
if is_first_class(model):
|
||||
self._model['x-table-name'] = model.table_name
|
||||
path_plural = '/' + model.table_name
|
||||
self._models_obj['paths'][path_plural] = {
|
||||
'get': self.get_list_path(model),
|
||||
|
|
Loading…
Reference in New Issue