Swagger-ui: Problem sending parameters via POST

Created on 13 Oct 2012  路  53Comments  路  Source: swagger-api/swagger-ui

Hi all,

I麓m experimenting with swagger and swagger-ui with my REST API (Jersey). I have an operation named "addUser" (POST) that receives two parameters "id" and "name". When I try to test this operation via swagger-ui-1.1.1 I set values in their inputs (id and name) but when I send it to the server there麓s not parameters in the request. It seems they are not being sent to the server. I have another three operations in my API (GET, PUT and DELETE) and works fine. I hope you can help me.

Thanks and regards

All 53 comments

Hi, what type of parameters are you sending? Are they path, query, or body? I believe you can only have a single body parameter, so if you have id and name as post params (non-annotated), Jersey will ignore them.

Looks like there is a bug at

    if (obj.type.toLowerCase() === "post" || obj.type.toLowerCase() === "put" || obj.type.toLowerCase() === "patch") {
      obj.contentType = "application/json";
    }

Which prevents jquery.ajax to post variables, added pull request https://github.com/wordnik/swagger-ui/pull/73

Hi! This is my "add" operation (Jersey):

@POST
@Path("/add")
@ApiOperation(
value = "Da de alta un nuevo usuario",
notes = "Crea un nuevo usuario a partir de un ID y un nombre. El usuario no debe existir"
)
public Response addUser(
@ApiParam(value = "ID del usuario a crear", allowableValues = "range[1," + Integer.MAX_VALUE + "]", required = true)
@FormParam("id") int id,
@ApiParam(value = "Nombre del usuario a crear", required = true)
@FormParam("name") String name) {
// code...
}

When I try it via JMeter or curl it works fine. I send a request like this:

POST http://localhost:8080/users/add

POST data:
id=7&name=Luis

[no cookies]

Request Headers:
Content-Type: application/x-www-form-urlencoded

However, when I try to do the same via swagger-ui, seems that "id" and "name" params are not sent. I麓m using Google Chrome

Thanks and regards.

@marlandy FormParams aren't supported in swagger-ui--I'd recommend posting an object via JSON if possible:

{
  "id":7,
  "name":"Luis"
}

Where a User object could be defined as such:

public class User {
  private long id;
  private String name;

  public long getId() {
    return this.id;
  }
  // ... etc
}

Your Jersey method would then look like this:

