Forum Discussion

goutham96's avatar
goutham96
New Member
6 years ago

deepObject not working as expected when used inside requestBody.

openApi 3.0 spec: 

paths:
  /users/:
    post:
      summary: creates a user
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                first_name:
                  type: string
                last_name:
                  type: string
                address:
                  type: object
                  properties:
                    first_name:
                      type: string
                    last_name:
                      type: string
                    email:
                      type: string
                    company:
                      type: string
            encoding:
              address:
                style: deepObject
                explode: true

On serialising the address object using deepObject the following is expected :

address[first_name] = ""

address[last_name] = ""

....

 

It is not working as expected when i use it inside requestBody . But when i use it inside query parameter it is working fine , 

 

can you help me with this ? 

 

Thanks,

No RepliesBe the first to reply