Developer forum

Forum » Development » Api response doesn't match swagger documentation

Api response doesn't match swagger documentation

Karol Barkowski
Reply

Hi,

I need to use the product search endpoint but there are two issues I found. First one is that response model that I get doesn't match the model described in swagger docs and it's missing facet group names. See image below where on the left you can see swagger schema and on the right is the actal response from the demo shop:

https://swiftdemo.dynamicweb-cms.com/dwapi/ecommerce/products/search?RepositoryName=SwiftProducts&QueryName=Products

Are there any additional query params that I should include to get full info of the facet groups?

 


Replies

 
Karol Barkowski
Reply

Bumping the thread.

As you can see, the "Name" property is just one of many that are missing there. Is there any way to get around this?

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Karol

A couple of things.

  • I do get the property - it is null, so maybe your preview tool is filtering it out?
  • It is what we call "FillableViewmodel" meaning that null properties can be in a situation where properties are not given a value and hence is not serialized
  • See dump below as I see it in my browser (you link above)

That said, it might be a bug that you do not get a name. I'll send it to QA for verification

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply
This post has been marked as an answer

Hi,

Reproduced on DW9\DW10. New task #20072 has been created to fix the bug. Thanks.

BR, Oleg QA  

Votes for this answer: 1

 

You must be logged in to post in the forum