Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Fix problem where nested objects would appear empty #180

Merged
merged 1 commit into from
Dec 13, 2018

Conversation

domharrington
Copy link
Member

On production right now if there's a nested object in a form, it always get
in the code sample even if the form values are not set:

--data '{"category":{}}'

This PR recursively removes empty objects from the form values so they
do not get set when making the request.

This problem was slightly exacerbated by #179 which auto applied default
values from the form to the samples.

On production right now if there's a nested object in a form, it always get
in the code sample even if the form values are not set:

```
--data '{"category":{}}'
```

This PR recursively removes empty objects from the form values so they
do not get set when making the request.

This problem was slightly exacerbated by #179 which auto applied default
values from the form to the samples.
@domharrington domharrington merged commit 0b760c3 into master Dec 13, 2018
@erunion erunion deleted the bug/do-not-send-empty-objects branch July 1, 2019 16:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants