-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
swagger-api/swagger-js
#1187Description
Q | A |
---|---|
Bug or feature request? | Bug |
Which Swagger/OpenAPI version? | 3.0.0 |
Which Swagger-UI version? | 3.3.2 |
Which browser & version? | Chrome 61 |
Which operating system? | macOS High Sierra |
Demonstration API definition
openapi: '3.0.0'
info:
version: 1.0.0
title: blah
servers:
- url: /
paths:
/:
post:
description: asdf
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
id:
type: string
format: uuid
address:
# complex types are stringified to support RFC 1866
type: object
properties: {}
responses:
200:
description: OK
Expected Behavior
I expect my request body value, shown below, to be serialized correctly.
{
"id": "string",
"address": {}
}
Current Behavior
The address
object is not properly serialized before the request is sent:
Possible Solution
Non-primitive values should be serialized correctly, here: https://github.com/swagger-api/swagger-js/blob/2a3f113c1c219ec3756a73ffc35e366987ff6f5c/src/execute/oas3/build-request.js#L47