question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Import failed in case of Free-Form Object - OpenAPI 3

See original GitHub issue
  • Insomnia Version: 6.5.4
  • Operating System: Ubuntu 18.04

Details

Import failed (Cannot convert undefined or null to object) when a Free-Form Object definition is in OpenAPI (v3) file.

For Example

openapi: 3.0.2
info:
  title: Free-Form Object test
  description: >-
    Free-Form Object test

servers:
  - url: http://127.0.0.1
    description: Free-Form Object test

paths:
  /admin-flavors:
    post:
      operationId: create_flavor
      requestBody:
        description: Create a flavor
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/flavor'
      responses:
        default:
          description: Unexpected error

components:

  schemas:

    'flavor':
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: a descriptive name
        extra_specs:
          type:        object

https://swagger.io/docs/specification/data-models/data-types/#object

        extra_specs:
          type:        object

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
indiealexhcommented, Jul 23, 2019

Same issue, I generate my spec using Apicurio which often infers a null value in the example input json as an Object and breaks the import function of Insomnia, after I edit all the objects to strings the import function works.

0reactions
csekecommented, Dec 14, 2019

Confirmed, tested and works in 7.0.5, thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Bug] Import failed in case of Free-Form Object - OpenAPI 3
Import failed ( Cannot convert undefined or null to object ) when a Free-Form Object definition is in OpenAPI (v3) file. For Example....
Read more >
OpenAPI Specification v3.1.0 | Introduction, Definitions, & More
The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs.
Read more >
Error while importing openapi .json file - SmartBear Community
Solved: I am new to ReadyAPI, however, I am unable to get any of my openapi .json (3.0.0) files to import successfully.
Read more >
NetSuite Applications Suite - General Import Errors
Pass Fail Criteria ... Define a JSON Object to Represent a NetSuite Record · Create a Backend ... Input Parameters/Return Values for Shopping...
Read more >
OpenAPI - document that was imported into - App Connect - IBM
You can import OpenAPI documents that contain API definitions into IBM App ... Responses and error case handling for flows; Removing an imported...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found