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

[Issue] Request-URL from OpenAPI import contains path parameter with curly brackets instead of colon #2513

Closed
chrisnagel opened this issue Jun 25, 2024 · 0 comments · Fixed by #2533

Comments

@chrisnagel
Copy link
Contributor

chrisnagel commented Jun 25, 2024

Description

The import of an OpenAPI specification in YAML format leads to an incorrect transformation of path parameters.

An OpenAPI specification such as
/users/{id}

should normally read as follows in Bruno:
/users/:id

In fact, the imported request url contains the parameter specification in curly brackets (i.e. still in the form /users/{id}) and the parameter concerned is also listed in the Bruno GUI under Params/Path.
If the request is sent, the variable in the request url is not replaced.

.yaml file to reproduce the behaviour

openapi: 3.0.0
info:
  title: Sample API
  version: 0.1.9
servers:
  - url: http://api.example.com/v1
    description: Optional server description, e.g. Main (production) server
paths:
  
  /users/{id}:
    get:
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: array
            items:
              type: integer
            minItems: 1
          style: matrix
          explode: true
        - in: query
          name: metadata
          schema:
            type: boolean
          # Using the default serialization for query parameters:
          # style=form, explode=false, allowReserved=false
      responses:
        '200':
          description: A list of users

Originally posted by @epestela in #2506 (comment)

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

Successfully merging a pull request may close this issue.

1 participant