cancel
Showing results for 
Search instead for 
Did you mean: 

[Bug?] Autogenerated json assert on content does not work if json element has a . in the name

Highlighted
Occasional Contributor

[Bug?] Autogenerated json assert on content does not work if json element has a . in the name

 

I think this is a fairly straightforward bug, when I right click on some json content (sample below with data redacted for privacy) and select 'assert on content' it auto generates a jsonpath assert but immediately throws an 'invalid jsonpath' error.  It seems the . in the json element is throwing things off.

 

Here is the json child element sample (the structure is similar to data/parent/metadata/place.ctry)

              "place.ctry": "Canada"

 

The assert being generated is:

$.data[0].parent.metadata.place.ctry

 

But that implies .ctry is a sub element to place, not one element.

 

Regards,

Ton Vlaming

Ps. This is from readyApi 1.4.1

6 REPLIES 6
Highlighted
Occasional Contributor

Re: Autogenerated json assert on content does not work if json element has a . in the name

Forgot to mention that the simple solution would be to change it to:

 

$.data[0].parent.metadata.[place.ctry]

 

Did that manually and it appears to work fine.

Highlighted
Community Manager

Re: [Bug?] Autogenerated json assert on content does not work if json element has a . in the name

Hi Ton,

 

Thanks for reporting this behavior. Could you please check if you can reproduce it when using the latest Ready! API maintenance build? Perhaps, it has already been fixed. You can download the build here:

https://support.smartbear.com/downloads/readyapi/nightly-builds/

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Occasional Contributor

Re: [Bug?] Autogenerated json assert on content does not work if json element has a . in the name

Hi Tanya,

 

While I understand your question and it is certainly not unreasonable, I am afraid I am not able to do that - we cannot just upgrade readyAPI from a known stable version in our work environment as we need to use it daily.  I respectfully suggest forwarding this bug to your maintenance department so they can assess and try to reproduce it?  Or is there a more appropriate way for me to submit a bug report than this forum? If so - my apologies and could you let me know what that is? 🙂

 

Regards,

Ton

Highlighted
Community Manager

Re: [Bug?] Autogenerated json assert on content does not work if json element has a . in the name

Hi Ton,

 

You can submit this behavior to our Support Team - http://support.smartbear.com/product-list/

However, as a rule, our R&D Team prepares patches for the latest product version. It’s unlikely that they will create a patch for v. 1.3.

BTW, v.1.3 and v.1.5 can be installed side-by-side on one computer.

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Occasional Contributor

Re: [Bug?] Autogenerated json assert on content does not work if json element has a . in the name

Oh - I would not expect a patch for any previous version, with the workaround I found we are fine - I just meant to say that I am not in a position to check if a bug also exists in a later version of the product, I just don't have the time.  The link you provided seems to not quite apply?  The closest category for ReadyAPI would seem to be 'technical inquiry' which it is not - its purely a bug report? Or is that the right category?

 

In the previous version of the boards there was a specific forum where bugs could be reported, I've done so a few times - is it an idea to set one up again?

 

 

Highlighted
Community Manager

Re: [Bug?] Autogenerated json assert on content does not work if json element has a . in the name

Hi Ton646,

 

Technical inquiry is the correct category. Our Support Team works closely with our R&D Team to investigate the issue and analyze the possibility to create a patch to fix it. This is the reason of why we recommend submit possible issues to our Support Team.

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors