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

imported OpenAPI yaml is missing properties #11519

Closed
1 task done
Daniel-GabrielN opened this issue Dec 6, 2022 · 4 comments
Closed
1 task done

imported OpenAPI yaml is missing properties #11519

Daniel-GabrielN opened this issue Dec 6, 2022 · 4 comments

Comments

@Daniel-GabrielN
Copy link

Is there an existing issue for this?

  • I have searched the tracker for existing similar issues and I know that duplicates will be closed

Describe the Issue

When importing an OpenAPI yaml schema, the response is missing properties
Using the same yaml in editor.swagger.io, vs code + OpenAPI extension or insomnia, it shows the expected result.

The example should show something like

{
  "jsonrpc": "2.0",
  "result": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "name": "string"
    }
  ],
  "additionalProp1": {}
}

But it only shows

{
  "jsonrpc": "2.0",
  "result": {}
}

Here is a sample yaml schema:

openapi: "3.0.0"
info:
  version: "1.0.0"
  title: Pet Service
servers:
  - url: "http://localhost:3006"

paths:
  /v1/listPets:
    post:
      summary: Get Pets
      description: Retrieve the list of Pets
      operationId: listPets
      x-rpc-controller: pets
      tags:
        - Pets
      responses:
        "200":
          description: A list of Pets
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/JsonRpcResponse"
                  - type: object
                    properties:
                      result:
                        $ref: "#/components/schemas/ListPetResponse"

components:
  schemas:

    JsonRpcResponse:
      required:
        - jsonrpc
      additionalProperties: true
      properties:
        jsonrpc:
          type: string
          default: "2.0"
          example: "2.0"
          nullable: false

    Pet:
      required:
        - id
        - name
      additionalProperties: false
      nullable: true
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string

    ListPetResponse:
      type: array
      additionalProperties: false
      items:
        $ref: "#/components/schemas/Pet"

Steps To Reproduce

  1. Import the yaml schema
  2. Navigate to documentation
  3. Check sample response body

Screenshots or Videos

image
image

Operating System

Linux

Postman Version

10.5.8

Postman Platform

Postman App

Additional Context?

No response

@haribo256
Copy link

Same issue here, in fact this has been a pain for me. I would love it if Postman understood all my OpenAPI specs

@akshaydeo
Copy link

@Daniel-GabrielN @haribo256 thanks for reporting this. We are actively looking into this 🙇‍♂️

@VShingala
Copy link
Member

@Daniel-GabrielN We've fixed this issue. Do try this out and let us know if you're facing any further issue here.

@Daniel-GabrielN
Copy link
Author

@VShingala just tested this and it works as expected. Thank you and the team for fixing it 👍

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

No branches or pull requests

5 participants