jsonschema2md icon indicating copy to clipboard operation
jsonschema2md copied to clipboard

Required properties which point to $ref are not shown as required

Open brupxxxlgroup opened this issue 5 months ago • 0 comments

Hello follwing json

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "logLevel": {
      "$ref": "#/$defs/logLevel"
    }
  },
  "required": ["logLevel"],
  "$defs": {
    "logLevel": {
      "type": "string",
      "description": "The log level for the application.",
      "enum": ["Debug", "Info", "Warning", "Error", "Fatal"]
    }
  }
}

gives folling output

JSON Schema

Properties

  • logLevel: Refer to #/$defs/logLevel.

Definitions

  • logLevel (string): The log level for the application. Must be one of: ["Debug", "Info", "Warning", "Error", "Fatal"].

Why is logLevel not shown as required in the properties section?

brupxxxlgroup avatar Sep 05 '24 13:09 brupxxxlgroup