Skip to content

TypeError: boolean true is not iterable (cannot read property Symbol(Symbol.iterator)) at 4.0.2 #726

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

Closed
Charlie91 opened this issue Aug 18, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@Charlie91
Copy link

Charlie91 commented Aug 18, 2021

I have a problem on a last 4.0.2 version that I solved rolling back to 4.0.0.

TypeError: boolean true is not iterable (cannot read property Symbol(Symbol.iterator)).

The error also dissapears if I change property required in parameter of "type": "file" to false

swagger.json

{
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "swagger": "2.0",
  "info": {
    "description": "API for Portal",
    "title": "Portal API",
    "version": "0.1.0"
  },
  "host": "portal.test",
  "basePath": "/api",
  "paths": {
    "/activity/transaction/{counterparty}/{transaction_number}/attachment": {
      "post": {
        "security": [
          {
            "Oauth": [
              "readaccount"
            ]
          }
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "activity_transaction_attachment"
        ],
        "summary": "Upload attachment for the transaction",
        "operationId": "postTransactionAttachment",
        "parameters": [
          {
            "type": "file",
            "description": "The file to upload",
            "name": "file",
            "required": true,
            "in": "formData"
          }
        ],
        "responses": {
          "200": {
            "description": "Success upload an attachment for the instruction"
          },
          "default": {
            "description": "Default error",
            "schema": {
              "type": "object",
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    }
  },
  "definitions": {},
  "securityDefinitions": {}
}
@eirikur-grid
Copy link

eirikur-grid commented Aug 19, 2021

I just ran into this error as well. Will give 4.0.1 a try.
Version 4.0.1 does not appear to be affected.

@drwpow drwpow added the bug Something isn't working label Sep 30, 2021
@drwpow
Copy link
Contributor

drwpow commented Sep 30, 2021

Hm. I don’t think we know how to support "type": "file". Let me push a fix for that and see if that resolves it.

@drwpow
Copy link
Contributor

drwpow commented Sep 30, 2021

I’m seeing an improvement to this in 4.1.0. Please give it a try and let me know if the problem is improved.

@mmounts
Copy link

mmounts commented Nov 2, 2021

Not the OP here, but I was hitting this issue in 4.0.2 today, found this issue while researching, and update to 4.1.0. For my use case the error has now gone away and the result is as expected. Thanks!

@mitchell-merry
Copy link
Contributor

I believe this is fixed in version 6 as well, closing...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants