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

Import from openapi v3 with "~1" in parameter $ref #52

Closed
cia1 opened this issue Apr 12, 2019 · 5 comments
Closed

Import from openapi v3 with "~1" in parameter $ref #52

cia1 opened this issue Apr 12, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@cia1
Copy link

cia1 commented Apr 12, 2019

Describe the bug
"Error while importing Open API 3.0: Could not import" if I have "~1" in "$ref".

To Reproduce

  1. Menu "Import" -> Import File...
  2. Got error: "Error while importing Open API 3.0: Could not import"

App information (please complete the following information):

  • Windows 7
  • Postman v7.0.8

Additional context
This behavior only if a have "~1" in "$ref" in parameters:

    "/order": {
      "get": {
        "parameters": [
          {
            "$ref": "#/paths/~1application~1order/get/parameters/0"
          }
        ],
@abhijitkane abhijitkane transferred this issue from postmanlabs/postman-app-support Apr 12, 2019
@abhijitkane
Copy link
Member

@cia1 I wasn't able to reproduce this. Can you attach a sample OpenAPI spec that you're unable to import?

@cia1
Copy link
Author

cia1 commented Apr 17, 2019

{ "openapi": "3.0.0", "info": { "title": "test", "description": "test", "version": "v1" }, "servers": [ { "url": "http://example.com/admin/v1", "description": "first test server" } ], "paths": { /category: { get: { summary: "Список категорий товаров", parameters: [ { name: "expand", in: "query", description: "Список дополнительных полей", schema: { type: "string" } } ], responses: { 200: { description: "Успех: возвращает массив объектов категорий", content: { application/json: { schema: { type: "array", items: {} } } } } } } }, "/category/active": { "get": { "summary": "Список активных категорий товаров", "parameters": [ { "$ref": "#/paths/~1category/get/parameters/0" } ], "responses": { "200": { $ref: "#/paths/~1category/get/responses/200" } } } } } }

@cia1
Copy link
Author

cia1 commented Apr 17, 2019

This will work if remove "#/paths/~1category/get/parameters/0" ref.

@abhijitkane abhijitkane added the bug Something isn't working label May 25, 2019
@abhijitkane
Copy link
Member

Thanks @cia1. PR #66 should address this. We'll include this in the next release.

@abhijitkane
Copy link
Member

@cia1 This has been addressed in the latest Postman version - 7.2.1.

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

No branches or pull requests

2 participants