(Go: >> BACK << -|- >> HOME <<)

SlideShare a Scribd company logo
Proprietary + Confidential
Embracing JSON Schema
Jeremy Whitlock (@whitlockjc)
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
What is JSON Schema?
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
What is JSON Schema?
“JSON Schema is a vocabulary that allows you to
annotate and validate JSON documents.”
http://json-schema.org
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
What is JSON Schema?
“JSON Schema is a language-agnostic
description format for data structures, their
constraints and relationships.”
Jeremy Whitlock
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
Simplicity Readability Language Agnostic
JSON is essentially a simple way to
represent a dict/map/… of key/value
pairs, where the values can be 1 of 6
types.
The same JSON representation is
easily consumed by humans and
machines alike.
Most languages have native support
for JSON and/or a plethora of libraries
for consuming/producing JSON.
JSON Schema
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
Actual Historical Photo*
{
"message": "Ron was here!"
}
* Not really
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
Description Relationships/Reuse Constraints/Validation
JSON Schema provides everything
necessary to describe data structures
regardless of their complexity.
Understanding the relationships of
more complex data structures is easy
using JSON Schema.
The same document describing your
data structures can contain
constraints that will be used by JSON
Schema libraries to do validation for
you.
JSON Schema
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
JSON Schema Example
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
JSON Schema Example
{
"title": "Submit APIStrat proposal",
"completed": true
}
TO BE CONTINUED...
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
Disclaimer
All JSON Schema examples are in JSON but DO
NOT get too stuck on the JSON bit, JSON is not
required. In fact, anything that could be converted
to a JSON representation would work. For
example, YAML or a Go struct or Java Beans...
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
JSON Schema
{ }
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
$schema id
Used to identify the document as a
JSON Schema document, this property
value is a URL to the JSON Schema
standard your document will be using.
Used to uniquely identify your JSON
Schema document, this property value
is a URL to where your JSON Schema
document will be served. (This value
has an impact on reuse, discussed
later.)
JSON Schema - Document Metadata
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
JSON Schema Example
{
"$schema": "http://json-schema.org/schema#",
"id": "http://example.com/schemas/todo.json"
}
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
JSON Schema - Types
simple complex
● boolean
● integer*
● null
● number
● string
● array
● object
* Not a JSON type, specific to JSON Schema
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
JSON Schema Example
{
"$schema": "http://json-schema.org/schema#",
"id": "http://example.com/schemas/todo.json",
"type": "object"
}
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
JSON Schema Example
{
"$schema": "http://json-schema.org/schema#",
"id": "http://example.com/schemas/todo.json",
"type": "object",
"properties": {
"title": {
"type": "string"
},
"completed": {
"type": "boolean"
}
}
}
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
JSON Schema - Validation
{
"$schema": "http://json-schema.org/schema#",
"id": "http://example.com/schemas/todo.json",
"type": "object",
"properties": {
"title": {
"type": "string"
},
"completed": {
"type": "boolean"
}
}
}
{
"title": "Submit APIStrat proposal",
"completed": true
}
{}
{
"title": "Submit APIStrat proposal"
}
{
"title": "",
"completed": true,
"extra": [1, 2, 3]
}
[1, 2, 3]
{
"completed": "yes"
}
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
JSON Schema - Constraints and Formats
Constraints Formats
Used to apply limitations or
restrictions on the value represented in
the JSON Schema. For example,
restricting the maximum number of
characters in a string value.
Used to indicate the value is a more
specialized version of the specified
type. For example, indicating that a
string value is an email address.
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
JSON Schema Example
{
"$schema": "http://json-schema.org/schema#",
"id": "http://example.com/schemas/todo.json",
"type": "object",
"properties": {
"title": {
"type": "string",
"maxLength": 32
"minLength": 3
},
"completed": {
"type": "boolean"
}
},
"additionalProperties": false,
"required": ["title", "completed"]
}
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
JSON Schema - Validation
{
"$schema": "http://json-schema.org/schema#",
"id": "http://example.com/schemas/todo.json",
"type": "object",
"properties": {
"title": {
"type": "string",
"maxLength": 32
"minLength": 3
},
"completed": {
"type": "boolean"
}
},
"additionalProperties": false,
"required": ["title", "completed"]
}
{
"title": "Submit APIStrat proposal",
"completed": true
}
{}
{
"title": "Submit APIStrat proposal"
}
{
"title": "",
"completed": true,
"extra": [1, 2, 3]
}
[1, 2, 3]
{
"completed": "yes"
}
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
JSON Schema - Validation
* Not really
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
JSON Schema - Reuse
Composition Definitions References
Combining multiple separate schemas
into one, more complex schema.
There is a convention that if your
JSON Schema document has multiple
schemas in it, you nest them within a
root property named "definitions" and
use references to them.
Pointers to other schemas, whether in
the same document or in another
document, to avoid duplication.
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
JSON Schema - Definitions
The definitions property at the root
of a JSON Schema document is a
key/value pair where the key is the
human-friendly name of the schema
and the value is a schema.
{
"$schema": "http://json-schema.org/schema#",
"id": "http://example.com/schemas/todo-types.json",
"definitions": {
"Password": {
"type": "string",
// Omitted for brevity
},
"User": {
"type": "object",
// Omitted for brevity
},
"Todo": {
"type": "object",
// Omitted for brevity
}
}
}
Yes, I know comments aren't allowed in JSON...
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
JSON Schema - References
References are a special JSON
object that has a $ref property in it
whose value is a JSON Pointer (URI)
to another location in the same file,
another file in its entirety or specific
location within another file.
{
"$schema": "http://json-schema.org/schema#",
"id": "http://example.com/schemas/todo-items.json",
"definitions": {
"Todo": {
"type": "object",
"properties": {
"owner": {
"$ref": "person.json"
},
"created": {
"$ref": "types.json#/definitions/Timestamp"
},
// Omitted for brevity
}
},
}
"type": "array",
"items": {
"$ref": "#/definitions/Todo
},
// Omitted for brevity
}
Yes, I know comments aren't allowed in JSON...
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
JSON Schema - Composition
allOf ● An array of schemas
● The data must validate against all schemas
anyOf ● An array of schemas
● The data must validate against at least one schema
oneOf ● An array of schemas
● The data must validate against only one schema
not* ● A subschema
● The data must not validate against the subschema
* not is not really a composition property but it's typically documented alongside the others
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
JSON Schema - Miscellaneous
Schema Metadata Default Values
The title and description properties
can be used on any schema to give it a
human readable name and description
of what the schema represents.
Sometimes your data structures have
optional values and using a default
property allows you to fill in the gaps
when the values are not provided
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
Using JSON Schema
● Code generation
● Contract enforcement
● Documentation generation
● Interface design
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
Using JSON Schema - OpenAPI
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
Using JSON Schema - Resources
JSON Homepage/Reference - http://www.json.org/
JSON Schema Tooling - http://json-schema.org/implementations.html
JSON Schema Homepage - http://json-schema.org/
Understanding JSON Schema Book - https://spacetelescope.github.io/understanding-json-schema/
JSON Schema Online Editor - https://jsonschema.net/#/editor
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
The End
No...I'm not really signing autographs. They wouldn't be worth the paper they are written on. ;)

More Related Content

What's hot

Xsd
XsdXsd
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
smitha273566
 
Xml schema
Xml schemaXml schema
Xml schema
Dr.Saranya K.G
 
Javascript inside Browser (DOM)
Javascript inside Browser (DOM)Javascript inside Browser (DOM)
Javascript inside Browser (DOM)
Vlad Mysla
 
Xml Schema
Xml SchemaXml Schema
Xml Schema
vikram singh
 
Xml Lecture Notes
Xml Lecture NotesXml Lecture Notes
Xml Lecture Notes
Santhiya Grace
 
Xml p5 Lecture Notes
Xml p5 Lecture NotesXml p5 Lecture Notes
Xml p5 Lecture Notes
Santhiya Grace
 
Xsd tutorial
Xsd tutorialXsd tutorial
Xsd tutorial
Ashoka Vanjare
 
Xsd examples
Xsd examplesXsd examples
Xsd examples
Bình Trọng Án
 
XML's validation - XML Schema
XML's validation - XML SchemaXML's validation - XML Schema
XML's validation - XML Schema
videde_group
 
XML Schema
XML SchemaXML Schema
XML Schema
Kumar
 
Html (1)
Html (1)Html (1)
Html (1)
smitha273566
 
3 xml namespaces and xml schema
3   xml namespaces and xml schema3   xml namespaces and xml schema
3 xml namespaces and xml schema
gauravashq
 
FFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTMLFFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTML
Toni Kolev
 
The Document Object Model
The Document Object ModelThe Document Object Model
The Document Object Model
Khou Suylong
 
02 xml schema
02 xml schema02 xml schema
02 xml schema
Baskarkncet
 
Introduction to xml schema
Introduction to xml schemaIntroduction to xml schema
Introduction to xml schema
Abhishek Kesharwani
 
Markup Languages
Markup Languages Markup Languages
Markup Languages
Senthil Kanth
 
Xml schema
Xml schemaXml schema
Xml schema
Akshaya Akshaya
 
Web front end development introduction to html css and javascript
Web front end development introduction to html css and javascriptWeb front end development introduction to html css and javascript
Web front end development introduction to html css and javascript
Marc Huang
 

What's hot (20)

Xsd
XsdXsd
Xsd
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Xml schema
Xml schemaXml schema
Xml schema
 
Javascript inside Browser (DOM)
Javascript inside Browser (DOM)Javascript inside Browser (DOM)
Javascript inside Browser (DOM)
 
Xml Schema
Xml SchemaXml Schema
Xml Schema
 
Xml Lecture Notes
Xml Lecture NotesXml Lecture Notes
Xml Lecture Notes
 
Xml p5 Lecture Notes
Xml p5 Lecture NotesXml p5 Lecture Notes
Xml p5 Lecture Notes
 
Xsd tutorial
Xsd tutorialXsd tutorial
Xsd tutorial
 
Xsd examples
Xsd examplesXsd examples
Xsd examples
 
XML's validation - XML Schema
XML's validation - XML SchemaXML's validation - XML Schema
XML's validation - XML Schema
 
XML Schema
XML SchemaXML Schema
XML Schema
 
Html (1)
Html (1)Html (1)
Html (1)
 
3 xml namespaces and xml schema
3   xml namespaces and xml schema3   xml namespaces and xml schema
3 xml namespaces and xml schema
 
FFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTMLFFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTML
 
The Document Object Model
The Document Object ModelThe Document Object Model
The Document Object Model
 
02 xml schema
02 xml schema02 xml schema
02 xml schema
 
Introduction to xml schema
Introduction to xml schemaIntroduction to xml schema
Introduction to xml schema
 
Markup Languages
Markup Languages Markup Languages
Markup Languages
 
Xml schema
Xml schemaXml schema
Xml schema
 
Web front end development introduction to html css and javascript
Web front end development introduction to html css and javascriptWeb front end development introduction to html css and javascript
Web front end development introduction to html css and javascript
 

Similar to LF_APIStrat17_Embracing JSON Schema

Advanced Json
Advanced JsonAdvanced Json
Advanced Json
guestfd7d7c
 
Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2
kriszyp
 
Hands on JSON
Hands on JSONHands on JSON
Hands on JSON
Octavian Nadolu
 
JSON-LD: JSON for the Social Web
JSON-LD: JSON for the Social WebJSON-LD: JSON for the Social Web
JSON-LD: JSON for the Social Web
Gregg Kellogg
 
JSON and JSON Schema in Oxygen
JSON and JSON Schema in OxygenJSON and JSON Schema in Oxygen
JSON and JSON Schema in Oxygen
Octavian Nadolu
 
json
jsonjson
Json tutorial, a beguiner guide
Json tutorial, a beguiner guideJson tutorial, a beguiner guide
Json tutorial, a beguiner guide
Rafael Montesinos Muñoz
 
Json
JsonJson
J s-o-n-120219575328402-3
J s-o-n-120219575328402-3J s-o-n-120219575328402-3
J s-o-n-120219575328402-3
Ramamohan Chokkam
 
Introduction to JSON
Introduction to JSONIntroduction to JSON
Introduction to JSON
Kanda Runapongsa Saikaew
 
Json
JsonJson
Json at work overview and ecosystem-v2.0
Json at work   overview and ecosystem-v2.0Json at work   overview and ecosystem-v2.0
Json at work overview and ecosystem-v2.0
Boulder Java User's Group
 
CS8651 IP Unit 2 pdf regulation -2017 anna university
CS8651  IP Unit 2 pdf regulation -2017 anna universityCS8651  IP Unit 2 pdf regulation -2017 anna university
CS8651 IP Unit 2 pdf regulation -2017 anna university
amrashbhanuabdul
 
Basics of JSON (JavaScript Object Notation) with examples
Basics of JSON (JavaScript Object Notation) with examplesBasics of JSON (JavaScript Object Notation) with examples
Basics of JSON (JavaScript Object Notation) with examples
Sanjeev Kumar Jaiswal
 
Json
JsonJson
Json
soumya
 
Json
JsonJson
The JSON REST API for WordPress
The JSON REST API for WordPressThe JSON REST API for WordPress
The JSON REST API for WordPress
Taylor Lovett
 
Json
JsonJson
Javascript2839
Javascript2839Javascript2839
Javascript2839
Ramamohan Chokkam
 
Elasticsearch & "PeopleSearch"
Elasticsearch & "PeopleSearch"Elasticsearch & "PeopleSearch"
Elasticsearch & "PeopleSearch"
George Stathis
 

Similar to LF_APIStrat17_Embracing JSON Schema (20)

Advanced Json
Advanced JsonAdvanced Json
Advanced Json
 
Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2
 
Hands on JSON
Hands on JSONHands on JSON
Hands on JSON
 
JSON-LD: JSON for the Social Web
JSON-LD: JSON for the Social WebJSON-LD: JSON for the Social Web
JSON-LD: JSON for the Social Web
 
JSON and JSON Schema in Oxygen
JSON and JSON Schema in OxygenJSON and JSON Schema in Oxygen
JSON and JSON Schema in Oxygen
 
json
jsonjson
json
 
Json tutorial, a beguiner guide
Json tutorial, a beguiner guideJson tutorial, a beguiner guide
Json tutorial, a beguiner guide
 
Json
JsonJson
Json
 
J s-o-n-120219575328402-3
J s-o-n-120219575328402-3J s-o-n-120219575328402-3
J s-o-n-120219575328402-3
 
Introduction to JSON
Introduction to JSONIntroduction to JSON
Introduction to JSON
 
Json
JsonJson
Json
 
Json at work overview and ecosystem-v2.0
Json at work   overview and ecosystem-v2.0Json at work   overview and ecosystem-v2.0
Json at work overview and ecosystem-v2.0
 
CS8651 IP Unit 2 pdf regulation -2017 anna university
CS8651  IP Unit 2 pdf regulation -2017 anna universityCS8651  IP Unit 2 pdf regulation -2017 anna university
CS8651 IP Unit 2 pdf regulation -2017 anna university
 
Basics of JSON (JavaScript Object Notation) with examples
Basics of JSON (JavaScript Object Notation) with examplesBasics of JSON (JavaScript Object Notation) with examples
Basics of JSON (JavaScript Object Notation) with examples
 
Json
JsonJson
Json
 
Json
JsonJson
Json
 
The JSON REST API for WordPress
The JSON REST API for WordPressThe JSON REST API for WordPress
The JSON REST API for WordPress
 
Json
JsonJson
Json
 
Javascript2839
Javascript2839Javascript2839
Javascript2839
 
Elasticsearch & "PeopleSearch"
Elasticsearch & "PeopleSearch"Elasticsearch & "PeopleSearch"
Elasticsearch & "PeopleSearch"
 

More from LF_APIStrat

LF_APIStrat17_OWASP’s Latest Category: API Underprotection
LF_APIStrat17_OWASP’s Latest Category: API UnderprotectionLF_APIStrat17_OWASP’s Latest Category: API Underprotection
LF_APIStrat17_OWASP’s Latest Category: API Underprotection
LF_APIStrat
 
LF_APIStrat17_Creating Communication Applications using the Asterisk RESTFul ...
LF_APIStrat17_Creating Communication Applications using the Asterisk RESTFul ...LF_APIStrat17_Creating Communication Applications using the Asterisk RESTFul ...
LF_APIStrat17_Creating Communication Applications using the Asterisk RESTFul ...
LF_APIStrat
 
LF_APIStrat17_Super-Powered REST API Testing
LF_APIStrat17_Super-Powered REST API TestingLF_APIStrat17_Super-Powered REST API Testing
LF_APIStrat17_Super-Powered REST API Testing
LF_APIStrat
 
LF_APIStrat17_How Mature are You? A Developer Experience Maturity Model
LF_APIStrat17_How Mature are You? A Developer Experience Maturity ModelLF_APIStrat17_How Mature are You? A Developer Experience Maturity Model
LF_APIStrat17_How Mature are You? A Developer Experience Maturity Model
LF_APIStrat
 
