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.

Insomnia Designer with Schema produces RequestBody null in Debug

See original GitHub issue

Describe the bug When Debuging a Request which is defined by using a schema as request body the request body in debugging view is null

To Reproduce The following is a minimal OpenAPI 3 config which reproduces the bug:

paths:
  "/foo":
    post:
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Foo"
components:
  schemas:
    Foo:
      title: Foo
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string

Expected behavior As the Example Request Body is generated using the schema I would expect it to be filled in in the debug view as well.

Screenshots The generated Request Body in Preview: RequestBody Preview The Request Body in Debug View: RequestBody Debug View

Desktop (please complete the following information):

  • OS: Windows 10 Enterprise 64 Bit
  • Installation Method: Installer
  • App Version: 2020.3.3

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dagi3dcommented, Jan 28, 2021

any update on this?

0reactions
twobierscommented, Jun 21, 2022

Hey folks. We recently added support for OpenAPI version 3.0.3 in Insomnia. Are you still having this problem?

I have tested it with the following spec in 22.4.1. Seems to work fine. I guess the issue can be closed now, thank you for your support.

Specification
openapi: "3.0.3"

info: 
  title: "Test"
  version: "0.1"

paths:
  "/foo":
    post:
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Foo"
      responses:
        '200':
          description: "Test"
          content:
            text/plain:
              schema:
                type: string
components:
  schemas:
    Foo:
      title: Foo
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
Read more comments on GitHub >

github_iconTop Results From Across the Web

web-api POST body object always null - Stack Overflow
FromBody is a strange attribute in that the input POST values need to be in a specific format for the parameter to be...
Read more >
Changelog - Insomnia REST
We've made several updates to how we handle automatic generation of request collections to preserve user data while switching between the design and...
Read more >
Use Insomnia for API Requests
In this topic, you will learn how to set up the popular Insomnia HTTP client to make requests to the Brightcove RESTful APIs....
Read more >
How to Create Documentation for Your REST API with Insomnia
The interface is split into three tabs: Design, Test, and Debug. You'll focus on the design tab for this tutorial. Open the Insomnia...
Read more >
Setting Up Swagger to API Test In a JavaScript Application
Spring Boot makes Swagger APIs look easy, Node.js not so much. ... faced with an empty Postman or Insomnia application waiting for you...
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