json-schema-for-humans icon indicating copy to clipboard operation
json-schema-for-humans copied to clipboard

definition components usage and missing information

Open sadhasivam opened this issue 1 year ago • 1 comments

Our schema has "$def" section where we have created reusable components. We reference the specified "$def" elements across multiple places with additional information.

The generator also references the "$def". However, schema docs need contextual values added. Any thoughts?

Sample Schema

{
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "type": "object",
  "title": "OF",
  "properties": {
    "uuid": {
      "$ref": "#/$defs/ofString",
      "description": "Unique Identifer",
      "examples": [
        "29292929292929292929292"
      ]
    },
    "firstName": {
      "$ref": "#/$defs/ofString",
      "description": "first name",
      "minLength": 10,
      "examples": [
        "John"
      ]
    },
    "lastName": {
      "$ref": "#/$defs/ofString",
      "description": "last name",
      "maxLength": 10,
      "examples": [
        "Doe"
      ]
    }
  },
  "$defs": {
    "ofString": {
      "type": "string",
      "minLength": 5,
      "maxLength": 250
    }
  }
}

Output

image

Issue

localized firstName, lastName examples , constraints are missing.

sadhasivam avatar Mar 17 '23 02:03 sadhasivam

Same here

gurland avatar Nov 02 '23 11:11 gurland

Should be fixed in version 0.48, let me know if not

dblanchette avatar May 01 '24 20:05 dblanchette

:tada: This issue has been resolved in version 1.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

dblanchette avatar May 03 '24 20:05 dblanchette