picimako / wiremocha

WireMock framework integration for the IntelliJ platform.
https://plugins.jetbrains.com/plugin/18860-wiremocha
1 stars 0 forks source link

JsonBody array get a warning #65

Closed MiguelAngelLV closed 1 year ago

MiguelAngelLV commented 1 year ago

When I use jsonBody and set a jsona array, WireMocha return warning but is a valid wiremock configuration.

picimako commented 1 year ago

Hi @MiguelAngelLV, Could you please send me an example code snippet for the WireMock configuration, and the warning that you get?

With that information I could look into the issue.

picimako commented 1 year ago

It mgith be related to your question: there is an initiative at WireMock's side to improve the existing schemas: https://github.com/wiremock/spec/issues/3 I included a question there about the jsonBody property whether it supports types other than object because the Java side seems to support it.

MiguelAngelLV commented 1 year ago

This is the example:

image

Wiremock works fine with array, but the plugin mark all json as yellow when I set a array instead a object in jsonbody.

picimako commented 1 year ago

Thank you! Yeah, this is what I suspected the problem would be.

I, for the most part, use WireMock's own schema definitions that permit only objects for jsonBody, but I now extended it in WireMocha to accepts arrays as well.

I uploaded a new version of WireMocha to the JetBrains Marketplace, it should be available in 1-2 days.

picimako commented 1 year ago

@MiguelAngelLV WireMocha 1.0.13 is now published and you can update the plugin.

With that, I'm closing this issue.