def get_spec(self) -> ArgList: return [Field(None, self.actual_type, False)]
def get_spec(self) -> ArgList: return [Field('values', List[self.row_type], False)]
def get_spec(self) -> ArgList: return [Field(None, self._get_subtype(self.shape[1:]), False)]
def test_create_spec__no_file(): field = Field('field', int, False) spec = create_spec('mymethod', Signature([field], field)) assert spec == { 'definitions': { 'error': { 'type': 'object', 'properties': { 'error': { 'type': 'string' }, 'ok': { 'type': 'boolean' } } }, 'request_mymethod': { 'type': 'object', 'properties': { 'field': { 'type': 'integer' } } }, 'response_mymethod': { 'type': 'object', 'properties': { 'data': { 'type': 'integer' }, 'ok': { 'type': 'boolean' } } } }, 'parameters': [{ 'in': 'body', 'name': 'body', 'required': True, 'schema': { '$ref': '#/definitions/request_mymethod' } }], 'responses': { '200': { 'description': 'resp descr', 'schema': { '$ref': '#/definitions/response_mymethod' } }, '400': { 'description': 'resp descr', 'schema': { '$ref': '#/definitions/error' } } }, 'summary': 'mymethod' }
def get_spec(self): return [Field(c, python_type_from_pd_string_repr(d), False) for c, d in zip(self.columns, self.dtypes)]
def get_spec(self) -> ArgList: return [Field('field', int, False), Field('field', str, False)]
def get_spec(self) -> ArgList: return [Field(name, t, False) for name, t in self.item_types.items()]
def get_spec(self) -> ArgList: return [Field(i, t, False) for i, t in enumerate(self.items)]
def get_spec(self) -> ArgList: return [Field('file', bytes, False)]
def get_spec(self) -> ArgList: return [ Field(n, t, False) for n, t in zip(self.feature_names, self.feature_types) ]