Open Arrow2dknee opened 1 month ago
hi @Arrow2dknee
The jsonblob mentions $ref elements, but the actual $ref values are missing. Would it be possible to share the endpoint and related components/schemas, that way we can try to reproduce your setup and investigate your issue.
Hi @thim81,
The API looks like below:
AddVehicleDto (from $ref) looks like below
The form-data needs the below required information- 'files' - a json file 'vehicleType' - string representation of a mongo id 'release' - string representation of a mongo id
I have written my overwrites for this endpoint as below:
Let me know if this helps.
Hi @thim81 , Could you please have a look into my comment above?
Hi @thim81 , I'm still having this issue. Could you please let me know if you have all the information to assist me with this issue? If not, let me know what you need.
hi @Arrow2dknee
Would it be possible to share the OpenAPI endpoint as YAML or JSON, only that endpoint?
Hello there.
I have a POST endpoint called /vehicles which has been implemented as multipart/form-data and accepts 3 properties, namely-
In postman, this request would look like below screenshot-
and, the OpenAPI spec is as follows-
{ "/v1/vehicles": { "post": { "operationId": "VehicleController_addVehicle", "parameters": [], "requestBody": { "required": true, "description": "Vehicle data", "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/AddVehicleDto" } } } }, "responses": { "200": { "description": "Vehicles added successfully" }, "401": { "description": "Authorization is required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedExceptionDto" } } } }, "404": { "description": "Vehicle type does not exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundExceptionDto" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnknownExceptionDto" } } } } }, "tags": [ "Vehicles" ], "security": [ { "bearer": [] } ] } } }
Alternatively, please find the above spec in jsonblobMy overwrites.yml code looks like below: `- openApiOperation: "POST::/v1/vehicles" overwriteRequestBody:
In the overwrites.yml file, I'm referencing the form-data props as key: 'files', key: 'vehicleType' etc But, I don't think this works as expected.
When running the tests locally, got the following error from API-
Could you please guide me what I'm doing incorrectly.