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

OpenAPI import with references in references not working correctly #2044

Closed
2 tasks done
THBlockstar opened this issue Apr 9, 2024 · 0 comments · Fixed by #3009
Closed
2 tasks done

OpenAPI import with references in references not working correctly #2044

THBlockstar opened this issue Apr 9, 2024 · 0 comments · Fixed by #3009
Labels
bug Something isn't working

Comments

@THBlockstar
Copy link

I have checked the following:

  • I use the newest version of bruno.
  • I've searched existing issues and found nothing related to my issue.

Describe the bug

When importing an OpenAPI spec with a reference containing another reference, the second one is not correctly imported into the body of the request.

In the attached .bru file, I put in the .yaml file into the "doc" part.

Also, I added .jso to the .bru, because .bru could not be uploaded.

.bru file to reproduce the bug

meta {
name: Post something to somewhere
type: http
seq: 1
}

post {
url: http://PostSomething
body: json
auth: none
}

headers {
~Hello:
}

body:json {
{
"field1": "",
"field2": []
}
}

docs {
openapi: 3.0.3
info:
title: Test Spec for error resolving"
version: "1.0"
paths:
/PostSomething:
post:
summary: Post something to somewhere
parameters:
- name: "Hello"
in: header
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/body-create"

    responses:
      "200":
        description: "Success"

components:
schemas:
body-create:
type: object
properties:
field1:
type: string
maxLength: 10
field2:
type: array
items:
$ref: "#/components/schemas/body-item-create"

  body-item-create:
    type: object
    properties:
      itmField01:
        type: string
        description: "Item field 1"
      itmField02:
        type: string
        description: "Item field 2"

}

Screenshots/Live demo link

image

@THBlockstar THBlockstar added the bug Something isn't working label Apr 9, 2024
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

Successfully merging a pull request may close this issue.

1 participant