SlideShare a Scribd company logo


1 {
2 "name": "pirosikick"
3 "age": 28,
4 "email": "pirosikick@example.com"
5 }
1 {
2 "type": "object",
3 "properties": {
4 "name": { "type": "string" },
5 "age": {
6 "type": "integer",
7 "minimum": 0
8 },
9 "email": {
10 "type": "string",
11 "format": "email"
12 }
13 }
14 }
1 {
2 "$schema": "http://json-schema.org/draft-04/schema#",
3 "$id": "http://example.com/schema.json#",
4 "type": "object",
5 "definitions": {
6 "name": { ... },
7 "age": { ... },
8 "email": { ... },
9 },
10 "properties": {
11 "name": {
12 "$ref": "#/definitions/name"
13 },
14 "age": {
15 "$ref": "#/definitions/age"
16 },
17 "email": {
18 "$ref": "#/definitions/email"
19 }
20 }
21 }
1 {
2 "$schema": "http://json-schema.org/draft-04/schema#",
3 "$id": "http://example.com/schema.json#",
4 "type": "object",
5 "definitions": {
6 "name": { ... },
7 "age": { ... },
8 "email": { ... },
9 },
10 "properties": {
11 "name": {
12 "$ref": "#/definitions/name"
13 },
14 "age": {
15 "$ref": "#/definitions/age"
16 },
17 "email": {
18 "$ref": "#/definitions/email"
19 }
20 }
21 }
1 {
2 "$schema": "http://json-schema.org/draft-04/schema#",
3 "$id": "http://example.com/schema.json#",
4 "type": "object",
5 "definitions": {
6 "name": { ... },
7 "age": { ... },
8 "email": { ... },
9 },
10 "properties": {
11 "name": {
12 "$ref": "#/definitions/name"
13 },
14 "age": {
15 "$ref": "#/definitions/age"
16 },
17 "email": {
18 "$ref": "#/definitions/email"
19 }
20 }
21 }
1 {
2 "$schema": "http://json-schema.org/draft-04/schema#",
3 "$id": "http://example.com/schema.json#",
4 "type": "object",
5 "definitions": {
6 "name": { ... },
7 "age": { ... },
8 "email": { ... },
9 },
10 "properties": {
11 "name": {
12 "$ref": "#/definitions/name"
13 },
14 "age": {
15 "$ref": "#/definitions/age"
16 },
17 "email": {
18 "$ref": "#/definitions/email"
19 }
20 }
21 }
1 {
2 "$schema": "http://json-schema.org/draft-04/schema#",
3 "$id": "http://example.com/schema.json#",
4 "type": "object",
5 "definitions": {
6 "name": { ... },
7 "age": { ... },
8 "email": { ... },
9 },
10 "properties": {
11 "name": {
12 "$ref": "#/definitions/name"
13 },
14 "age": {
15 "$ref": "#/definitions/age"
16 },
17 "email": {
18 "$ref": "#/definitions/email"
19 }
20 }
21 }
1 {
2 "$schema": "http://json-schema.org/draft-04/hyper-schema",
3 "type": "object",
4 "definitions": { ... },
5 "properties": { ... },
6 "links": [{
7 "title": "ユーザ取得",
8 "description": "idに紐づくユーザを返す",
9 "href": "/user/:id",
10 "method": "GET",
11 "rel": "self"
12 }, {
13 "title": "ユーザ新規登録",
14 "description": "idに紐づくユーザを返す",
15 "href": "/user",
16 "method": "POST",
17 "rel": "create",
18 "schema": {
19 "type": "object",
20 "properties": { ... }
21 }
22 }]
23 }
1 {
2 "$schema": "http://json-schema.org/draft-04/hyper-schema",
3 "type": "object",
4 "definitions": { ... },
5 "properties": { ... },
6 "links": [{
7 "title": "ユーザ取得",
8 "description": "idに紐づくユーザを返す",
9 "href": "/user/:id",
10 "method": "GET",
11 "rel": "self"
12 }, {
13 "title": "ユーザ新規登録",
14 "description": "idに紐づくユーザを返す",
15 "href": "/user",
16 "method": "POST",
17 "rel": "create",
18 "schema": {
19 "type": "object",
20 "properties": { ... }
21 }
22 }]
23 }
1 {
2 "$schema": "http://json-schema.org/draft-04/hyper-schema",
3 "type": "object",
4 "definitions": { ... },
5 "properties": { ... },
6 "links": [{
7 "title": "ユーザ取得",
8 "description": "idに紐づくユーザを返す",
9 "href": "/user/:id",
10 "method": "GET",
11 "rel": "self"
12 }, {
13 "title": "ユーザ新規登録",
14 "description": "idに紐づくユーザを返す",
15 "href": "/user",
16 "method": "POST",
17 "rel": "create",
18 "schema": {
19 "type": "object",
20 "properties": { ... }
21 }
22 }]
23 }
1 #!/bin/bash
2 # vim: set background=light nolist nonumber:
3
4 # 雛形を生成
5 # - schemata以下にリソース毎にファイルを生成
6 # - JSONとYAMLで書くことが出来る(--yamlでYAML)
7 prmd init --yaml user > schemata/user.yaml
8
9 # JSON Hyper-Schema(schema.json)の生成
10 # - ./schemata/*.{yaml,json}とmeta.jsonを結合して生成する
11 prmd combine -m meta.json ./schemata > schema.json
12
13 # Markdownの生成
14 # - prmd combineで生成したschema.jsonからREADME.mdを生成
15 # - OVERVIEW.mdを出力ファイルの先頭に挿入
16 prmd doc --prepend OVERVIEW.md schema.json > README.md
1 const schema = {
2 "type": "object",
3 "properties": {
4 "name": {
5 "title": "名前",
6 "type": "string"
7 },
8 "email": {
9 "title": "メールアドレス",
10 "type": "string",
11 "format": "email"
12 }
13 }
14 };
1 import React from 'react';
2 import { render } from 'react-dom';
3 import Form from 'react-jsonschema-form';
4
5 const schema = { ... };
6
7 render(
8 <Form
9 schema={schema}
10 onChange={({ formData }) => { ... }}
11 onSubmit={({ formData }) => { ... }}
12 />,
13 document.getElementById('wrapper')
14 );
1 const uiSchema = {
2 "name": {
3 "classNames": "from__name", // カスタムクラス名
4 "ui:placeholder": "全角で頼む" // プレースホルダー
5 },
6 "email": {
7 "classNames": "from__email",
8 "ui:placeholder": "you@example.com"
9 }
10 };
11
12 render(
13 <Form
14 schema={schema}
15 uiSchema={uiSchema}
16 onChange={({ formData }) => { ... }}
17 onSubmit={({ formData }) => { ... }}
18 />,
19 document.getElementById('wrapper')
20 );
1 const uiSchema = {
2 "name": {
3 // カスタムフィールド
4 "ui:field": CustomeField,
5 },
6 "email" :{
7 // カスタムウィジェット
8 "ui:widget": CustomeWidget,
9 }
10 };






JSON Schema in Web Frontend #insideFE
JSON Schema in Web Frontend #insideFE

More Related Content

What's hot

Wsomdp
WsomdpWsomdp
Wsomdp
riahialae
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
elliando dias
 
Xmpp prebind
Xmpp prebindXmpp prebind
Xmpp prebind
Syed Arshad
 
TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !
Matheus Marabesi
 
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
ichikaway
 
Perl6 operators and metaoperators
Perl6   operators and metaoperatorsPerl6   operators and metaoperators
Perl6 operators and metaoperators
Simon Proctor
 
DOS
DOSDOS
The Hidden Power of HTMLBars (or, Scope in Ember.js Templates)
The Hidden Power of HTMLBars (or, Scope in Ember.js Templates)The Hidden Power of HTMLBars (or, Scope in Ember.js Templates)
The Hidden Power of HTMLBars (or, Scope in Ember.js Templates)
Matthew Beale
 
Forbes MongoNYC 2011
Forbes MongoNYC 2011Forbes MongoNYC 2011
Forbes MongoNYC 2011
djdunlop
 
Rails GUI Development with Ext JS
Rails GUI Development with Ext JSRails GUI Development with Ext JS
Rails GUI Development with Ext JS
Martin Rehfeld
 
Barcelona.pm Curs1211 sess01
Barcelona.pm Curs1211 sess01Barcelona.pm Curs1211 sess01
Barcelona.pm Curs1211 sess01
Javier Arturo Rodríguez
 
