Skip to content

Commit 1b8bf83

Browse files
committed
updated json-schema and readme file
1 parent cdb0625 commit 1b8bf83

10 files changed

+574
-870
lines changed

Diff for: .gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ yarn-error.log*
1212
.idea/
1313

1414
node_modules/
15-
dist/
15+
dist/
16+
index.js

Diff for: .travis.yml

+14-28
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,15 @@
1-
dist: xenial
2-
sudo: false
3-
group: beta
1+
os: linux
2+
dist: bionic
43
language: node_js
5-
cache:
6-
directories:
7-
- "$HOME/.npm"
8-
install: case $TRAVIS_BRANCH in greenkeeper*) npm i;; *) npm ci;; esac;
9-
jobs:
10-
include:
11-
- stage: build
12-
if: tag IS blank
13-
script: npm run build
14-
- stage: NPM release
15-
script: echo 'Deploying to NPM...'
16-
if: tag IS present
17-
before_deploy: npm run build
18-
deploy:
19-
provider: npm
20-
21-
skip_cleanup: true
22-
api_key: "$NPM_TOKEN"
23-
on:
24-
repo: windingtree/wt-organization-schemas
25-
branch: master
26-
tags: true
27-
env:
28-
global:
29-
secure: RSp//wdTV7+0r3vEg5X/ui6yYaDNVByXqPQpMqapegydlB5/lU6kW4uOzo7tMrYDbDGklJXMMtBySH+o0PBYfLkfY1XEoTZCxenUhQTBd5hIMEWxxlMt57EYSqTfQRiay/a3FuwKhEeSdYvqqCsWaPMP4TAOWNAiEjvNWTKIi4ndL7kzwqGbk+1riGhKQCeGE3TdnC5RivX673MJGLYhQvjz4OmqPiPFadjSEqKBH60BKFP8olfodpHFvGc30XEUcPVQ+YRLudQ60w1vOIaXQ+vmF84rvmJuocJX51Li7qpr6/shuIPhbnM3JY90ltnTZS/nyzr6zNgTYUAsHF3RqzoBmjaUu5oVG6XL3ufted/iF6RupzUJNgZmPoRoPPjYO3gxNaFL6ydMFBgCuw6Vpfk0WhVkNFvKVQTeBH5UMA/D9IcsHIaRY/od3TtpWgSZLHbfd9DYqvhtMElqfbbDhYGQcqwFvqrmbeYYz8676ffMg9Gkyk40XBZhMjHb7nTeJzjuow0UDPRxG246I839BgzwZC96ZNTomf576rjGoD3UwLH8rhNaFiH/JNvdcOXV+G7mqB/ug8597ouIEBe5WJWTblqvN1rNViojnlCBerzsMBQy4wMas8M3YsdqfpV1VhXf404Dp7za7WstSPSmTnd2TiwRWMhOTP/lx0ayI/o=
4+
node_js:
5+
- 10
6+
7+
before_deploy: npm run build
8+
9+
deploy:
10+
edge: true
11+
provider: npm
12+
cleanup: false
13+
on:
14+
repo: windingtree/org.json-schema
15+
tags: true

Diff for: LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Winding Tree
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Diff for: README.md

+28-14
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
11
# org.json-schema
2-
Model schema definitions used for ORG.JSON part of ORG.ID of the
3-
[Winding Tree platform](https://windingtree.com/).
2+
Model schema definitions and vocabulary used for ORG.JSON part of ORG.ID of the
3+
[Winding Tree protocol](https://windingtree.com/).
44

5-
This data structure called **ORG.JSON** is part of the `ORG.ID` specification and JSON files
6-
conforming to this layout should be linked from the **0xORG** smart contract.
5+
This data structure called **ORG.JSON** is part of the `ORG.ID` specification and JSON files conforming to this layout should be linked from the **0xORG** smart contract.
76

87
For more information visit our [developer portal](https://developers.windingtree.com/).
98

9+
## NPM package
10+
11+
ORG.ID JSON schema can be installed as npm package:
12+
13+
```bash
14+
npm i @windingtree/org.json-schema
15+
```
16+
17+
and used in the JS application as:
18+
19+
20+
```javascript
21+
const orgidSchema = require('@windingtree/org.json-schema');
22+
```
23+
1024
## The ORG.ID Vocabulary
1125

1226
Complete list of the ORG.ID JSON definitions are can be found in the [vocabulary](./vocabulary.md) file. Please use this vocabulary as a documentation for the ORG.ID JSON builders and validators.
@@ -17,7 +31,7 @@ Complete list of the ORG.ID JSON definitions are can be found in the [vocabulary
1731
npm run build
1832
```
1933

20-
A consistent version of the OpenAPI compiled specification file (`swagger.yaml`) will be saved in the `./dist` directory just after building process finish.
34+
A consistent version of the json-schema compiled specification file (`./src/orgid-json-schema.yaml`) will be saved in the `./dist` directory just after building process finish.
2135

2236
## Example of the valid json file
2337

@@ -58,9 +72,9 @@ A consistent version of the OpenAPI compiled specification file (`swagger.yaml`)
5872
"trust": {
5973
"assertions": [
6074
{
61-
"type": "domain",
75+
"type": "dns",
6276
"claim": "test.com",
63-
"proof": "dns"
77+
"proof": "TXT"
6478
},
6579
{
6680
"type": "domain",
@@ -73,9 +87,9 @@ A consistent version of the OpenAPI compiled specification file (`swagger.yaml`)
7387
"proof": "http://test3.com/orgid.txt"
7488
},
7589
{
76-
"type": "twitter",
77-
"claim": "jack",
78-
"proof": "https://twitter.com/status/123456789/"
90+
"type": "post",
91+
"claim": "twitter.com/jack",
92+
"proof": "https://twitter.com/jack/status/123456789/"
7993
}
8094
],
8195
"credentials": [
@@ -89,12 +103,12 @@ A consistent version of the OpenAPI compiled specification file (`swagger.yaml`)
89103
"VerifiableCredential",
90104
"FranchiseCredential"
91105
],
92-
"issuanceDate": "2010-01-01T19:73:24Z",
106+
"issuanceDate": "2010-01-01T19:53:24Z",
93107
"credentialSubject": {
94108
"id": "did:orgid:0xB4Caa470E33A4cE899C16e6C7E125eA03956e95D",
95109
"franchiseLicense": {
96110
"brand": "Hilton Garden Inn",
97-
"validUntil": "2020-01-01T19:73:24Z"
111+
"validUntil": "2020-01-01T19:53:24Z"
98112
}
99113
},
100114
"proof": {
@@ -138,8 +152,8 @@ A consistent version of the OpenAPI compiled specification file (`swagger.yaml`)
138152
"country": "CZ",
139153
"subdivision": "71",
140154
"locality": "Jihlava",
141-
"postal_code": "71354",
142-
"street_address": "3150 Main St.",
155+
"postalCode": "71354",
156+
"streetAddress": "3150 Main St.",
143157
"premise": "STE 100",
144158
"gps": "50.087070,14.417210",
145159
"geocodes": [

Diff for: build.js

-32
This file was deleted.

Diff for: package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
{
2-
"name": "@windingtree/wt-organization-schemas",
2+
"name": "@windingtree/org.json-schema",
33
"version": "0.3.0",
4-
"description": "Organization data schemas for WT platform",
5-
"main": "dist/swagger.yaml",
4+
"description": "ORG.ID JSON schema for WT protocol",
5+
"main": "dist/orgid.json",
66
"scripts": {
7-
"build": "npm run clean && ./build.js",
8-
"clean": "rimraf dist"
7+
"build": "npm run clean && mkdir -p dist && npx js-yaml ./src/orgid-json-schema.yaml > ./dist/orgid.json",
8+
"clean": "rm -rf dist/*"
99
},
1010
"repository": {
1111
"type": "git",
12-
"url": "git+https://github.com/windingtree/wt-organization-schemas.git"
12+
"url": "git+https://github.com/windingtree/org.json-schema.git"
1313
},
1414
"author": "Winding Tree Developers <[email protected]>",
15-
"license": "Apache-2.0",
15+
"license": "MIT",
1616
"bugs": {
17-
"url": "https://github.com/windingtree/wt-organization-schemas/issues"
17+
"url": "https://github.com/windingtree/org.json-schema/issues"
1818
},
19-
"homepage": "https://github.com/windingtree/wt-organization-schemas#readme",
19+
"homepage": "https://github.com/windingtree/org.json-schema#readme",
2020
"devDependencies": {
21-
"rimraf": "3.0.1",
2221
"js-yaml": "3.13.1"
2322
},
2423
"publishConfig": {

Diff for: context.json renamed to src/context.json

File renamed without changes.

0 commit comments

Comments
 (0)