mock-json-schema icon indicating copy to clipboard operation
mock-json-schema copied to clipboard

[question]: is it possible to mock self referencing?

Open javaxiu opened this issue 1 year ago • 1 comments

a self referencing json schema like this, can mock-json-schema mock this?

{
  "type": "object",
  "properties": {
    "name": { "type": "string" },
    "tree": { "$ref": "#/definitions/tree" }
  },
  "definitions": {
    "tree": {
      "type": "object",
      "properties": {
        "value": { "type": "string" },
        "branches": {
          "type": "array",
          "items": { "$ref": "#/definitions/tree" },
          "minItems": 1
        }
      },
      "required": ["value"]
    }
  }
}

javaxiu avatar Mar 08 '23 09:03 javaxiu

At the moment recursive mocking is not supported. PRs accepted!

anttiviljami avatar Oct 06 '23 10:10 anttiviljami