json-schema-faker: Reference (still) not found

Going back to #25. I can see, that deref@0.3.0 solves this issue. The problem is that deref@0.3.0 isn’t included in json-schema-faker. Can we publish version 0.1.7 where, according to develop branch, the issue is solved? I think it’s a minor fix and there’s no need to wait for a bigger release. It’s a bug afterall 😉

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 25 (17 by maintainers)

Commits related to this issue

Most upvoted comments

Notice that using #/components is bit invalid, I think you can use #/definitions/SomethingComponent instead.

Yeah I think that’s one of the things OpenAPI changed in the v3 release – e.g. it’s now #/components/schemas rather than #/definitions although maybe #/definitions is what JSON Schema defines.

AFAIK you can access almost any property from any other schema as long you use their id and then a json-pointer reference to it. I suggest you placing all nested refs as definitions within their own schema, or even use different schemas with just definitions.

Phew, yeah after a few hours of playing around with things I finally have things working somewhat. It seems I had some other issues caused by the $ref transformation I’m doing but I think that would all be resolved by the resolveReferences option I mentioned in #290. Thanks again for your patience and assistance… I’ll keep digging into it and look into those examples you provided.