Ref names are lost after parse
See original GitHub issueAfter parse, the #ref from Definitions are resolved to its types, but their original names are lost.
Example: https://petstore.swagger.io/v2/swagger.json
The Pet
definition has an attribute named category
, which has a #ref to the Category
definition, but the reference is lost after parsing (even though the fields are parsed correctly). Its type should be Category
instead of object
.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:18 (8 by maintainers)
Top Results From Across the Web
Formula Parse Errors In Google Sheets And How To Fix Them
The #REF! formula parse error occurs when you have an invalid reference. Missing reference: For example when you reference a cell in your ......
Read more >SyntaxError: missing name after . operator - JavaScript | MDN
The JavaScript exception "missing name after . operator" occurs when there is a problem with how the dot operator ( . ) is...
Read more >How to Fix Formula Parse Errors in Google Sheets. - Airboxr
The first thing you want to do to resolve this error is read the error message. It gives you an idea of the...
Read more >R: Parse Expressions
When srcfile is a character string, error messages will include the name, but source reference information will not be added to the result....
Read more >git-rev-parse Documentation - Git
This is similar to --symbolic, but it omits input that are not refs (i.e. branch or tag names; or more explicitly disambiguating "heads/master"...
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
Correct me if I’m wrong, but it looks like this should actually be implemented in the
json-schema-ref-parser
package, right? I was wondering if it should be handled in thedereference
method, always adding a $ref property (even when it’s not a circular structure).Around here (link).
You are absolutely correct, I found out the difference after meddling a bit after opening the issue. Although I was wondering if, even after derreferencing, at least a link to the original structure should be kept.
What I was expecting is a way where the value for
parsed.definitions.Pet.properties.category
isCategory
. This way, I can derrefence the structure myself whenever needed, sincr I’m using the parser to dynamically generate API code.