Hello again, I come to you with another issue. I'm trying to test an operation with path parameters.
Source of the schema is here: https://github.com/bali182/oats/blob/mocker-example/projects/openapi-e2e-test/kitchenSink.json
When sending primitve type parameters (boolean, string, or number) its working as expected. However when I'm sending array or object parameters I get an error:
[INFO ] < [400] {
errors: [
"Invalid path param arrayInPath. Expected value of type array but received 'a,b'",
"Invalid path param objectInPath. Expected value of type object but received 's,str,b,false,n,1'",
],
}
For this URL: /path-params/foo/1/true/a,b/s,str,b,false,n,1
This is the relevant part of the schema:
{
"/path-params/{stringInPath}/{numberInPath}/{booleanInPath}/{arrayInPath}/{objectInPath}": {
"parameters": [
{
"name": "stringInPath",
...
},
{
"name": "numberInPath",
...
},
{
"name": "booleanInPath",
...
},
{
"name": "arrayInPath",
"required": true,
"in": "path",
"style": "simple",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
},
{
"name": "objectInPath",
"required": true,
"in": "path",
"style": "simple",
"schema": {
"type": "object",
"properties": {
"s": {
"type": "string"
},
"n": {
"type": "number"
},
"b": {
"type": "boolean"
}
}
}
}
],
"get": {
...
}
}
}
Now for serialization, I'm using the simple method in this case described here:
https://swagger.io/docs/specification/serialization/
And I don't have explode on which is the default.
Am I misunderstanding the parameter serialization or is the mocker library expecting path parameters differently?
Thank you,
Balazs
Hello again, I come to you with another issue. I'm trying to test an operation with path parameters.
Source of the schema is here: https://github.com/bali182/oats/blob/mocker-example/projects/openapi-e2e-test/kitchenSink.json
When sending primitve type parameters (boolean, string, or number) its working as expected. However when I'm sending array or object parameters I get an error:
For this URL:
/path-params/foo/1/true/a,b/s,str,b,false,n,1This is the relevant part of the schema:
Now for serialization, I'm using the
simplemethod in this case described here:https://swagger.io/docs/specification/serialization/
And I don't have
explodeon which is the default.Am I misunderstanding the parameter serialization or is the mocker library expecting path parameters differently?
Thank you,
Balazs