OpenAPI 3.0: $ref path string that includes a dot (name.name) doesn't import correctly.
See original GitHub issueISSUE
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:
- Import the following file (with
.
s used) openapi3_works_not.json.zip - Open the example response
No response was specfied
for the request:com.nedap.healthcare.api.benchmark.Benchmark API.client Migration
- 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
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Using $ref - Swagger
OAS 3 This guide is for OpenAPI 3.0. Using $ref. When you document an API, it is common to have some features which...
Read more >OpenAPI Specification v3.0.3 | Introduction, Definitions, & More
The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs.
Read more >OpenApi Generator reference an external POJO in YAML file ...
I'm not very satisfied with this solution so I want to know if there is a way to tell OpenApi Generator to use...
Read more >Common Mistakes Developers Make In Their RAML Files
As its name suggests, it is an API Modeling language used by plenty of developers to design their APIs from scratch. It offers...
Read more >Splitting specification file - API Handyman
Writing OpenAPI (Swagger) Specification Tutorial Series ... The list supports paging. parameters: - name: pageSize in: query description: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, just noticed that references that include dots cannot be clicked to “go to reference”. A fix would be awesome, thanks!!!
@rasbreuknedap Thanks for the detailed report, and apologies for the delay here. I’ve opened up a PR for this fix - https://github.com/postmanlabs/openapi-to-postman/pull/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.