First let me thank you for making this library - it is quite amazing. I am just getting started with this, and I am presuming I am doing something wrong, or missing a step. But my scenario is this: I have an API that take a string parameter. But when I attempt to pass the parameter value into the Operation object, I get and error.
The code, for example:
>>> op = app.s('/api/blueprints/{blueprint_id}/racks').get
>>> op
<pyswagger.spec.v2_0.objects.Operation object at 0x106518a90>
>>> op.parameters
[<pyswagger.spec.v2_0.objects.Parameter object at 0x10abddb10>]
>>> op.parameters[0]
<pyswagger.spec.v2_0.objects.Parameter object at 0x10abddb10>
>>> op.parameters[0].name
u'blueprint_id'
>>> op.parameters[0].type
u'string'
>>> op.parameters[0].format
u'string'
Issuing the call to create the request, response objects:
>>> op(blueprint_id="123")
results in this error:
ValueError: Can't resolve type from:(string, string)
As a workaround, I created a primitive factory to add the "string"->"string" mapping. And then I am A-OK.
@jeremyschulman The primitive map is created based on this table. If I missed anything and (string, string) should be added, please feel free to let me know.
Hi,
First let me thank you for making this library - it is quite amazing. I am just getting started with this, and I am presuming I am doing something wrong, or missing a step. But my scenario is this: I have an API that take a string parameter. But when I attempt to pass the parameter value into the Operation object, I get and error.
The code, for example:
Issuing the call to create the request, response objects:
results in this error:
As a workaround, I created a primitive factory to add the "string"->"string" mapping. And then I am A-OK.
I am curious if I am simply missing something so that I can avoid creating this factory. I appreciate your time to answer this question.
Cheers, -- Jeremy