{"id":85,"date":"2019-04-30T14:00:00","date_gmt":"2019-04-30T14:00:00","guid":{"rendered":"https:\/\/www.json-buddy.com\/blog\/?p=85"},"modified":"2022-10-18T14:00:49","modified_gmt":"2022-10-18T14:00:49","slug":"json-schema-linter-in-jsonbuddy","status":"publish","type":"post","link":"https:\/\/www.json-buddy.com\/blog\/2019\/04\/30\/json-schema-linter-in-jsonbuddy\/","title":{"rendered":"A JSON linter for JSON schema"},"content":{"rendered":"\n<p>If you follow the JSON schema <a href=\"https:\/\/join.slack.com\/t\/json-schema\/shared_invite\/enQtMjk1NDcyNDI2NTAwLTcyYmYwMjdmMmUxNzZjYzIxNGU2YjdkNzdlOGZiNjIwNDI2M2Y3NmRkYjA4YmMwODMwYjgyOTFlNWZjZjAyNjg\">Slack workspace<\/a> or the JSON schema tag at StackOverflow, you will notice that schema authors are often struggling with the same problems while writing a valid and working JSON schema.<\/p>\n\n\n\n<p>A type specifier or a schema keyword is mistyped, an unresolved $ref because the target is missing or the pointer is not correct or a required property is not defined. It is usually easy to fix those errors but unfortunately, it often takes a long time to find them.<\/p>\n\n\n\n<h2>Saving time while creating JSON schemas<\/h2>\n\n\n\n<p>This is the point, where the built-in <a href=\"https:\/\/www.json-buddy.com\/json-schema-analyzer.htm\">JSON Schema analyzer<\/a> of <a href=\"https:\/\/www.json-buddy.com\" target=\"_blank\" rel=\"noopener\">JSONBuddy<\/a> can help you to save a lot of time and hassle if you use the tool as your <strong>JSON Schema editor<\/strong>. The analyzer is a linter for JSON schema and runs in the background while you are working on your schema. Whenever the schema linter finds something to report, you will get a message in the results window.<\/p>\n\n\n\n<p>Let us take a quick look at an example from the real world.<\/p>\n\n\n\n<h2>Someone removed a definition from the JSON schema <\/h2>\n\n\n\n<p>You are working on a big schema and someone from your group removed a definition accidentally. The next time you open the JSON schema, JSONBuddy will show you the following message:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.json-buddy.com\/blog\/wp-content\/uploads\/2019\/04\/json-schema-linter-missing-ref.png\" alt=\"\" class=\"wp-image-312\"\/><figcaption>JSON schema linter message about an unresolved $ref<\/figcaption><\/figure>\n\n\n\n<p>This allows you to fix the error right away. You can go to the version history of the JSON Schema in your repository and revert the change to get the definition back.<\/p>\n\n\n\n<p>If you want to learn more about the JSON schema linter in JSONBuddy, take a look at the following page: <a href=\"https:\/\/www.json-buddy.com\/json-schema-analyzer.htm\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">JSON schema analyzer &#8211; Get a unique companion while editing your JSON schemas<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you follow the JSON schema Slack workspace or the JSON schema tag at StackOverflow, you will notice that schema authors are often struggling with the same problems while writing a valid and working JSON schema. A type specifier or a schema keyword is mistyped, an unresolved $ref because the target is missing or the &hellip; <a href=\"https:\/\/www.json-buddy.com\/blog\/2019\/04\/30\/json-schema-linter-in-jsonbuddy\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">A JSON linter for JSON schema<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[3,22],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.json-buddy.com\/blog\/wp-json\/wp\/v2\/posts\/85"}],"collection":[{"href":"https:\/\/www.json-buddy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.json-buddy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.json-buddy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.json-buddy.com\/blog\/wp-json\/wp\/v2\/comments?post=85"}],"version-history":[{"count":2,"href":"https:\/\/www.json-buddy.com\/blog\/wp-json\/wp\/v2\/posts\/85\/revisions"}],"predecessor-version":[{"id":88,"href":"https:\/\/www.json-buddy.com\/blog\/wp-json\/wp\/v2\/posts\/85\/revisions\/88"}],"wp:attachment":[{"href":"https:\/\/www.json-buddy.com\/blog\/wp-json\/wp\/v2\/media?parent=85"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.json-buddy.com\/blog\/wp-json\/wp\/v2\/categories?post=85"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.json-buddy.com\/blog\/wp-json\/wp\/v2\/tags?post=85"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}