MESH : Swagger docs

I’m trying to use a generated client for MESH, using the documented API @ https://digital.nhs.uk/restapi/oas/357490

But in paths for the /messageexchange/{mailbox_id}/outbox it doesn’t declare a requestBody which seems to contradict Message Exchange for Social Care and Health (MESH) API - NHS Digital where the (CSV) data should be in the message body.

Which is right, the API docs or the Swagger API docs ?

Or have I misunderstood totally how the code generation should be done ? More details of that are are here but I expect the Swagger folks to conclude the API description JSON is wrong ?

Hello tc1
I have asked our internal team for guidance on this, once I hold a response I will post the response.

Hello tc1,

Just to make you aware of the Python client/SDK which may be useful to you: GitHub - NHSDigital/mesh-client: A Python client library for NHS Digital MESH.

I am also going to raise awareness of this with the ITOC Team, as it looks like there may be a bug in the OAS.

That is useful.

It certainly confirms ( @ https://github.com/NHSDigital/mesh-client/blob/develop/mesh_client/__init__.py#L428 ) that send message should be POST with a body, and I can read enough Python to use it to help with our actual implementation in Swagger-generated Node.

Hello tc1,

Just to let you know we have raised a JIRA to fix the OpenAPI specification for MESH, thank you for alerting us to this.

I believe the get.responses.200.content item for /messageexchange/{mailbox_id}/inbox/{message_id} might be incorrect as well.

It’s set to empty object, and Swagger is turning this into a ‘null’ type so the API client doesn’t return anything.

In which case it should contain application/vnd.mesh.v2+json items just like /messageexchange/{mailbox_id}/inbox does in it’s get.responses.200.content ?

Presumably declaring it’s media type as something like application/octet-stream - I’m no expert on Describing Responses though.

This is becoming frustrating…

I have sent your latest insight into our consumer support team.

@tc1 thanks for letting us know, a couple of enhancements to the oas definitions have been rolled out …

@tc1 would it be ok to contact you directly for a bit of a faster feedback loop ?

Sure, I DM’d you here.