public Response addUser(
  @ApiParam(value = "User to create") User user {
    // code...
}

Would that work in your use case or do you have to use forms?

Hi fehguy:

I have no problems in adding my params into an User object. As I wrote in my first comment, I was experimenting with swagger so that code is not for a real application.

Thanks and regards

I was surprised to heard swagger ui doesn't support post data since it's a very simple standard way when people creating API using POST.

Right now i am in the middle of writing API documentation for my team, and i choose swagger ui since after i searched through the web, and i think it's very nice and slick interface.

It would be nice to have paramType "post" in parameters, and it would be sent if you choose httpMethod: POST

Sending trough json is out of question since it destroy the purpose to have documentation on the parameter.

I agree, support for paramType "post" or "form" is very much needed, as it is widely used in REST services.

We'll get it in shortly

I also can't use POST methods and JSON (as input data) with Swagger. I tried on http://petstore.swagger.wordnik.com/api/resources.json and my own application and always have 415 HTTP error.

@POST
@ApiOperation(value = "Create user role")
public Response create(
    @ApiParam(value = "User role information", required = true)
    final UserRole userRole
) {
    // Some code
}
@SuppressWarnings("serial")
@JsonSerialize(include = JsonSerialize.Inclusion.NON_EMPTY)
public class UserRole implements Serializable {

    private String name;

    public String getName() {
        return name;
    }

    public void setName(final String name) {
        this.name = name;
    }
}

Error:
The registered message body readers compatible with the MIME media type are:\napplication/x-www-form-urlencoded; charset=UTF-8

@vbauer could you please use chrome, open the developer tools console, and post back the error message you get in the UI? Also what version of the UI are you using? The latest is here:

https://github.com/wordnik/swagger-ui/downloads

and is 1.1.2.

I made "git clone" two days ago and built it form scratch. I've also just tried to use 1.1.2, but I've got the same error.

Information from Google Developer Tools (tried on another request):

POST http://localhost:8080/rest/auth?api_key=special-key 415 (Unsupported Media Type) jquery-1.8.0.min.js:2
send jquery-1.8.0.min.js:2
p.extend.ajax jquery-1.8.0.min.js:2
OperationView.submitOperation swagger-ui.js:1305
p.event.dispatch jquery-1.8.0.min.js:2
g.handle.h

Request URL:http://localhost:8080/rest/auth?api_key=special-key
Request Method:POST
Status Code:415 Unsupported Media Type

Request Headers:
Accept:application/json, text/javascript, */*; q=0.01
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Content-Length:42
Content-Type:application/x-www-form-urlencoded; charset=UTF-8
Cookie:rememberMe=0LesD1NObjpuS2u+Qjh0CA5jcCTTxXUjMAfj3fCA0mlpsQW/xMWL68CXK/aNO3s4lc2vIet5wcmhW5vDRPf8ypRhwHjYp4Vr3dXxcVcnFG9N6/aOHjGNKZf3AnIOw7CoeIhktCuQgH3JV72QKDHnJWv9O5rjc4JIlz0HVL8FA0l1a3VP7Y1pAc+H0jlnWKdoRdso84YMxM+MMur47luNYh2wADc3B6rGrtI1sx8ogzvDtJRsiozbrX5Gzkb5I4hRs+MPmObo6kE66OkrY0Jj4wcrT76n1unM3QqGTgLb6NcMjsCKGy6YQ0XRDcmuvhCjG9cHNESwgFBvT0QAyt9IDBKsM5vj+5fq1XDt5duG/yHTwjM2RNiVqpP5FnjqY34VBokRefyDiRVcUe42k5Tci1zkT+af2RdLRCjPoeOgjYxbB8ZSg8ls3CygyFEa7+IOj+jlp21sJZifMQzJGDFNB7UwcBBNCgrvfzhWXqIYGxQdZ7c2ziwB6/3TmrN4noCC5yOiGNNHO1fbzP6FR2CnBgkzfqUNTyZTjO8k4UzfQMg=; JSESSIONID=300A5BADE69DD1C7732D3CFD55C81940
Host:localhost:8080
Origin:http://localhost:8080
Referer:http://localhost:8080/restapi/
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4
X-Requested-With:XMLHttpRequest

Query String Parameters:
api_key:special-key

Form Data:
{
"login":"admin",
"password":"admin"
}:

Response Headers:
Content-Length:1117
Content-Type:text/html;charset=utf-8
Date:Sat, 10 Nov 2012 00:13:18 GMT
Server:Apache-Coyote/1.1
Vary:Accept-Encoding

It seems to me that request's "Content-Type" parameter is wrong:
Content-Type:application/x-www-form-urlencoded; charset=UTF-8
(instead of application/json)

@fehguy Why is there a limit on the number of body parameters one can have?

the POST method accepts only one message, which may be complex. When we add support for FORM submit, you can multiple params, but they will be form params (key/value).

Gotcha. Yeah that's exactly what I am looking for, as my API takes a series of parameters via the request payload, however declaring multiple parameters with _body_ paramType results in all but the last one being ignored (and the raw value being put in, with no key), and the Content-Type that is then sent is application/xml, which in my case results in a 415 error, since I am only accepting JSON for now. Thanks for the heads up.

I would love to see multiple params implemented ;)

@23tux Multiple params are supported, just not of type body. For http, only one body is allowed in a POST, but you can pass other params as query, path, or header. Does that make sense?

It would be nice if multiple POST parameters are supported. That way every param can be entered in a separate field in the UI and mirror the actual API requirements.

I believe you're looking for form post support. This is accomplished by having your swagger spec as follows:

{
  "path": "/pet.{format}/formData",
  "description": "Operations about pets",
  "operations": [
    {
      "httpMethod": "POST",
      "summary": "uploads a form data",
      "responseClass": "void",
      "nickname": "submitFormData",
      "parameters": [
        {
          "name": "username",
          "description": "username",
          "paramType": "form",
          "required": false,
          "allowMultiple": false,
          "dataType": "string"
        },
        {
          "name": "age",
          "description": "user age",
          "paramType": "form",
          "required": false,
          "allowMultiple": false,
          "dataType": "int"
        }
      ]
    }
  ]
}

Note the paramType is form, which tells swagger-ui to send the content as www-url-form-encoded. Please reopen if this doesn't address your needs.

Im having the same issue and am a confused by your resolution here fehguy.
Any chance of detailed steps on how you solved the issue ?

Hi @bshawCAC, it works like such. POST means that an http operation of type POST will be performed. The server needs to know what format the data will be in, and there are a couple options.

For posting a JSON object, the Content-Type should be the format application/json. That means a payload of JSON will be sent.

For posting an HTML form, the header Content-Type: x-www-form-urlencoded is sent, which tells the server to accept data from an HTML form.

If you set the paramType:form, the swagger-ui will know to submit it as an HTML form, being x-www-form-urlencoded, as opposed to as a JSON body.

Make sense?

@bshawCAC
You can use postman extension for chrome, it's really amazing tool for rest api. You can also exchange documentations with other developers in your team easily.
No offense for swagger-ui fehguy :)

hah, none taken

Just thought I shall add my views on this

Sending multiple parameters in body is not that hard

We just have to create an empty {} object and add each parameter using name as the key and keyed in value as the value

That can solve many problems!

@fehguy what do you think?

For Restler we accept such request and process the parameters well

Currently I combine the names and descriptions of individual parameters to show a meaningful form on the swagger ui

Here is an example for what I'm talking about http://restler3.luracast.com/examples/_009_rate_limiting/explorer/index.html#!/authors-v1/v1-authors_post

@Arul- I'm looking to support an input similar to a FORM (with arbitrary key/value pairs like you describe) but in content-type of JSON.

@fehguy Great! looking forward for it :)

@arul- suggestion on this feature. What if for the input to the operation, you define the model and we let the UI "expand" the model into a form? For example, if this is your model schema:

  "models": {
    "Tag": {
      "id": "Category",
      "properties": {
        "id": {
          "type": "long"
        },
        "name": {
          "type": "string"
        }
      }
    }
  }

An example instance of this would be like such:

{
  "id" : 123,
  "name" : "available"
}

then the swagger-ui would expand this model to show a id and name field. If there are complex types (such as a nested model), it would not expand it, rather show a json text entry box.

We could probably also add a toggle to switch between form view and json so you could paste in raw json. I think this would solve the issue, but mandate that you have the model declared (which is a good idea, anyway).

Thoughts on that?

This can be a good start, and will work for many use cases, it will encourage people to create models and use them

But I still think it will be great to support individual parameters mapped to body and swagger building a form for that input, we may have an interface to input raw json , we will also be able to build the json template as well for ease of usage

I just simply change the js code make it support individual json parameters. Just put all the parameters together , and make them as a json string, then put it into map["body"]. swagger-ui.js(from line about:1600):

var value = o.value;
            if(dataType == "integer") {
              value = parseInt(o.value)
            } else if(dataType=="double") {
              value = parseFloat(o.value)
            }
            jmap[o.name]= value;
            map["body"] = o.value;
I add an new 'jmap' to hold the values, if it find contentType is "json", it will stringify the 'jmap' then put it into 'map["body"]. This is a simple way to solve that.
      if(opts.requestContentType && opts.requestContentType.indexOf("json") != -1) {
          var json = JSON.stringify(jmap);
          map["body"] = json
          return this.model["do"](map, opts, this.showCompleteStatus, this.showErrorStatus, this);
        }

I just parse the dataType only 'integer' and 'double', since I only use these two types, and with name only 'integer' and 'double'

I'd like to add my voice here about the need for multiple parameter support in forms via POST via application/x-www-form-urlencoded.

swagger-ui not supporting this very standard method of operation makes it impossible to, for instance, use swagger-ui to make queries against a standards-conforming OAuth server (see http://tools.ietf.org/html/rfc6749#section-6)

As much as we all like JSON, this is still a very widespread manner of operation.

@jefferai, swagger-ui has supported FORM post for almost 2 years now. If you define your operation as follows, you'll see a result similar to this in swagger-ui (note you need to apply the api-key special-key to see this operation):

{
  "method": "POST",
  "summary": "Updates a pet in the store with form data",
  "notes": "",
  "type": "void",
  "nickname": "updatePetWithForm",
  "consumes": [
    "application/x-www-form-urlencoded"
  ],
  "parameters": [
    {
      "name": "petId",
      "description": "ID of pet that needs to be updated",
      "required": true,
      "type": "string",
      "paramType": "path"
    },
    {
      "name": "name",
      "description": "Updated name of the pet",
      "required": false,
      "type": "string",
      "paramType": "form"
    },
    {
      "name": "status",
      "description": "Updated status of the pet",
      "required": false,
      "type": "string",
      "paramType": "form"
    }
  ],
  "responseMessages": [
    {
      "code": 405,
      "message": "Invalid input"
    }
  ]
}

If you have other questions about this, see issues, or have input on the documentation, please post it

screen shot 2014-01-14 at 8 32 02 am

OK -- I had read when searching for help on this issue that Swagger only supported one form parameter. But it seems like it should be able to support more, so I will poke at the Swagger library that is being used to see what's going on. I do know for sure, looking at the generated docs, that the parameters are of type "form" -- but they're not getting through to the web server. All other routes work.

@fehguy I think it's not working for me because when I set the param types of the parameters to "form" and submit, my web server sees multipart/form-data.

I have two parameters in this route, both of type "form". Looking at the code around line 999 of swagger.js, I don't see why it's causing multipart/form-data instead of application/x-www-form-urlencoded, but that is at least the first part of the problem I'm having.

I think if you follow the JSON from my previous comment it should behave as you expect:

https://github.com/wordnik/swagger-ui/issues/72#issuecomment-32280829

image

Perhaps the key is the "consumes" parameter. It seems like there is autodetection code in swagger.js to try to determine which of the form possibilities to use, but in my case it gets it wrong. I will try to force the library I'm using to generate an appropriate "consumes" parameter.

You can also add some javascript to fire after your swagger-ui has loaded to inject the value. For example:

    $(function () {
      window.swaggerUi = new SwaggerUi({
        url: "http://petstore.swagger.wordnik.com/api/api-docs",
        dom_id: "swagger-ui-container",
        supportedSubmitMethods: ['get', 'post', 'put', 'delete'],
        onComplete: function(swaggerApi, swaggerUi){
            window.swaggerUi.api.apis.pet.operations.addPet.consumes = ["application/json"]

I have the JSON that is being used; you can see that it is actually including the "consumes" parameter and the "form" type shows correctly on the web page. Something is different, but I can't figure out what:

{
  "apiVersion": "",
  "swaggerVersion": "1.2",
  "basePath": "https://example.com",
  "resourcePath": "/v1/tokens",
  "apis": [
    {
    "path": "/v1/tokens/refresh/bearer",
    "description": "",
    "operations": [
      {
      "httpMethod": "POST",
      "nickname": "",
      "type": "globals.Response",
      "summary": "Use a refresh token to get a new Mandella access token, which on this server is type \"Bearer\". In accordance with RFC 6749搂6, parameters are passed in via an \"application/x-www-form-urlencoded\"-formatted body.",
      "parameters": [
        {
        "paramType": "form",
        "name": "refresh_token",
        "description": "The refresh token being used to get a new access token.",
        "dataType": "string",
        "type": "string",
        "format": "",
        "required": true,
        "minimum": 0,
        "maximum": 0
      },
      {
        "paramType": "form",
        "name": "grant_type",
        "description": "The grant type. Must be set to \"refresh_token\" in accordance with RFC6749搂6.",
        "dataType": "string",
        "type": "string",
        "format": "",
        "required": true,
        "minimum": 0,
        "maximum": 0
      }
      ],
      "consumes": [
        "application/x-www-form-urlencoded"
      ],
      "produces": [
        "application/json"
      ]
    }
    ]
  }
  ]
}

Hi, I think there's a bug in swagger-js. If you pull the library from here and drop it in your swagger-ui, it will work with the JSON you showed here.

I'll try to sort out the dist for swagger-ui to address this.

That did it! Thanks for the fix!

I've pushed this to master

Great, thank you.

How do you add the description column for Swagger UI in case of integration with servlets since there is no @ApiParam annotation for servlets?

Hi @swastika I suggest you open issues about the java framework in https://github.com/wordnik/swagger-core

To answer your question, there are annotations for raw servlets. Take a look at the sample in swagger-core.

This is how i do and it is not working, the form type did the magic for me :+1:

{
            "path": "/car/getCost.php",
            "operations": [
                {
                    "method": "POST",
                    "summary": "Parking Cost of the Car Parked",
                    "notes": "",
                    "type": "void",
                    "nickname": "getCost",
                    "consumes": [
                        "application/x-www-form-urlencoded"
                    ],
                    "authorizations": {
                    },
                    "parameters": [
                        {
                            "description": "Car ID",
                            "name": "carId",
                            "required": true,
                            "type": "string",
                            "paramType": "form",
                            "allowMultiple": false
                        }
                    ],
                    "responseMessages": [
                        {
                            "code": 405,
                            "message": "Invalid input"
                        }
                    ]
                }
            ]
        }

Hope it help, and if it won't work feel free to ask it be my honour to help :)

What would you recommend for uploading an image file as well as some additional metadata about the image (i.e. a caption) as a POST? Since only one @requestbody is allowed, do you recommend bundling everything as JSON and encode the image in base64 or something like that?

Just a thought (i'm no expert on multipart mime types), but what about POSTing the image, which returns it's id. Then POST the meta data referencing that id?
So this would mean two requests though...

@rrallo - that's really a question for the framework that you use rather than the UI. In a multipart request, there's no problem sending multiple 'files', some of which are the metadata, and one (or more) would be the actual file. You'd need to check the documentation, in your case, I believe it's Spring-MVC.

I have the same issue and here is my swagger.json

{
    "swagger": "2.0",
    "info": {
        "title": "Sample API",
        "version": "1.0.0"
    },
    "paths": {
        "/dogs": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "200": {
                        "description": "Returns a list of dogs",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Dog"
                            }
                        }
                    }
                }
            }
        },
        "/dogs/?id={id}": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Dog ID",
                        "required": true,
                        "type": "integer"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Returns a single dog by its ID",
                        "schema": {
                            "$ref": "#/definitions/Dog"
                        }
                    },
                    "404": {
                        "description": "No dog with the given ID was found"
                    }
                }
            }
        },
        "/login/index.php": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "email",
                        "in": "path",
                        "description": "User Email",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "password",
                        "in": "path",
                        "description": "User Password",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Returns a single dog by its ID",
                        "schema": {
                            "$ref": "#/definitions/Login"
                        }
                    },
                    "404": {
                        "description": "No dog with the given ID was found"
                    }
                }
            }
        }
    },
    "definitions": {
        "Dog": {
            "required": [
                "id",
                "name",
                "age"
            ],
            "properties": {
                "id": {
                    "description": "The ID of the dog",
                    "type": "integer"
                },
                "name": {
                    "description": "The name of the dog",
                    "type": "string"
                },
                "age": {
                    "description": "The age of the dog",
                    "type": "integer"
                }
            }
        },
        "Login": {
            "required": [
                "email",
                "password"
            ],
            "properties": {
                "email": {
                    "description": "User Password",
                    "type": "string"
                },
                "password": {
                    "description": "The password of the user",
                    "type": "string"
                }
            }
        }
    }
}

@flik, please open a new issue 馃槃

If you add this above your controller:

@RestController
@RequestMapping(value = "/api/users",
    produces = {"application/json"})

...
public class UserController {

@PostMapping(value = "/test")
@ApiOperation(value = "Create user role")
public boolean Test(
@ApiParam(value = "User role information", required = true)
UserDTO user)
{
return true;
}
}

it should work like a charm.
Tested with

io.springfox
springfox-swagger2
2.9.2


io.springfox
springfox-swagger-ui
2.9.2

I get a prefectly nice post form for all my params of the userDTO class.
Note: All supplied params must indeed be serializable to JSON in some way. Otherwise, I dont think swagger will be able to know how to list it or create json forms for it.

Sir i Have a question: when in Hit on Post method and pass mendatory value in property like i have two property EmployeteName and EmplyeeJob and i also have numbers of property but these two are mendatory to pass so when i pass those two value in parameter then it will save in db and others property value save as null. pls solve my issue becouse i cant able to save null values in my db and am using SQL Server and my emailid:[email protected]
pls tell me as soon as possible

{
"facilityId": 0,
"facilityName": "string",
"description": "string",
"address1": "string",
"address2": "string",
"city": "string",
"stateId": 0,
"regionId": 0,
"countryId": 0,
"postalCode": "string",
"phoneNumberId": 0,
"emailAddress": "string",
"additionalDetails": "string",
"modifiedTimestamp": "2020-04-20T13:46:39.272Z",
"modifiedUserName": "string",
"timeZone": "string",
"country": {
"countryId": 0,
"countryName": "string",
"modifiedTimestamp": "2020-04-20T13:46:39.272Z",
"modifiedUserName": "string",
"locations": [
{
"locationId": 0,
"parentLocationId": 0,
"locationName": "string",
"locationType": "string",
"description": "string",
"address1": "string",
"address2": "string",
"city": "string",
"stateId": 0,
"postalCode": "string",
"countryId": 0,
"emailAddress": "string",
"additionalDetails": "string",
"modifiedTimestamp": "2020-04-20T13:46:39.272Z",
"modifiedUserName": "string",
"facilityId": 0,
"phoneNumberId": 0,
"m3LocationId": "string",
"sequence": 0,
"phoneNumber": {
"phoneNumberId": 0,
"countryCode": "string",
"areaCode": "string",
"number": "string",
"extension": "string",
"modifiedTimestamp": "2020-04-20T13:46:39.272Z",
"modifiedUserName": "string",
"locations": [
null
]
}
}
]
},
"region": {
"regionId": 0,
"regionName": "string",
"modifiedTimestamp": "2020-04-20T13:46:39.272Z",
"modifiedUserName": "string",
"facilities": [
null
]
},
"state": {
"stateId": 0,
"stateName": "string",
"modifiedTimestamp": "2020-04-20T13:46:39.272Z",
"modifiedUserName": "string",
"locations": [
{
"locationId": 0,
"parentLocationId": 0,
"locationName": "string",
"locationType": "string",
"description": "string",
"address1": "string",
"address2": "string",
"city": "string",
"stateId": 0,
"postalCode": "string",
"countryId": 0,
"emailAddress": "string",
"additionalDetails": "string",
"modifiedTimestamp": "2020-04-20T13:46:39.272Z",
"modifiedUserName": "string",
"facilityId": 0,
"phoneNumberId": 0,
"m3LocationId": "string",
"sequence": 0,
"phoneNumber": {
"phoneNumberId": 0,
"countryCode": "string",
"areaCode": "string",
"number": "string",
"extension": "string",
"modifiedTimestamp": "2020-04-20T13:46:39.272Z",
"modifiedUserName": "string",
"locations": [
null
]
}
}
]
},
"locations": [
{
"locationId": 0,
"parentLocationId": 0,
"locationName": "string",
"locationType": "string",
"description": "string",
"address1": "string",
"address2": "string",
"city": "string",
"stateId": 0,
"postalCode": "string",
"countryId": 0,
"emailAddress": "string",
"additionalDetails": "string",
"modifiedTimestamp": "2020-04-20T13:46:39.272Z",
"modifiedUserName": "string",
"facilityId": 0,
"phoneNumberId": 0,
"m3LocationId": "string",
"sequence": 0,
"phoneNumber": {
"phoneNumberId": 0,
"countryCode": "string",
"areaCode": "string",
"number": "string",
"extension": "string",
"modifiedTimestamp": "2020-04-20T13:46:39.272Z",
"modifiedUserName": "string",
"locations": [
null
]
}
}
]
}

this is my json data which are generate in swagger and in this i want pass the only two mandatory value i.e. facilityName and decription and others are save as null so how can i save null

Was this page helpful?
0 / 5 - 0 ratings