Skip to content

Wrong reference in src/responses/SOL002SOL003_resp.yaml, branch 2.4.1-maintenance

In the file mentioned in the issue title, there are many references that try to be "relative" but have an initial slash and become absolute. I'm referring to lines like 101:

       $ref: "/../definitions/SOL002SOL003_def.yaml#/definitions/ProblemDetails"  

Here, because it starts with a dash / , the .. can't go higher in the filesystem and it is refering to the absolute path /definitions/SOL002SOL003_def.yaml (and then to the ProblemDetails definition inside that file).

Of course this fails, any parser of the openapi specification will give an error similar to

[Errno 2] No such file or directory: '/definitions/SOL002SOL003_def.yaml'

If we simply remove the extra initial slash, thus having

       $ref: "/../definitions/SOL002SOL003_def.yaml#/definitions/ProblemDetails"  

Now we are refering to src/responses/../definitions/SOL002SOL003_def.yaml or equivalently src/definitions/SOL002SOL003_def.yaml, which is a valid file

Since I can't fork and pull, I'll provide a diff for the fixes

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information