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

[Bug] Cannot import request with parameter type "array", items type "file" and no schema #1573

Closed
pavlus opened this issue Jun 24, 2019 · 2 comments
Labels
stale Bot: Stale Issue

Comments

@pavlus
Copy link

pavlus commented Jun 24, 2019

  • Insomnia Version: 6.5.4
  • Operating System: Debian Buster (10.0)

Details

DevTools exception log:

[swagger] Import file validation failed SyntaxError: Swagger schema validation failed. 
  Data does not match any schemas from 'oneOf' at #/paths//zip/batch/user-upload/post/parameters/0
    Data does not match any schemas from 'oneOf' at #/paths//zip/batch/user-upload/post/parameters/0
      Missing required property: schema at #/
      Data does not match any schemas from 'oneOf' at #/
        No enum match for: multi at #/collectionFormat
        No enum match for: file at #/items/type
        No enum match for: file at #/items/type
        No enum match for: multi at #/collectionFormat
    Missing required property: $ref at #/paths//zip/batch/user-upload/post/parameters/0
 
JSON_OBJECT_VALIDATION_FAILED
    at validateSchema (file:///opt/Insomnia/resources/app.asar/bundle.js:115603:15)
    at file:///opt/Insomnia/resources/app.asar/bundle.js:115537:9

z-schema validation error: JSON_OBJECT_VALIDATION_FAILED
    at ZSchema.module.exports.ZSchema.getLastError (file:///opt/Insomnia/resources/app.asar/bundle.js:239262:13)
    at validateSchema (file:///opt/Insomnia/resources/app.asar/bundle.js:115601:23)
    at file:///opt/Insomnia/resources/app.asar/bundle.js:115537:9

Parameter description:

        "parameters": [
          {
            "name": "zip",
            "in": "formData",
            "description": "zip",
            "required": true,
            "type": "array",
            "items": {
              "type": "file"
            },
            "collectionFormat": "multi"
          }
        ],

As far as I know, schema property isn't required by OpenAPI 2.0 for primitive types an arrays of primitives and only used with in: body.

Wasn't sure which lib you use for parsing swagger config, so reporting it here.

@welcome
Copy link

welcome bot commented Jun 24, 2019

👋 Thanks for opening your first issue! If you're reporting a 🐞 bug, please make sure
you include steps to reproduce it. If you're requesting a feature 🎁, please provide real
use cases that would benefit. 👪

To help make this a smooth process, please be sure you have first read the
contributing guidelines.

@stale
Copy link

stale bot commented Aug 23, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Bot: Stale Issue label Aug 23, 2019
@stale stale bot closed this as completed Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Bot: Stale Issue
Projects
None yet
Development

No branches or pull requests

1 participant