With these changes we should now parse the string and then iterate through it only if it's actually an object.
The issue is that we are sending a stringified object and then iterating through it as if it were just an object. It happened even if I updated the examples in the specification provided in the issue, which seemed wronged to me, to:
examples:
authorization_code grant type:
description: authorization_code grant type
value:
grant_type: authorization_code
code: xxxxxxxxxx
client_id: xxxxxxxxxx
client_credentials grant type:
description: client_credentials grant type
value:
grant_type: client_credentials
client_id: xxxxxxxxxx
client_secret: xxxxxxxxxx
refresh_token grant type:
description: refresh_token grant type
value:
grant_type: refresh_token
refresh_token: xxxxxxxxxx
Refs https://github.com/swagger-api/swagger-ui/issues/7810
With these changes we should now parse the string and then iterate through it only if it's actually an object.
The issue is that we are sending a stringified object and then iterating through it as if it were just an object. It happened even if I updated the examples in the specification provided in the issue, which seemed wronged to me, to:
so that it shows as an object in Swagger UI: