json-schema-ref-parser icon indicating copy to clipboard operation
json-schema-ref-parser copied to clipboard

Urlencoding of `$defs`

Open fjd-anh opened this issue 3 years ago • 1 comments

We use the Parser to bundle a JSON Schema. In this process references to definitions in $defs get encoded to %24defs.

Example: before bundling

        "signature": {
          "$ref": "#/$defs/signature"
        },

after bundling

              "signature": {
                "$ref": "#/properties/contentStructure/%24defs/signature"
              },

Unfortunately, the code generator won't eat the %24, so we have to uneconde it manually.

Is there a chance to avoid the encoding?

fjd-anh avatar May 18 '22 13:05 fjd-anh

Note the notice in the readme file. https://github.com/APIDevTools/json-schema-ref-parser/issues/285

JonasGroeger avatar Apr 20 '23 09:04 JonasGroeger

I dont believe this is happening anymore on latest - let me know with an example if it is

jonluca avatar Mar 06 '24 06:03 jonluca