20th.陈晓鸣 百度海量日志分析架构及处理经验分享
20th.陈晓鸣 百度海量日志分析架构及处理经验分享20th.陈晓鸣 百度海量日志分析架构及处理经验分享
20th.陈晓鸣 百度海量日志分析架构及处理经验分享
elevenma
 
Migrare da symfony 1 a Symfony2
 Migrare da symfony 1 a Symfony2  Migrare da symfony 1 a Symfony2
Migrare da symfony 1 a Symfony2
Massimiliano Arione
 
Yql && Raphaël
Yql && RaphaëlYql && Raphaël
Yql && Raphaël
Lachlan Hardy
 
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Darkmira Tour PHP 2016 - Automatizando Tarefas com PhingDarkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Matheus Marabesi
 
Introduction to the new official C# Driver developed by 10gen
Introduction to the new official C# Driver developed by 10genIntroduction to the new official C# Driver developed by 10gen
Introduction to the new official C# Driver developed by 10gen
MongoDB
 
Coding website
Coding websiteCoding website
Coding website
PutuMahendra Wijaya
 
PerlでWeb API入門
PerlでWeb API入門PerlでWeb API入門
PerlでWeb API入門
Yusuke Wada
 
Pemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan SessionPemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan Session
Nur Fadli Utomo
 
TerminalでTwitter
TerminalでTwitterTerminalでTwitter
TerminalでTwitter
Yoshihiro Sugi
 

What's hot (20)

Wsomdp
WsomdpWsomdp
Wsomdp
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
 
Xmpp prebind
Xmpp prebindXmpp prebind
Xmpp prebind
 
TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !
 
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
 
Perl6 operators and metaoperators
Perl6   operators and metaoperatorsPerl6   operators and metaoperators
Perl6 operators and metaoperators
 
DOS
DOSDOS
DOS
 
The Hidden Power of HTMLBars (or, Scope in Ember.js Templates)
The Hidden Power of HTMLBars (or, Scope in Ember.js Templates)The Hidden Power of HTMLBars (or, Scope in Ember.js Templates)
The Hidden Power of HTMLBars (or, Scope in Ember.js Templates)
 
Forbes MongoNYC 2011
Forbes MongoNYC 2011Forbes MongoNYC 2011
Forbes MongoNYC 2011
 
Rails GUI Development with Ext JS
Rails GUI Development with Ext JSRails GUI Development with Ext JS
Rails GUI Development with Ext JS
 
Barcelona.pm Curs1211 sess01
Barcelona.pm Curs1211 sess01Barcelona.pm Curs1211 sess01
Barcelona.pm Curs1211 sess01
 
20th.陈晓鸣 百度海量日志分析架构及处理经验分享
20th.陈晓鸣 百度海量日志分析架构及处理经验分享20th.陈晓鸣 百度海量日志分析架构及处理经验分享
20th.陈晓鸣 百度海量日志分析架构及处理经验分享
 
Migrare da symfony 1 a Symfony2
 Migrare da symfony 1 a Symfony2  Migrare da symfony 1 a Symfony2
Migrare da symfony 1 a Symfony2
 
Yql && Raphaël
Yql && RaphaëlYql && Raphaël
Yql && Raphaël
 
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Darkmira Tour PHP 2016 - Automatizando Tarefas com PhingDarkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
 
Introduction to the new official C# Driver developed by 10gen
Introduction to the new official C# Driver developed by 10genIntroduction to the new official C# Driver developed by 10gen
Introduction to the new official C# Driver developed by 10gen
 
Coding website
Coding websiteCoding website
Coding website
 
PerlでWeb API入門
PerlでWeb API入門PerlでWeb API入門
PerlでWeb API入門
 
Pemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan SessionPemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan Session
 
TerminalでTwitter
TerminalでTwitterTerminalでTwitter
TerminalでTwitter
 

Viewers also liked

Studyx2
Studyx2Studyx2
Studyx1
Studyx1Studyx1
Studyx5
Studyx5Studyx5
Java勉強会2017.3.17
Java勉強会2017.3.17Java勉強会2017.3.17
Java勉強会2017.3.17
technologicarts
 
Studyx4
Studyx4Studyx4
Studyx3
Studyx3Studyx3
Tokyo Salesforce DG Meetup 2017新年会〜Advent Calendarふりかえり〜
Tokyo Salesforce DG Meetup 2017新年会〜Advent Calendarふりかえり〜Tokyo Salesforce DG Meetup 2017新年会〜Advent Calendarふりかえり〜
Tokyo Salesforce DG Meetup 2017新年会〜Advent Calendarふりかえり〜
Akira Kuratani
 
ReactとSeleniumの幸せな関係
ReactとSeleniumの幸せな関係ReactとSeleniumの幸せな関係
ReactとSeleniumの幸せな関係
Akira Kuratani
 
サーバーレスでシステムを開発する時に⼤切な事
サーバーレスでシステムを開発する時に⼤切な事サーバーレスでシステムを開発する時に⼤切な事
サーバーレスでシステムを開発する時に⼤切な事
Hiroyuki Hiki
 
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigiReact Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
Yukiya Nakagawa
 
WebWorker and Atomics
WebWorker and AtomicsWebWorker and Atomics
WebWorker and Atomics
Taketoshi 青野健利
 
先入観とバイアスを考慮したWebサイトパフォーマンス改善
先入観とバイアスを考慮したWebサイトパフォーマンス改善先入観とバイアスを考慮したWebサイトパフォーマンス改善
先入観とバイアスを考慮したWebサイトパフォーマンス改善
Yoichiro Takehora
 
How to make GAE adapt the Great Firewall
How to make GAE adapt the Great FirewallHow to make GAE adapt the Great Firewall
How to make GAE adapt the Great Firewall
Hayato Yoshikawa
 
PYNQ 祭り: Pmod のプログラミング
PYNQ 祭り: Pmod のプログラミングPYNQ 祭り: Pmod のプログラミング
PYNQ 祭り: Pmod のプログラミング
ryos36
 
PYNQで○○してみた!
PYNQで○○してみた!PYNQで○○してみた!
PYNQで○○してみた!
aster_ism
 
PYNQ祭り
PYNQ祭りPYNQ祭り
PYNQ祭り
Mr. Vengineer
 
Pynqでカメラ画像をリアルタイムfastx コーナー検出
Pynqでカメラ画像をリアルタイムfastx コーナー検出Pynqでカメラ画像をリアルタイムfastx コーナー検出
Pynqでカメラ画像をリアルタイムfastx コーナー検出
marsee101
 
Pynq祭り資料
Pynq祭り資料Pynq祭り資料
Pynq祭り資料
一路 川染
 
ハイレベルメンバーによる共創実験 / UX & Service Sketch #26
ハイレベルメンバーによる共創実験 / UX & Service Sketch #26ハイレベルメンバーによる共創実験 / UX & Service Sketch #26
ハイレベルメンバーによる共創実験 / UX & Service Sketch #26
Keita Takizawa
 
Namespace API を用いたマルチテナント型 Web アプリの実践
Namespace API を用いたマルチテナント型 Web アプリの実践Namespace API を用いたマルチテナント型 Web アプリの実践
Namespace API を用いたマルチテナント型 Web アプリの実践
Takuya Ueda
 

Viewers also liked (20)

Studyx2
Studyx2Studyx2
Studyx2
 
Studyx1
Studyx1Studyx1
Studyx1
 
Studyx5
Studyx5Studyx5
Studyx5
 
Java勉強会2017.3.17
Java勉強会2017.3.17Java勉強会2017.3.17
Java勉強会2017.3.17
 
Studyx4
Studyx4Studyx4
Studyx4
 
Studyx3
Studyx3Studyx3
Studyx3
 
Tokyo Salesforce DG Meetup 2017新年会〜Advent Calendarふりかえり〜
Tokyo Salesforce DG Meetup 2017新年会〜Advent Calendarふりかえり〜Tokyo Salesforce DG Meetup 2017新年会〜Advent Calendarふりかえり〜
Tokyo Salesforce DG Meetup 2017新年会〜Advent Calendarふりかえり〜
 
ReactとSeleniumの幸せな関係
ReactとSeleniumの幸せな関係ReactとSeleniumの幸せな関係
ReactとSeleniumの幸せな関係
 
サーバーレスでシステムを開発する時に⼤切な事
サーバーレスでシステムを開発する時に⼤切な事サーバーレスでシステムを開発する時に⼤切な事
サーバーレスでシステムを開発する時に⼤切な事
 
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigiReact Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
 
WebWorker and Atomics
WebWorker and AtomicsWebWorker and Atomics
WebWorker and Atomics
 
先入観とバイアスを考慮したWebサイトパフォーマンス改善
先入観とバイアスを考慮したWebサイトパフォーマンス改善先入観とバイアスを考慮したWebサイトパフォーマンス改善
先入観とバイアスを考慮したWebサイトパフォーマンス改善
 
How to make GAE adapt the Great Firewall
How to make GAE adapt the Great FirewallHow to make GAE adapt the Great Firewall
How to make GAE adapt the Great Firewall
 
PYNQ 祭り: Pmod のプログラミング
PYNQ 祭り: Pmod のプログラミングPYNQ 祭り: Pmod のプログラミング
PYNQ 祭り: Pmod のプログラミング
 
PYNQで○○してみた!
PYNQで○○してみた!PYNQで○○してみた!
PYNQで○○してみた!
 
PYNQ祭り
PYNQ祭りPYNQ祭り
PYNQ祭り
 
Pynqでカメラ画像をリアルタイムfastx コーナー検出
Pynqでカメラ画像をリアルタイムfastx コーナー検出Pynqでカメラ画像をリアルタイムfastx コーナー検出
Pynqでカメラ画像をリアルタイムfastx コーナー検出
 
Pynq祭り資料
Pynq祭り資料Pynq祭り資料
Pynq祭り資料
 
ハイレベルメンバーによる共創実験 / UX & Service Sketch #26
ハイレベルメンバーによる共創実験 / UX & Service Sketch #26ハイレベルメンバーによる共創実験 / UX & Service Sketch #26
ハイレベルメンバーによる共創実験 / UX & Service Sketch #26
 
Namespace API を用いたマルチテナント型 Web アプリの実践
Namespace API を用いたマルチテナント型 Web アプリの実践Namespace API を用いたマルチテナント型 Web アプリの実践
Namespace API を用いたマルチテナント型 Web アプリの実践
 

Similar to JSON Schema in Web Frontend #insideFE

Agile Testing Days 2018 - API Fundamentals - postman collection
Agile Testing Days 2018 - API Fundamentals - postman collectionAgile Testing Days 2018 - API Fundamentals - postman collection
Agile Testing Days 2018 - API Fundamentals - postman collection
JoEllen Carter
 
Abusing text/template for data transformation
Abusing text/template for data transformationAbusing text/template for data transformation
Abusing text/template for data transformation
Arnaud Porterie
 
Intro to Ember.JS 2016
Intro to Ember.JS 2016Intro to Ember.JS 2016
Intro to Ember.JS 2016
Sandino Núñez
 
Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...
Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...
Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...
Markus Lanthaler
 
Elasticsearch for SQL Users
Elasticsearch for SQL UsersElasticsearch for SQL Users
Elasticsearch for SQL Users
All Things Open
 
Let's build a parser!
Let's build a parser!Let's build a parser!
Let's build a parser!
Boy Baukema
 
Advanced Json
Advanced JsonAdvanced Json
Advanced Json
guestfd7d7c
 
Drupal Mobile
Drupal MobileDrupal Mobile
Drupal Mobile
Ruben Teijeiro
 
jQuery Datatables With MongDb
jQuery Datatables With MongDbjQuery Datatables With MongDb
jQuery Datatables With MongDb
sliimohara
 
Ampersandjs
AmpersandjsAmpersandjs
Ampersandjs
Drew Fyock
 
LF_APIStrat17_Embracing JSON Schema
LF_APIStrat17_Embracing JSON SchemaLF_APIStrat17_Embracing JSON Schema
LF_APIStrat17_Embracing JSON Schema
LF_APIStrat
 
AST - the only true tool for building JavaScript
AST - the only true tool for building JavaScriptAST - the only true tool for building JavaScript
AST - the only true tool for building JavaScript
Ingvar Stepanyan
 
Peggy elasticsearch應用
Peggy elasticsearch應用Peggy elasticsearch應用
Peggy elasticsearch應用
LearningTech
 
Semantic Web & TYPO3
Semantic Web & TYPO3Semantic Web & TYPO3
Semantic Web & TYPO3
André Wuttig
 
Winning with Structured Data and Schema.org - OMLIVE 2018
Winning with Structured Data and Schema.org - OMLIVE 2018Winning with Structured Data and Schema.org - OMLIVE 2018
Winning with Structured Data and Schema.org - OMLIVE 2018
Izzi Smith
 
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
Ruby Meditation
 
Introduction to MongoDB for C# developers
Introduction to MongoDB for C# developersIntroduction to MongoDB for C# developers
Introduction to MongoDB for C# developers
Taras Romanyk
 
GraphQL & Relay - 串起前後端世界的橋樑
GraphQL & Relay - 串起前後端世界的橋樑GraphQL & Relay - 串起前後端世界的橋樑
GraphQL & Relay - 串起前後端世界的橋樑
Pokai Chang
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
Alive Kuo
 
d3sparql.js demo at SWAT4LS 2014 in Berlin
d3sparql.js demo at SWAT4LS 2014 in Berlind3sparql.js demo at SWAT4LS 2014 in Berlin
d3sparql.js demo at SWAT4LS 2014 in Berlin
Toshiaki Katayama
 

Similar to JSON Schema in Web Frontend #insideFE (20)

Agile Testing Days 2018 - API Fundamentals - postman collection
Agile Testing Days 2018 - API Fundamentals - postman collectionAgile Testing Days 2018 - API Fundamentals - postman collection
Agile Testing Days 2018 - API Fundamentals - postman collection
 
Abusing text/template for data transformation
Abusing text/template for data transformationAbusing text/template for data transformation
Abusing text/template for data transformation
 
Intro to Ember.JS 2016
Intro to Ember.JS 2016Intro to Ember.JS 2016
Intro to Ember.JS 2016
 
Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...
Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...
Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...
 
Elasticsearch for SQL Users
Elasticsearch for SQL UsersElasticsearch for SQL Users
Elasticsearch for SQL Users
 
Let's build a parser!
Let's build a parser!Let's build a parser!
Let's build a parser!
 
Advanced Json
Advanced JsonAdvanced Json
Advanced Json
 
Drupal Mobile
Drupal MobileDrupal Mobile
Drupal Mobile
 
jQuery Datatables With MongDb
jQuery Datatables With MongDbjQuery Datatables With MongDb
jQuery Datatables With MongDb
 
Ampersandjs
AmpersandjsAmpersandjs
Ampersandjs
 
LF_APIStrat17_Embracing JSON Schema
LF_APIStrat17_Embracing JSON SchemaLF_APIStrat17_Embracing JSON Schema
LF_APIStrat17_Embracing JSON Schema
 
AST - the only true tool for building JavaScript
AST - the only true tool for building JavaScriptAST - the only true tool for building JavaScript
AST - the only true tool for building JavaScript
 
Peggy elasticsearch應用
Peggy elasticsearch應用Peggy elasticsearch應用
Peggy elasticsearch應用
 
Semantic Web & TYPO3
Semantic Web & TYPO3Semantic Web & TYPO3
Semantic Web & TYPO3
 
Winning with Structured Data and Schema.org - OMLIVE 2018
Winning with Structured Data and Schema.org - OMLIVE 2018Winning with Structured Data and Schema.org - OMLIVE 2018
Winning with Structured Data and Schema.org - OMLIVE 2018
 
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
 
Introduction to MongoDB for C# developers
Introduction to MongoDB for C# developersIntroduction to MongoDB for C# developers
Introduction to MongoDB for C# developers
 
GraphQL & Relay - 串起前後端世界的橋樑
GraphQL & Relay - 串起前後端世界的橋樑GraphQL & Relay - 串起前後端世界的橋樑
GraphQL & Relay - 串起前後端世界的橋樑
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
 
d3sparql.js demo at SWAT4LS 2014 in Berlin
d3sparql.js demo at SWAT4LS 2014 in Berlind3sparql.js demo at SWAT4LS 2014 in Berlin
d3sparql.js demo at SWAT4LS 2014 in Berlin
 

Recently uploaded

Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
GDSC PJATK
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
LucaBarbaro3
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
saastr
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
Pravash Chandra Das
 

Recently uploaded (20)

Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
 

JSON Schema in Web Frontend #insideFE

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13. 1 { 2 "name": "pirosikick" 3 "age": 28, 4 "email": "pirosikick@example.com" 5 }
  • 14. 1 { 2 "type": "object", 3 "properties": { 4 "name": { "type": "string" }, 5 "age": { 6 "type": "integer", 7 "minimum": 0 8 }, 9 "email": { 10 "type": "string", 11 "format": "email" 12 } 13 } 14 }
  • 15. 1 { 2 "$schema": "http://json-schema.org/draft-04/schema#", 3 "$id": "http://example.com/schema.json#", 4 "type": "object", 5 "definitions": { 6 "name": { ... }, 7 "age": { ... }, 8 "email": { ... }, 9 }, 10 "properties": { 11 "name": { 12 "$ref": "#/definitions/name" 13 }, 14 "age": { 15 "$ref": "#/definitions/age" 16 }, 17 "email": { 18 "$ref": "#/definitions/email" 19 } 20 } 21 }
  • 16. 1 { 2 "$schema": "http://json-schema.org/draft-04/schema#", 3 "$id": "http://example.com/schema.json#", 4 "type": "object", 5 "definitions": { 6 "name": { ... }, 7 "age": { ... }, 8 "email": { ... }, 9 }, 10 "properties": { 11 "name": { 12 "$ref": "#/definitions/name" 13 }, 14 "age": { 15 "$ref": "#/definitions/age" 16 }, 17 "email": { 18 "$ref": "#/definitions/email" 19 } 20 } 21 }
  • 17. 1 { 2 "$schema": "http://json-schema.org/draft-04/schema#", 3 "$id": "http://example.com/schema.json#", 4 "type": "object", 5 "definitions": { 6 "name": { ... }, 7 "age": { ... }, 8 "email": { ... }, 9 }, 10 "properties": { 11 "name": { 12 "$ref": "#/definitions/name" 13 }, 14 "age": { 15 "$ref": "#/definitions/age" 16 }, 17 "email": { 18 "$ref": "#/definitions/email" 19 } 20 } 21 }
  • 18. 1 { 2 "$schema": "http://json-schema.org/draft-04/schema#", 3 "$id": "http://example.com/schema.json#", 4 "type": "object", 5 "definitions": { 6 "name": { ... }, 7 "age": { ... }, 8 "email": { ... }, 9 }, 10 "properties": { 11 "name": { 12 "$ref": "#/definitions/name" 13 }, 14 "age": { 15 "$ref": "#/definitions/age" 16 }, 17 "email": { 18 "$ref": "#/definitions/email" 19 } 20 } 21 }
  • 19. 1 { 2 "$schema": "http://json-schema.org/draft-04/schema#", 3 "$id": "http://example.com/schema.json#", 4 "type": "object", 5 "definitions": { 6 "name": { ... }, 7 "age": { ... }, 8 "email": { ... }, 9 }, 10 "properties": { 11 "name": { 12 "$ref": "#/definitions/name" 13 }, 14 "age": { 15 "$ref": "#/definitions/age" 16 }, 17 "email": { 18 "$ref": "#/definitions/email" 19 } 20 } 21 }
  • 20.
  • 21.
  • 22. 1 { 2 "$schema": "http://json-schema.org/draft-04/hyper-schema", 3 "type": "object", 4 "definitions": { ... }, 5 "properties": { ... }, 6 "links": [{ 7 "title": "ユーザ取得", 8 "description": "idに紐づくユーザを返す", 9 "href": "/user/:id", 10 "method": "GET", 11 "rel": "self" 12 }, { 13 "title": "ユーザ新規登録", 14 "description": "idに紐づくユーザを返す", 15 "href": "/user", 16 "method": "POST", 17 "rel": "create", 18 "schema": { 19 "type": "object", 20 "properties": { ... } 21 } 22 }] 23 }
  • 23. 1 { 2 "$schema": "http://json-schema.org/draft-04/hyper-schema", 3 "type": "object", 4 "definitions": { ... }, 5 "properties": { ... }, 6 "links": [{ 7 "title": "ユーザ取得", 8 "description": "idに紐づくユーザを返す", 9 "href": "/user/:id", 10 "method": "GET", 11 "rel": "self" 12 }, { 13 "title": "ユーザ新規登録", 14 "description": "idに紐づくユーザを返す", 15 "href": "/user", 16 "method": "POST", 17 "rel": "create", 18 "schema": { 19 "type": "object", 20 "properties": { ... } 21 } 22 }] 23 }
  • 24. 1 { 2 "$schema": "http://json-schema.org/draft-04/hyper-schema", 3 "type": "object", 4 "definitions": { ... }, 5 "properties": { ... }, 6 "links": [{ 7 "title": "ユーザ取得", 8 "description": "idに紐づくユーザを返す", 9 "href": "/user/:id", 10 "method": "GET", 11 "rel": "self" 12 }, { 13 "title": "ユーザ新規登録", 14 "description": "idに紐づくユーザを返す", 15 "href": "/user", 16 "method": "POST", 17 "rel": "create", 18 "schema": { 19 "type": "object", 20 "properties": { ... } 21 } 22 }] 23 }
  • 25.
  • 26.
  • 27. 1 #!/bin/bash 2 # vim: set background=light nolist nonumber: 3 4 # 雛形を生成 5 # - schemata以下にリソース毎にファイルを生成 6 # - JSONとYAMLで書くことが出来る(--yamlでYAML) 7 prmd init --yaml user > schemata/user.yaml 8 9 # JSON Hyper-Schema(schema.json)の生成 10 # - ./schemata/*.{yaml,json}とmeta.jsonを結合して生成する 11 prmd combine -m meta.json ./schemata > schema.json 12 13 # Markdownの生成 14 # - prmd combineで生成したschema.jsonからREADME.mdを生成 15 # - OVERVIEW.mdを出力ファイルの先頭に挿入 16 prmd doc --prepend OVERVIEW.md schema.json > README.md
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41. 1 const schema = { 2 "type": "object", 3 "properties": { 4 "name": { 5 "title": "名前", 6 "type": "string" 7 }, 8 "email": { 9 "title": "メールアドレス", 10 "type": "string", 11 "format": "email" 12 } 13 } 14 };
  • 42. 1 import React from 'react'; 2 import { render } from 'react-dom'; 3 import Form from 'react-jsonschema-form'; 4 5 const schema = { ... }; 6 7 render( 8 <Form 9 schema={schema} 10 onChange={({ formData }) => { ... }} 11 onSubmit={({ formData }) => { ... }} 12 />, 13 document.getElementById('wrapper') 14 );
  • 43.
  • 44. 1 const uiSchema = { 2 "name": { 3 "classNames": "from__name", // カスタムクラス名 4 "ui:placeholder": "全角で頼む" // プレースホルダー 5 }, 6 "email": { 7 "classNames": "from__email", 8 "ui:placeholder": "you@example.com" 9 } 10 }; 11 12 render( 13 <Form 14 schema={schema} 15 uiSchema={uiSchema} 16 onChange={({ formData }) => { ... }} 17 onSubmit={({ formData }) => { ... }} 18 />, 19 document.getElementById('wrapper') 20 );
  • 45.
  • 46.
  • 47. 1 const uiSchema = { 2 "name": { 3 // カスタムフィールド 4 "ui:field": CustomeField, 5 }, 6 "email" :{ 7 // カスタムウィジェット 8 "ui:widget": CustomeWidget, 9 } 10 };
  • 49.
  • 50.