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.

Refs not fixed up

See original GitHub issue

Not all the refs are fixed up after conversion. The internal ones (not to #/definitions) are not. I checked your code and I’m not sure whether we can fix it efficiently but maybe you know how to do it.

Checklist

  • Conversion: I have checked my source definition is valid OpenAPI 2.0

Detailed Description

Input:

swagger: '2.0'
info:
  version: '1.0'
  title: Demo API
paths:
  "/test":
    get:
      responses:
        '200':
          description: OK
          schema:
            type: object
            properties:
              default:
                title: Check
                type: object
                properties:
                  message:
                    type: string
                    description: bla
              database:
                "$ref": "#/paths/~1test/get/responses/200/schema/properties/default"

Output with broken ref:

openapi: 3.0.0
servers: []
info:
  version: '1.0'
  title: Demo API
paths:
  "/test":
    get:
      responses:
        '200':
          description: OK
          content:
            "*/*":
              schema:
                type: object
                properties:
                  default:
                    title: Check
                    type: object
                    properties:
                      message:
                        type: string
                        description: bla
                  database:
                     # Broken ref below
                    "$ref": "#/paths/~1test/get/responses/200/schema/properties/default" 

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
philsturgeoncommented, Jan 24, 2018

Done! Suggested the workaround for now.

1reaction
MikeRalphsoncommented, Jan 24, 2018

🤢

Read more comments on GitHub >

github_iconTop Results From Across the Web

ReFS volume appears RAW (version doesn't match ...
After Windows Update last night, Windows Server 2019 wouldn't mount a storage space volume as ReFS (it appears as RAW). The error in...
Read more >
Microsoft and the unfixed ReFS bug in Windows
The Updated fix, for Refs on removable drives, only addresses the ReFS v3 case and does not (and never will) address the refsv1...
Read more >
Couldn't set refs/heads/master when commit
It seems you have lost your HEAD , so you will have to recreate it. You can do that using this. echo ref:...
Read more >
ReFS issues with latest Windows Server Updates ...
Just a quick post; the latest Windows Server updates for 2012R2, 2019 and 2022 (haven't seen 2016) can cause ReFS issues.
Read more >
5 Reasons Why Microsoft is Removing ReFS from Windows
You Can't Install OS on a ReFS partition. The first limitation of ReFS is that doesn't support installation of any OS, not even...
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