You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
get:
operationId: getUploadFilessummary: Get all the non deleted uploaded file batchsresponses:
'200':
content:
'application/json':
schema:
$ref: './../schema/file.yaml#/FileListResponse'
And finally the doc/api/schema/file.yaml which looks like :
As you can see, we use relative paths in our $ref attributes. I simplified a bit the definition but the idea is here. Whenever a $ref contains .., there are skipped.
I checked in the library code and found that the cebe\openapi\ReferenceContext::reduceDots remove all the .. from the given paths. If I just skip this methods, my API doc is correctly imported and used.
I don't know what's the expected behavior here. If I can help (giving more details or contributing code), I'll be glad to do it ^^
The text was updated successfully, but these errors were encountered:
thanks for reporting this. reduceDots does not simply remove the dots, it should resolve cases like e.g. /some/path/to/subdir/../../openapi.yml to /some/path/openapi.yml. There might be a bug so that it does not do that correctly in your case.
Hello !
First, thank you for your awesome library, it helps us a lot manipulating our OpenAPI definitions.
We found a tiny issue about reference resolution in our local configuration.
I give you a tiny sample to describe our usage. We have a
doc/api
folder which contains anopenapi.yaml
file like this :Then here is the
doc/api/upload/files.yaml
:And finally the
doc/api/schema/file.yaml
which looks like :As you can see, we use relative paths in our
$ref
attributes. I simplified a bit the definition but the idea is here. Whenever a$ref
contains..
, there are skipped.I checked in the library code and found that the
cebe\openapi\ReferenceContext::reduceDots
remove all the..
from the given paths. If I just skip this methods, my API doc is correctly imported and used.I don't know what's the expected behavior here. If I can help (giving more details or contributing code), I'll be glad to do it ^^
The text was updated successfully, but these errors were encountered: