JSON-Schema

JSON Schema is a vocabulary that allows you to annotate and validate JSON documents.

  • Describes your existing data format(s).
  • Provides clear human- and machine- readable documentation.
  • Validates data which is useful for:
    • Automated testing.
    • Ensuring quality of client submitted data.
{
    $id: "https://example.com/login.schema.json",
    $schema: "http://json-schema.org/draft-07/schema#",
    required: ["email", "password"],
    title: "Login",
    description: "Login schema definition",
    type: "object",
    culture: "en-EN",
    properties: {
	mail: {
	    type: "email",
            pattern: null,
	    enum: [],
            minLength: null,
	    maxLength: null,
	    title: "Email",
	    default: ""
	},
	password: {
	    type: "password",
	    pattern: null,
	    enum: [],
	    minLength: 8,
	    maxLength: 25,
	    title: "Password",
	    default: ""
	}
    }
}
	
{
    $id: "https://example.com/login.schema.json",
    $schema: "http://json-schema.org/draft-07/schema#",
    required: ["email", "password"],
    title: "Login",
    description: "Login schema definition",
    type: "object",
    culture: "en-EN",
    properties: {
	mail: {
	    type: "email",
            pattern: null,
	    enum: [],
            minLength: null,
	    maxLength: null,
	    title: "Email",
	    default: "",
            ui: {
	        options: {},
		page: 1,
		placeholder: "e-mail",
		component: "InputText",
		row: true,
		css_class: null,
                description: null
	    }
	},
	password: {
	    type: "password",
	    pattern: null,
	    enum: [],
	    minLength: 8,
	    maxLength: 25,
	    title: "Password",
	    default: "",
            ui: {
	        options: {},
		page: 1,
		placeholder: "Password",
		component: "InputText",
	        row: false,
		css_class: null,
		description: null
	    }
	}
    }
}
	

myAudi

BDB

Backend Driven Backffice

Nucleo

Demo

Ora la parola a

Thomas e Matteo

JSON-Schema

By Alessandro Bellesia

JSON-Schema

  • 81