I want to use this library https://api.sap.com/api/SAPEventMeshDefaultMessagingAPIs/cloud-sdk/Java to post messages to my queue.
What have I tried so far: Removed OneOf keywords as per documentation Generation of the library failed but the artifacts were created successfully
What failed: Using SynchronousMessagingApi in particular this method queuesQueueNameMessagesPost to post messages to queue.
I have two issues with this api:
First, the content type 'any-content-type' is hardcoded and it always throws error if not uncommented.
final String[] localVarContentTypes = { "any-content-type" };
in method selectHeaderContentType it always picks the hardcoded content type 'any-content-type'
Second, the method queuesQueueNameMessagesPost signature for payload is a java.io.File but event messaging does not file input.
Any help would be appreciated. Thanks
There are two ways of fixing the specification:
any-content-type:
byapplication/json:
ortext/plain:
on the broken variables and methodsBC-CP-EM-MES
if you have access to service now and ask the team for a fix on the spec file.