Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(execute): fix encoding for stringified request body #3476

Merged
merged 2 commits into from
Apr 23, 2024

Conversation

glowcloud
Copy link
Contributor

Refs swagger-api/swagger-ui#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:

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

so that it shows as an object in Swagger UI:

Screenshot 2024-04-22 at 14 38 52

@char0n char0n merged commit 4c28575 into master Apr 23, 2024
6 checks passed
@char0n char0n deleted the content-no-properties branch April 23, 2024 08:41
swagger-bot pushed a commit that referenced this pull request Apr 23, 2024
## [3.27.2](v3.27.1...v3.27.2) (2024-04-23)

### Bug Fixes

* **execute:** fix encoding for stringified request body ([#3476](#3476)) ([4c28575](4c28575))
@swagger-bot
Copy link
Contributor

🎉 This PR is included in version 3.27.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants