question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"originalRef" duplicates "$ref"

See original GitHub issue

Hey guys, I’m using swagger 1.5.21 for documentation of a Java Rest API using annotations.

I am using io.swagger.jaxrs.Reader and a JsonSerializer to output the documentation in .json format for further processing.

I discovered that the .json output contains both $ref and originalRef. This is an issue for me when further working with this file, and when passing my file to https://editor.swagger.io/, it also complains about “siblings are not allowed beside $ref”.

So, should the getOriginalRef() method in io.swagger.models.RefModel have the @JsonIgnore annotation?

Would be grateful for any insights! 😃

Thanks!

Yve

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
frantumacommented, Sep 3, 2018

1.5.21 and previous versions use Jackson mixin in some cases (for backward compatibility or other reasons) to provide some Jackson annotations and behavior; this is true also for $ref (introduced in #2849, please check PR comment). swagger-core provides JSON and YAML helpers to obtain a correctly configured object mapper (e.g. JSON.mapper()) which also registers such Mixins. If for any reason you need to use an own mapper, you can register such mixins in your code, using ReferenceSerializationConfigurer.serializeAsComputedRef(mapper);

0reactions
dcassianicommented, May 19, 2020

Hi… does anyone know since which version was this fix released into stable production?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature request-removing duplicates - Sonny Software
xml file with my BE library while I am working on a manuscript or research proposal. In many cases, we will have duplicate...
Read more >
Preventing Duplicate ID Creation in MongoDB - Stack Overflow
How do I prevent the auto insertion of the mongo ID in a situation like this? And, relatedly, if I were to use...
Read more >
Duplicate an existing reference type? - EndNote Community
I'd like to duplicate an existing reference type and then modify it. ... to duplicate, replacing most of your original ref type details....
Read more >
useRefHistory - VueUse
Track the change history of a ref, also provides undo and redo functionality. Learn useRefHistory with this FREE video lesson from Vue School!...
Read more >
[Solved] Why does the document get selected after undo-ing ...
Sub bhh_duplicateCheck() ' Checks for duplicate endnotes, ... End With 'rng_source ' Store original ref text, including text before citation ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found