SEMP java client INVALID PARAMETER

msharpe
msharpe Member Posts: 17

Hi,

The Semp v2 java client built via swagger code gen doesn't appear to be able to handle a comma separated list of selects and where clauses.

Using selects - queueName,msgs.count:

ApiClient.buildUrl calls escapeString(value) which causes 'queueName,msgs' not a valid attribute.

If i change the change to remove the escapeString call it works.

How can i workaround this without copying the generated source control?

Tagged:

Comments

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 594 admin

    Hi @msharpe ... I ran into something similar when working on the SEMPv2 Java tutorial. I don't have an answer for you, but I'll ping someone at HQ who might be able to shed some light?

  • msharpe
    msharpe Member Posts: 17

    Thanks @Aaron appreciate any feedback

  • msharpe
    msharpe Member Posts: 17

    @Aaron id guess its a bug on the server side whereby it cant decode it properly, although the comma looks fine in error response

  • msharpe
    msharpe Member Posts: 17

    @Aaron , a separate question.

    I was working on the assumption that the collections and data lists returned in the response would have some ordering, so you can correlate between the queue name and the counts. This doesn't appear to be the case so i have no way to determine which queues have messages.

    Am i missing something?

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 594 admin

    Hi @msharpe . So IIRC, I was trying to get the SEMPv2 samples compiled using OpenAPI Tools tooling (not Swagger) (it forked from it), and that was coded to only split on period . and dash -. But comma wouldn't work. But if you're using Swagger then maybe it's just similar but not related. I guess there are some issues with Swagger codegen where it wants to escape the comma. Any way in Swagger to escape the comma? Backslash..? I'm not sure. But you're saying if you hack the generated Swagger Java code and remove that escapeString() then it works fine with two variables..?


    For your 2nd question, usually we start a new conversation for new question. But I did some quick tests with SEMPv2 and a local broker, using the monitor/msgVpns/blah/queues endpoint and it looked to be ordered the same way. I would very much assume that it must be. Can you reproduce an example where this isn't the case, or show some screenshots or something? (And start a new thread?) 🙏🏼

  • msharpe
    msharpe Member Posts: 17

    @Aaron i found the issue. When using a where clause the ordering is wrong. If i remove the where it lines up. Feels like a bug but i can live without the where.

    Thanks