Forum Discussion

aakashchaudhari's avatar
3 years ago

assigning property value to null in swagger 2.8.0

I am using the swagger 2.8.0 version for springfox-swagger2 and springfox-swagger-ui. While assigning property with null or empty, it is giving response code 400 with response header

 access-control-allow-origin: *  cache-control: no-cache, no-store, max-age=0, must-revalidate  connection: close  content-length: 0  date: Wed, 09 Mar 2022 17:42:21 GMT  expires: 0  pragma: no-cache  x-application-context: application:8987  x-content-type-options: nosniff  x-frame-options: DENY  x-xss-protection: 1; mode=block 

Sample Json

{

   "name" : 

 

or 

 

{

   "name" : NULL 

}

 

Can you please help me how to resolve?

Thanks 

No RepliesBe the first to reply