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 3.0: $ref path string that includes a dot (name.name) doesn't import correctly. #36

Closed
JP-from-Postman opened this issue Mar 2, 2019 · 6 comments

Comments

@JP-from-Postman
Copy link

ISSUE
When importing an OpenAPI 3.0 .json file, with a $ref that points to a component path, if the path string contains a . (example: "$ref": "#/components/schemas/item.otherItem"), the path isn't resolved correctly, and shows an error like the following in the field where the $ref was used:

"value": "reference #/components/schemas/item.otherItem not found in the api spec"

Replacing the .s with a _, allows the file to import correctly.

REPRODUCE:

  1. Import the following file (with .s used)
    openapi3_works_not.json.zip
  2. Open the example response No response was specfied for the request: com.nedap.healthcare.api.benchmark.Benchmark API.client Migration
  3. Check response body, see following:
"benchmarkResults": [
  {
   "value": "reference #/components/schemas/benchmark.BenchmarkResult not found in the api spec"
  },

For comparison, try importing following file (where .s are replaced with _)
openapi3_works.json.zip

@rasbreuknedap
Copy link

Hi,

First of all i would like to thank JP-from-Postman for filing this issue.
This issue is impacting our usage of Postman, could you give us an estimate on when this is going to be picked-up/fixed?

Your sincerely,

Raymond Asbreuk
Nedap

@rasbreuknedap
Copy link

Hi,

Any updates on the above? Could you give any estimate on when this ticket is going to be picked up/fixed?

Your sincerely,

Raymond Asbreuk
Nedap

@rasbreuknedap
Copy link

Hi,

Do you have any updates on the questions i asked above.
Could you please give any estimate on when this ticket is going to be picked up/fixed?

Gr,

Raymond Asbreuk

@abhijitkane
Copy link
Member

@rasbreuknedap Thanks for the detailed report, and apologies for the delay here. I've opened up a PR for this fix - #54. We can make a release for this module soon, but this will only be updated in the next version of the Postman app. You can use this as a stand-alone module till then.

@abhijitkane
Copy link
Member

@rasbreuknedap The fix has been included in Postman 7.1.0.

@sciamano89
Copy link

Hi, just noticed that references that include dots cannot be clicked to "go to reference". A fix would be awesome, thanks!!!

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

No branches or pull requests

4 participants