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

Support text/plain params schema #1921

Open
moguchev opened this issue Nov 1, 2024 · 0 comments
Open

Support text/plain params schema #1921

moguchev opened this issue Nov 1, 2024 · 0 comments

Comments

@moguchev
Copy link

moguchev commented Nov 1, 2024

Is your feature request related to a problem? Please describe.

I hava a text/plain API method with this description:

// @id              AcquiringInternetPaymentHandler
// @description     weebhook method for incoming payments
// @accept          plain
// @param           token body string true "base64 jwt token" format(base64) example(eyJ0eXAiOiJKV1...)

And it generates such specification:

  "parameters": [
      {
          "format": "base64",
          "example": "eyJ0eXAiOiJKV1...",
          "description": "base64 jwt token",
          "name": "token",
          "in": "body",
          "required": true,
          "schema": {
              "type": "string"
          }
      }
  ]

The problem is that body param has schema and attributes example and format must be in schema:

  "parameters": [
      {
          "description": "base64 jwt token",
          "name": "token",
          "in": "body",
          "required": true,
          "schema": {
              "type": "string",
              "format": "base64",
              "example": "eyJ0eXAiOiJKV1..."
          }
      }
  ]

Describe the solution you'd like
If body is not a object and plain then attributes format and example should be in schema

Describe alternatives you've considered

Additional context

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

No branches or pull requests

1 participant