sbrunner / jsonschema2md

Convert JSON Schemas to simple, human-readable Markdown documentation.
https://pypi.org/project/jsonschema2md/
Apache License 2.0
21 stars 12 forks source link

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

Open brupxxxlgroup opened 1 month ago

brupxxxlgroup commented 1 month ago

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

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