oxidecomputer / typify

JSON Schema -> Rust type converter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`required` keyword on a `$ref` causes a `not yet implemented` panic

kika opened this issue · comments

Seems similar to #272 and #312

The relevant portion of the schema looks like this:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "definitions": {
    "somename": {
      "$ref": "#/definitions/someothername",
      "required": [
        "someproperty"
      ]
    }
  }
}

Indeed SchemaObject type doesn't have a required field, which is only valid on object type as per spec. And at the time of the parse it's unknown what $ref points to.
I'm willing to hack on this, but don't see how to do about it with the current codebase.

related: #523