Ask a question
When i have something like this:
@my_api.expect(input_model)
with the model being:
input_model = my_api.model('InputDataModel', {
'customerNumber': fields.String(
description='Customer number that was stored',
example='801000000029'
)
...
})
It adds a parameter to the swagger.json named payload which is just an json-object.
When i use something like this:
@my_api.doc(
params={
'customerNumber': {
'description': 'Customer ID (required)',
'in': 'body',
'type': 'string',
'required': True,
'example': '702000000020'
},
it defines the field properly in the swagger.json. If i add both, i get both, so the sandbox would add a field payload to the outgoing request. I think either expect should create the same fields as using params= does, no? Am i missing something?
Additional context
% pip list | grep -i flask
Flask 3.0.3
flask-cors 6.0.1
flask-restx 1.3.2
Flask-SQLAlchemy 3.1.1
Ask a question
When i have something like this:
with the model being:
It adds a parameter to the swagger.json named
payloadwhich is just an json-object.When i use something like this:
it defines the field properly in the swagger.json. If i add both, i get both, so the sandbox would add a field
payloadto the outgoing request. I think eitherexpectshould create the same fields as usingparams=does, no? Am i missing something?Additional context