openapi2jsonschema icon indicating copy to clipboard operation
openapi2jsonschema copied to clipboard

Problem with case-sensitive filesystem

Open rpgoldman opened this issue 5 years ago • 4 comments

I was running openapi2yaml on MacOS, and it generates files such as "query.json" for a component "Query" entity. But then it emits a reference form like "$ref": "Query.json" which causes problems with de-referencing.

Also, when I try to build a standalone JSON schema, I conjecture that this causes a problem. I see output like this:

Generating interpretation.json
An error occured processing interpretation: URLError: <urlopen error [Errno 2] No such file or directory: 'swagger/schemas/Query.json'>

rpgoldman avatar Aug 13 '20 01:08 rpgoldman

BTW, I'm not sure why, but when I installed this library with pip I got a version tagged as 0.9.1, but the version number in this repo is only 0.9.0, which seems. strange.

rpgoldman avatar Aug 13 '20 01:08 rpgoldman

It looks like the problem is created by downcasing the name of the component here: https://github.com/instrumenta/openapi2jsonschema/blob/d697cbff8a25f520e125e3a5f79cb4e9b972e8ce/openapi2jsonschema/command.py#L130

I'm not sure why this was done, though. Or, if it was done, why the reference in the emitted file wasn't also downcased.

rpgoldman avatar Aug 13 '20 01:08 rpgoldman

Hit same issue lowercase of file names that don't match the referecend types in camelCase

yvesdm avatar Aug 30 '21 08:08 yvesdm

This seems a duplicates of #20

yvesdm avatar Aug 30 '21 08:08 yvesdm