{"id":864,"date":"2021-02-16T17:23:09","date_gmt":"2021-02-16T16:23:09","guid":{"rendered":"https:\/\/nguenkam.com\/blog\/?p=864"},"modified":"2021-02-16T17:23:09","modified_gmt":"2021-02-16T16:23:09","slug":"create-json-schema","status":"publish","type":"post","link":"https:\/\/nguenkam.com\/blog\/index.php\/2021\/02\/16\/create-json-schema\/","title":{"rendered":"Create JSON schema"},"content":{"rendered":"\n<pre id=\"tw-target-text\" class=\"wp-block-preformatted\"> Find out in this video how you can create JSON schema descriptions by yourself.\n<\/pre>\n\n\n\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"JSON Schema erstellen - JSON Tutorial #10 (German)\" width=\"640\" height=\"480\" src=\"https:\/\/www.youtube.com\/embed\/WucCJycPnz4?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<pre id=\"tw-target-text\" class=\"wp-block-preformatted\">\n<strong>Ticket.json<\/strong>\n<\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>{\r\n    \"$schema\": \".\/ticket-schema-v1.json\",\r\n    \"id\": \"ZUI-23424\",\r\n    \"beschreibung\": \"Server f\u00e4hrt nicht hoch!\",\r\n    \"art\": \"bug\",\r\n    \"datum\": \"2020-03-20\",\r\n    \"prio\": 3,\r\n    \"tags\": &#91; \"Release\", \"Produktion\" ],\r\n    \"kontakt\": {\r\n        \"name\": \"Thomas\",\r\n        \"email\": \"bayer@predic8.com\"\r\n    },\r\n    \"self\": \"http:\/\/api.predic8.de\/tickets\/5974B554-976C-43FD-B370-79AACC335328\"\r\n\r\n}<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Ticket-schema-v1.json<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\r\n    \"$schema\": \"http:\/\/json-schema.org\/draft-07\/schema\",\r\n    \"type\": \"object\",\r\n    \"required\": &#91;\"id\",\"art\"],\r\n    \"properties\": {\r\n        \"$schema\": {},\r\n        \"id\": {\r\n           \"$ref\": \"#\/definitions\/Id\"\r\n        },\r\n        \"beschreibung\": {\r\n            \"type\": \"string\",\r\n            \"minLength\": 10,\r\n            \"maxLength\": 100\r\n        },\r\n        \"art\": {\r\n            \"type\": \"string\",\r\n            \"enum\": &#91;\"bug\",\"verbesserung\"]\r\n        },\r\n        \"datum\": {\r\n            \"type\": \"string\",\r\n            \"format\": \"date\"\r\n        },\r\n        \"prio\": {\r\n            \"type\": \"integer\",\r\n            \"minimum\": 1,\r\n            \"maximum\": 10,\r\n            \"examples\": &#91;1,3,8,10]\r\n        },\r\n        \"tags\": {\r\n            \"type\": \"array\",\r\n            \"items\": {\r\n                \"type\": \"string\"\r\n            }\r\n        },\r\n        \"kontakt\": {\r\n            \"$ref\": \"#\/definitions\/Kontakt\"\r\n        },\r\n        \"self\": {\r\n            \"type\": \"string\",\r\n            \"format\": \"uri\"\r\n        }\r\n    },\r\n    \"additionalProperties\": false,\r\n    \"definitions\": {\r\n        \"Id\": {\r\n            \"type\": \"string\",\r\n            \"pattern\": \"&#91;A-Z]{3}-\\\\d+\",\r\n            \"description\": \"Id mit dem Aufbau XXX-9999\",\r\n            \"examples\": &#91;\"GRT-3456\",\"ZUI-23424\"]\r\n        },\r\n        \"Kontakt\": {\r\n            \"type\": \"object\",\r\n            \"required\": &#91;\"name\"],\r\n            \"properties\": {\r\n                \"email\": {\r\n                    \"type\": \"string\",\r\n                    \"format\": \"email\"\r\n                }\r\n            }\r\n        }\r\n    }\r\n}<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h5>Reference:<\/h5>\n\n\n\n<p><a href=\"https:\/\/www.predic8.de\/json-schema-tutorial-erstellen.htm\">https:\/\/www.predic8.de\/json-schema-tutorial-erstellen.htm<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Find out in this video how you can create JSON schema descriptions by yourself. Ticket.json Ticket-schema-v1.json Reference: https:\/\/www.predic8.de\/json-schema-tutorial-erstellen.htm<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[97,216,162],"_links":{"self":[{"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/864"}],"collection":[{"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=864"}],"version-history":[{"count":2,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/864\/revisions"}],"predecessor-version":[{"id":866,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/864\/revisions\/866"}],"wp:attachment":[{"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=864"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=864"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}