Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 有没有办法从Draft-7JSON模式生成HTML表单?_Javascript_Html_Jsonschema - Fatal编程技术网

Javascript 有没有办法从Draft-7JSON模式生成HTML表单?

Javascript 有没有办法从Draft-7JSON模式生成HTML表单?,javascript,html,jsonschema,Javascript,Html,Jsonschema,这是docson无法生成HTML的示例JSON。 这是JSON模式的v7。它适用于v4 也许这与附加属性键有关。 是否有任何类似于docson的工具/包为JSON模式生成HTML 这是docson无法生成HTML的示例JSON。 这是JSON模式的v7。它适用于v4。M 也许这与附加属性键有关。 是否有任何类似于docson的工具/包为JSON模式生成HTML 这是docson无法生成HTML的示例JSON。 这是JSON模式的v7。它适用于v4 也许这与附加属性键有关。 是否有类似于docso

这是docson无法生成HTML的示例JSON。 这是JSON模式的v7。它适用于v4

也许这与附加属性键有关。 是否有任何类似于docson的工具/包为JSON模式生成HTML

这是docson无法生成HTML的示例JSON。 这是JSON模式的v7。它适用于v4。M

也许这与附加属性键有关。 是否有任何类似于docson的工具/包为JSON模式生成HTML

这是docson无法生成HTML的示例JSON。 这是JSON模式的v7。它适用于v4

也许这与附加属性键有关。
是否有类似于docson的工具/包为JSON模式生成HTML。

Hi Makrand。Stackoverflow不适合问这种问题。您已经在JSON模式google组中询问了它,这是正确的位置。欢迎加入我们友好的slack服务器!没有已知的完全符合您需求的良好解决方案。相信我,我已经看过很多了。这是最近的一次:
{
  "$schema": "http://json-schema.org/schema#",
  "title": "sample",
  "type": "object",
  "properties": {
    "image": {
      "$ref": "#/definitions/link",
      "description": "Link to a PNG image"
    },
    "object_types": {
      "$ref": "#/definitions/object_types",
      "description": "Object types supports."
    },
    "person": {
      "$ref": "#/definitions/person",
      "description": "humans"
    }
  },
  "definitions": {
    "person": {
      "properties": {
        "name": {
          "type": "string"
        },
        "age": {
          "type": "integer"
        }
      }
    },
    "link": {
      "type": "object",
      "properties": {
        "href": {
          "type": "string",
          "format": "uri"
        },
        "person": {
          "$ref": "#/definitions/person"
        }
      },
      "required": [
        "href"
      ]
    },
    "object_types": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/definitions/object_type",
        "description": "Each additional property is an object type."
      }
    },
    "object_type": {
      "type": "object",
      "properties": {
        "doc": {
          "$ref": "#/definitions/link",
          "description": "Link to the schema of the object type."
        },
        "fields": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/input_field",
            "description": "Each additional property describes an input field."
          }
        },
        "pollable": {
          "type": "boolean",
          "description": "A hint for the client that polling for this object_type might produce objects containing new data."
        },
        "metadata": {
          "type": "object",
          "description": "Free form key-value pairs. Can contain additional metadata about the object_type, if anything is required by client."
        },
        "endpoint": {
          "$ref": "#/definitions/link",
          "description": "Link to an endpoint that produces this object_type."
        }
      },
      "required": [
        "endpoint"
      ]
    },
    "input_field": {
      "type": "object",
      "properties": {
        "regex": {
          "type": "string",
          "description": "Regular expression that can be used by client to capture valid inputs, from a text line or paragraph."
        },
        "capture_group": {
          "type": "integer",
          "description": "Which parentheses group of the regex captured text to be used."
        },
        "env": {
          "type": "string",
          "description": "To be collected from client's Environment variables and send in the request."
        },
        "required": {
          "type": "boolean",
          "description": "A flag says if this input field is mandatory. If client knows this field then it can include in the request for better results."
        }
      },
      "dependencies": {
        "regex": {
          "required": [
            "capture_group"
          ]
        }
      }
    },
    "http_methods": {
      "type": "string",
      "enum": [
        "DELETE",
        "GET",
        "HEAD",
        "OPTIONS",
        "PATCH",
        "POST",
        "PUT",
        "TRACE"
      ]
    }
  }
}