APIDevTools / json-schema-ref-parser

Parse, Resolve, and Dereference JSON Schema $ref pointers in Node and browsers
https://apitools.dev/json-schema-ref-parser
MIT License
952 stars 227 forks source link

Urlencoding of `$defs` #262

Closed fjd-anh closed 6 months ago

fjd-anh commented 2 years ago

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?

JonasGroeger commented 1 year ago

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

jonluca commented 6 months ago

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