LF_APIStrat17_Connect Your RESTful API to Hundreds of Others in Minutes (Zapi...
LF_APIStrat17_Connect Your RESTful API to Hundreds of Others in Minutes (Zapi...LF_APIStrat17_Connect Your RESTful API to Hundreds of Others in Minutes (Zapi...
LF_APIStrat17_Connect Your RESTful API to Hundreds of Others in Minutes (Zapi...
LF_APIStrat
 
LF_APIStrat17_Things I Wish People Told Me About Writing Docs
LF_APIStrat17_Things I Wish People Told Me About Writing DocsLF_APIStrat17_Things I Wish People Told Me About Writing Docs
LF_APIStrat17_Things I Wish People Told Me About Writing Docs
LF_APIStrat
 
LF_APIStrat17_Lifting Legacy to the Cloud on API Boosters
LF_APIStrat17_Lifting Legacy to the Cloud on API BoostersLF_APIStrat17_Lifting Legacy to the Cloud on API Boosters
LF_APIStrat17_Lifting Legacy to the Cloud on API Boosters
LF_APIStrat
 
LF_APIStrat17_Contract-first API Development: A Case Study in Parallel API Pu...
LF_APIStrat17_Contract-first API Development: A Case Study in Parallel API Pu...LF_APIStrat17_Contract-first API Development: A Case Study in Parallel API Pu...
LF_APIStrat17_Contract-first API Development: A Case Study in Parallel API Pu...
LF_APIStrat
 
LF_APIStrat17_Don't Repeat Yourself - Your API is Your Documentation
LF_APIStrat17_Don't Repeat Yourself - Your API is Your DocumentationLF_APIStrat17_Don't Repeat Yourself - Your API is Your Documentation
LF_APIStrat17_Don't Repeat Yourself - Your API is Your Documentation
LF_APIStrat
 
LF_APIStrat17_How We Doubled the Velocity of Our Developer Experience Team
LF_APIStrat17_How We Doubled the Velocity of Our Developer Experience TeamLF_APIStrat17_How We Doubled the Velocity of Our Developer Experience Team
LF_APIStrat17_How We Doubled the Velocity of Our Developer Experience Team
LF_APIStrat
 
LF_APIStrat17_API Marketing: First Comes Usability, then Discoverability
LF_APIStrat17_API Marketing: First Comes Usability, then DiscoverabilityLF_APIStrat17_API Marketing: First Comes Usability, then Discoverability
LF_APIStrat17_API Marketing: First Comes Usability, then Discoverability
LF_APIStrat
 
LF_APIStrat17_Standing Taller with Technology: APIs, IoT, and the Digital Wor...
LF_APIStrat17_Standing Taller with Technology: APIs, IoT, and the Digital Wor...LF_APIStrat17_Standing Taller with Technology: APIs, IoT, and the Digital Wor...
LF_APIStrat17_Standing Taller with Technology: APIs, IoT, and the Digital Wor...
LF_APIStrat
 
LF_APIStrat17_REST API Microversions
LF_APIStrat17_REST API Microversions LF_APIStrat17_REST API Microversions
LF_APIStrat17_REST API Microversions
LF_APIStrat
 
LF_APIStrat17_I Believe You But My Enterprise Don't: Adopting Open Standards ...
LF_APIStrat17_I Believe You But My Enterprise Don't: Adopting Open Standards ...LF_APIStrat17_I Believe You But My Enterprise Don't: Adopting Open Standards ...
LF_APIStrat17_I Believe You But My Enterprise Don't: Adopting Open Standards ...
LF_APIStrat
 
LF_APIStrat17_Case Study: Cold Decision Trees
LF_APIStrat17_Case Study: Cold Decision TreesLF_APIStrat17_Case Study: Cold Decision Trees
LF_APIStrat17_Case Study: Cold Decision Trees
LF_APIStrat
 
LF_APIStrat17_Getting Your API House In Order
LF_APIStrat17_Getting Your API House In OrderLF_APIStrat17_Getting Your API House In Order
LF_APIStrat17_Getting Your API House In Order
LF_APIStrat
 
LF_APIStrat17_Diving Deep into the API Ocean with Open Source Deep Learning T...
LF_APIStrat17_Diving Deep into the API Ocean with Open Source Deep Learning T...LF_APIStrat17_Diving Deep into the API Ocean with Open Source Deep Learning T...
LF_APIStrat17_Diving Deep into the API Ocean with Open Source Deep Learning T...
LF_APIStrat
 
LF_APIStrat17_Supporting SDKs in 7 Different Programming Languages While Main...
LF_APIStrat17_Supporting SDKs in 7 Different Programming Languages While Main...LF_APIStrat17_Supporting SDKs in 7 Different Programming Languages While Main...
LF_APIStrat17_Supporting SDKs in 7 Different Programming Languages While Main...
LF_APIStrat
 
LF_APIStrat17_Open Data vs. the World
LF_APIStrat17_Open Data vs. the World LF_APIStrat17_Open Data vs. the World
LF_APIStrat17_Open Data vs. the World
LF_APIStrat
 
LF_APIStrat17_Practical DevSecOps for APIs
LF_APIStrat17_Practical DevSecOps for APIsLF_APIStrat17_Practical DevSecOps for APIs
LF_APIStrat17_Practical DevSecOps for APIs
LF_APIStrat
 

More from LF_APIStrat (20)

LF_APIStrat17_OWASP’s Latest Category: API Underprotection
LF_APIStrat17_OWASP’s Latest Category: API UnderprotectionLF_APIStrat17_OWASP’s Latest Category: API Underprotection
LF_APIStrat17_OWASP’s Latest Category: API Underprotection
 
LF_APIStrat17_Creating Communication Applications using the Asterisk RESTFul ...
LF_APIStrat17_Creating Communication Applications using the Asterisk RESTFul ...LF_APIStrat17_Creating Communication Applications using the Asterisk RESTFul ...
LF_APIStrat17_Creating Communication Applications using the Asterisk RESTFul ...
 
LF_APIStrat17_Super-Powered REST API Testing
LF_APIStrat17_Super-Powered REST API TestingLF_APIStrat17_Super-Powered REST API Testing
LF_APIStrat17_Super-Powered REST API Testing
 
LF_APIStrat17_How Mature are You? A Developer Experience Maturity Model
LF_APIStrat17_How Mature are You? A Developer Experience Maturity ModelLF_APIStrat17_How Mature are You? A Developer Experience Maturity Model
LF_APIStrat17_How Mature are You? A Developer Experience Maturity Model
 
LF_APIStrat17_Connect Your RESTful API to Hundreds of Others in Minutes (Zapi...
LF_APIStrat17_Connect Your RESTful API to Hundreds of Others in Minutes (Zapi...LF_APIStrat17_Connect Your RESTful API to Hundreds of Others in Minutes (Zapi...
LF_APIStrat17_Connect Your RESTful API to Hundreds of Others in Minutes (Zapi...
 
LF_APIStrat17_Things I Wish People Told Me About Writing Docs
LF_APIStrat17_Things I Wish People Told Me About Writing DocsLF_APIStrat17_Things I Wish People Told Me About Writing Docs
LF_APIStrat17_Things I Wish People Told Me About Writing Docs
 
LF_APIStrat17_Lifting Legacy to the Cloud on API Boosters
LF_APIStrat17_Lifting Legacy to the Cloud on API BoostersLF_APIStrat17_Lifting Legacy to the Cloud on API Boosters
LF_APIStrat17_Lifting Legacy to the Cloud on API Boosters
 
LF_APIStrat17_Contract-first API Development: A Case Study in Parallel API Pu...
LF_APIStrat17_Contract-first API Development: A Case Study in Parallel API Pu...LF_APIStrat17_Contract-first API Development: A Case Study in Parallel API Pu...
LF_APIStrat17_Contract-first API Development: A Case Study in Parallel API Pu...
 
LF_APIStrat17_Don't Repeat Yourself - Your API is Your Documentation
LF_APIStrat17_Don't Repeat Yourself - Your API is Your DocumentationLF_APIStrat17_Don't Repeat Yourself - Your API is Your Documentation
LF_APIStrat17_Don't Repeat Yourself - Your API is Your Documentation
 
LF_APIStrat17_How We Doubled the Velocity of Our Developer Experience Team
LF_APIStrat17_How We Doubled the Velocity of Our Developer Experience TeamLF_APIStrat17_How We Doubled the Velocity of Our Developer Experience Team
LF_APIStrat17_How We Doubled the Velocity of Our Developer Experience Team
 
LF_APIStrat17_API Marketing: First Comes Usability, then Discoverability
LF_APIStrat17_API Marketing: First Comes Usability, then DiscoverabilityLF_APIStrat17_API Marketing: First Comes Usability, then Discoverability
LF_APIStrat17_API Marketing: First Comes Usability, then Discoverability
 
LF_APIStrat17_Standing Taller with Technology: APIs, IoT, and the Digital Wor...
LF_APIStrat17_Standing Taller with Technology: APIs, IoT, and the Digital Wor...LF_APIStrat17_Standing Taller with Technology: APIs, IoT, and the Digital Wor...
LF_APIStrat17_Standing Taller with Technology: APIs, IoT, and the Digital Wor...
 
LF_APIStrat17_REST API Microversions
LF_APIStrat17_REST API Microversions LF_APIStrat17_REST API Microversions
LF_APIStrat17_REST API Microversions
 
LF_APIStrat17_I Believe You But My Enterprise Don't: Adopting Open Standards ...
LF_APIStrat17_I Believe You But My Enterprise Don't: Adopting Open Standards ...LF_APIStrat17_I Believe You But My Enterprise Don't: Adopting Open Standards ...
LF_APIStrat17_I Believe You But My Enterprise Don't: Adopting Open Standards ...
 
LF_APIStrat17_Case Study: Cold Decision Trees
LF_APIStrat17_Case Study: Cold Decision TreesLF_APIStrat17_Case Study: Cold Decision Trees
LF_APIStrat17_Case Study: Cold Decision Trees
 
LF_APIStrat17_Getting Your API House In Order
LF_APIStrat17_Getting Your API House In OrderLF_APIStrat17_Getting Your API House In Order
LF_APIStrat17_Getting Your API House In Order
 
LF_APIStrat17_Diving Deep into the API Ocean with Open Source Deep Learning T...
LF_APIStrat17_Diving Deep into the API Ocean with Open Source Deep Learning T...LF_APIStrat17_Diving Deep into the API Ocean with Open Source Deep Learning T...
LF_APIStrat17_Diving Deep into the API Ocean with Open Source Deep Learning T...
 
LF_APIStrat17_Supporting SDKs in 7 Different Programming Languages While Main...
LF_APIStrat17_Supporting SDKs in 7 Different Programming Languages While Main...LF_APIStrat17_Supporting SDKs in 7 Different Programming Languages While Main...
LF_APIStrat17_Supporting SDKs in 7 Different Programming Languages While Main...
 
LF_APIStrat17_Open Data vs. the World
LF_APIStrat17_Open Data vs. the World LF_APIStrat17_Open Data vs. the World
LF_APIStrat17_Open Data vs. the World
 
LF_APIStrat17_Practical DevSecOps for APIs
LF_APIStrat17_Practical DevSecOps for APIsLF_APIStrat17_Practical DevSecOps for APIs
LF_APIStrat17_Practical DevSecOps for APIs
 

Recently uploaded

Verti - EMEA Insurer Innovation Award 2024
Verti - EMEA Insurer Innovation Award 2024Verti - EMEA Insurer Innovation Award 2024
Verti - EMEA Insurer Innovation Award 2024
The Digital Insurer
 
How Netflix Builds High Performance Applications at Global Scale
How Netflix Builds High Performance Applications at Global ScaleHow Netflix Builds High Performance Applications at Global Scale
How Netflix Builds High Performance Applications at Global Scale
ScyllaDB
 
STKI Israeli Market Study 2024 final v1
STKI Israeli Market Study 2024 final  v1STKI Israeli Market Study 2024 final  v1
STKI Israeli Market Study 2024 final v1
Dr. Jimmy Schwarzkopf
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
Vijayananda Mohire
 
K2G - Insurtech Innovation EMEA Award 2024
K2G - Insurtech Innovation EMEA Award 2024K2G - Insurtech Innovation EMEA Award 2024
K2G - Insurtech Innovation EMEA Award 2024
The Digital Insurer
 
What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
Stephanie Beckett
 
Lessons Of Binary Analysis - Christien Rioux
Lessons Of Binary Analysis - Christien RiouxLessons Of Binary Analysis - Christien Rioux
Lessons Of Binary Analysis - Christien Rioux
crioux1
 
GDG Cloud Southlake #34: Neatsun Ziv: Automating Appsec
GDG Cloud Southlake #34: Neatsun Ziv: Automating AppsecGDG Cloud Southlake #34: Neatsun Ziv: Automating Appsec
GDG Cloud Southlake #34: Neatsun Ziv: Automating Appsec
James Anderson
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
Safe Software
 
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Erasmo Purificato
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
Emerging Tech
 
AC Atlassian Coimbatore Session Slides( 22/06/2024)
AC Atlassian Coimbatore Session Slides( 22/06/2024)AC Atlassian Coimbatore Session Slides( 22/06/2024)
AC Atlassian Coimbatore Session Slides( 22/06/2024)
apoorva2579
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
SynapseIndia
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
UiPathCommunity
 
5G bootcamp Sep 2020 (NPI initiative).pptx
5G bootcamp Sep 2020 (NPI initiative).pptx5G bootcamp Sep 2020 (NPI initiative).pptx
5G bootcamp Sep 2020 (NPI initiative).pptx
SATYENDRA100
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
jackson110191
 
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum ThreatsNavigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
anupriti
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
Yevgen Sysoyev
 
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
ArgaBisma
 

Recently uploaded (20)

Verti - EMEA Insurer Innovation Award 2024
Verti - EMEA Insurer Innovation Award 2024Verti - EMEA Insurer Innovation Award 2024
Verti - EMEA Insurer Innovation Award 2024
 
How Netflix Builds High Performance Applications at Global Scale
How Netflix Builds High Performance Applications at Global ScaleHow Netflix Builds High Performance Applications at Global Scale
How Netflix Builds High Performance Applications at Global Scale
 
STKI Israeli Market Study 2024 final v1
STKI Israeli Market Study 2024 final  v1STKI Israeli Market Study 2024 final  v1
STKI Israeli Market Study 2024 final v1
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
 
K2G - Insurtech Innovation EMEA Award 2024
K2G - Insurtech Innovation EMEA Award 2024K2G - Insurtech Innovation EMEA Award 2024
K2G - Insurtech Innovation EMEA Award 2024
 
What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
 
Lessons Of Binary Analysis - Christien Rioux
Lessons Of Binary Analysis - Christien RiouxLessons Of Binary Analysis - Christien Rioux
Lessons Of Binary Analysis - Christien Rioux
 
GDG Cloud Southlake #34: Neatsun Ziv: Automating Appsec
GDG Cloud Southlake #34: Neatsun Ziv: Automating AppsecGDG Cloud Southlake #34: Neatsun Ziv: Automating Appsec
GDG Cloud Southlake #34: Neatsun Ziv: Automating Appsec
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
 
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
 
AC Atlassian Coimbatore Session Slides( 22/06/2024)
AC Atlassian Coimbatore Session Slides( 22/06/2024)AC Atlassian Coimbatore Session Slides( 22/06/2024)
AC Atlassian Coimbatore Session Slides( 22/06/2024)
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
 
5G bootcamp Sep 2020 (NPI initiative).pptx
5G bootcamp Sep 2020 (NPI initiative).pptx5G bootcamp Sep 2020 (NPI initiative).pptx
5G bootcamp Sep 2020 (NPI initiative).pptx
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
 
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum ThreatsNavigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
 
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
 

LF_APIStrat17_Embracing JSON Schema

  • 1. Proprietary + Confidential Embracing JSON Schema Jeremy Whitlock (@whitlockjc)
  • 2. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem What is JSON Schema?
  • 3. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem What is JSON Schema? “JSON Schema is a vocabulary that allows you to annotate and validate JSON documents.” http://json-schema.org
  • 4. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem What is JSON Schema? “JSON Schema is a language-agnostic description format for data structures, their constraints and relationships.” Jeremy Whitlock
  • 5. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem Simplicity Readability Language Agnostic JSON is essentially a simple way to represent a dict/map/… of key/value pairs, where the values can be 1 of 6 types. The same JSON representation is easily consumed by humans and machines alike. Most languages have native support for JSON and/or a plethora of libraries for consuming/producing JSON. JSON Schema
  • 6. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem Actual Historical Photo* { "message": "Ron was here!" } * Not really
  • 7. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem Description Relationships/Reuse Constraints/Validation JSON Schema provides everything necessary to describe data structures regardless of their complexity. Understanding the relationships of more complex data structures is easy using JSON Schema. The same document describing your data structures can contain constraints that will be used by JSON Schema libraries to do validation for you. JSON Schema
  • 8. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem JSON Schema Example
  • 9. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem JSON Schema Example { "title": "Submit APIStrat proposal", "completed": true } TO BE CONTINUED...
  • 10. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem Disclaimer All JSON Schema examples are in JSON but DO NOT get too stuck on the JSON bit, JSON is not required. In fact, anything that could be converted to a JSON representation would work. For example, YAML or a Go struct or Java Beans...
  • 11. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem JSON Schema { }
  • 12. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem $schema id Used to identify the document as a JSON Schema document, this property value is a URL to the JSON Schema standard your document will be using. Used to uniquely identify your JSON Schema document, this property value is a URL to where your JSON Schema document will be served. (This value has an impact on reuse, discussed later.) JSON Schema - Document Metadata
  • 13. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem JSON Schema Example { "$schema": "http://json-schema.org/schema#", "id": "http://example.com/schemas/todo.json" }
  • 14. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem JSON Schema - Types simple complex ● boolean ● integer* ● null ● number ● string ● array ● object * Not a JSON type, specific to JSON Schema
  • 15. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem JSON Schema Example { "$schema": "http://json-schema.org/schema#", "id": "http://example.com/schemas/todo.json", "type": "object" }
  • 16. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem JSON Schema Example { "$schema": "http://json-schema.org/schema#", "id": "http://example.com/schemas/todo.json", "type": "object", "properties": { "title": { "type": "string" }, "completed": { "type": "boolean" } } }
  • 17. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem JSON Schema - Validation { "$schema": "http://json-schema.org/schema#", "id": "http://example.com/schemas/todo.json", "type": "object", "properties": { "title": { "type": "string" }, "completed": { "type": "boolean" } } } { "title": "Submit APIStrat proposal", "completed": true } {} { "title": "Submit APIStrat proposal" } { "title": "", "completed": true, "extra": [1, 2, 3] } [1, 2, 3] { "completed": "yes" }
  • 18. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem JSON Schema - Constraints and Formats Constraints Formats Used to apply limitations or restrictions on the value represented in the JSON Schema. For example, restricting the maximum number of characters in a string value. Used to indicate the value is a more specialized version of the specified type. For example, indicating that a string value is an email address.
  • 19. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem JSON Schema Example { "$schema": "http://json-schema.org/schema#", "id": "http://example.com/schemas/todo.json", "type": "object", "properties": { "title": { "type": "string", "maxLength": 32 "minLength": 3 }, "completed": { "type": "boolean" } }, "additionalProperties": false, "required": ["title", "completed"] }
  • 20. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem JSON Schema - Validation { "$schema": "http://json-schema.org/schema#", "id": "http://example.com/schemas/todo.json", "type": "object", "properties": { "title": { "type": "string", "maxLength": 32 "minLength": 3 }, "completed": { "type": "boolean" } }, "additionalProperties": false, "required": ["title", "completed"] } { "title": "Submit APIStrat proposal", "completed": true } {} { "title": "Submit APIStrat proposal" } { "title": "", "completed": true, "extra": [1, 2, 3] } [1, 2, 3] { "completed": "yes" }
  • 21. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem JSON Schema - Validation * Not really
  • 22. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem JSON Schema - Reuse Composition Definitions References Combining multiple separate schemas into one, more complex schema. There is a convention that if your JSON Schema document has multiple schemas in it, you nest them within a root property named "definitions" and use references to them. Pointers to other schemas, whether in the same document or in another document, to avoid duplication.
  • 23. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem JSON Schema - Definitions The definitions property at the root of a JSON Schema document is a key/value pair where the key is the human-friendly name of the schema and the value is a schema. { "$schema": "http://json-schema.org/schema#", "id": "http://example.com/schemas/todo-types.json", "definitions": { "Password": { "type": "string", // Omitted for brevity }, "User": { "type": "object", // Omitted for brevity }, "Todo": { "type": "object", // Omitted for brevity } } } Yes, I know comments aren't allowed in JSON...
  • 24. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem JSON Schema - References References are a special JSON object that has a $ref property in it whose value is a JSON Pointer (URI) to another location in the same file, another file in its entirety or specific location within another file. { "$schema": "http://json-schema.org/schema#", "id": "http://example.com/schemas/todo-items.json", "definitions": { "Todo": { "type": "object", "properties": { "owner": { "$ref": "person.json" }, "created": { "$ref": "types.json#/definitions/Timestamp" }, // Omitted for brevity } }, } "type": "array", "items": { "$ref": "#/definitions/Todo }, // Omitted for brevity } Yes, I know comments aren't allowed in JSON...
  • 25. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem JSON Schema - Composition allOf ● An array of schemas ● The data must validate against all schemas anyOf ● An array of schemas ● The data must validate against at least one schema oneOf ● An array of schemas ● The data must validate against only one schema not* ● A subschema ● The data must not validate against the subschema * not is not really a composition property but it's typically documented alongside the others
  • 26. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem JSON Schema - Miscellaneous Schema Metadata Default Values The title and description properties can be used on any schema to give it a human readable name and description of what the schema represents. Sometimes your data structures have optional values and using a default property allows you to fill in the gaps when the values are not provided
  • 27. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem Using JSON Schema ● Code generation ● Contract enforcement ● Documentation generation ● Interface design
  • 28. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem Using JSON Schema - OpenAPI
  • 29. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem Using JSON Schema - Resources JSON Homepage/Reference - http://www.json.org/ JSON Schema Tooling - http://json-schema.org/implementations.html JSON Schema Homepage - http://json-schema.org/ Understanding JSON Schema Book - https://spacetelescope.github.io/understanding-json-schema/ JSON Schema Online Editor - https://jsonschema.net/#/editor
  • 30. Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem The End No...I'm not really signing autographs. They wouldn't be worth the paper they are written on. ;)