Skip to content

Commit 6006d0c

Browse files
committed
#128 - copy schemas as static website files as part of build
- Copy to schemas/next folder with npm command - Make part of website pre-publish script during build - Update links in context schema spec to point to published schemas
1 parent 1c777e7 commit 6006d0c

13 files changed

+196
-13
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ script:
1111
- git config --global user.name "${GH_NAME}"
1212
- git config --global user.email "${GH_EMAIL}"
1313
- echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc
14-
- cd website && yarn install && yarn run redoc-appd && GIT_USER="${GH_NAME}" yarn run publish-gh-pages
14+
- cd website && yarn install && GIT_USER="${GH_NAME}" yarn run publish-gh-pages

docs/context-spec.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,34 +86,34 @@ The following are standard FDC3 context types.
8686
- __fdc3.contact__
8787
- A person contact that can be engaged with through email, calling, messaging, CMS, etc. As opposed to a person entity that relates to news, financial data, etc.
8888
- [Financial Objects Specification](https://fo.finos.org/docs/objects/contact)
89-
- [schema](https://github.com/finos/FDC3/blob/master/src/context/schemas/contact.schema)
89+
- [schema](/schemas/next/contact.schema.json)
9090
- __fd3.contactList__
9191
- A collection of contacts.
9292
- [Financial Objects Specification](https://fo.finos.org/docs/objects/contactlist)
93-
- [schema](https://github.com/finos/FDC3/blob/master/src/context/schemas/contactList.schema)
93+
- [schema](/schemas/next/contactList.schema.json)
9494
- __fdc3.country__
9595
- A standard country entity.
9696
- [Financial Objects Specification](https://fo.finos.org/docs/objects/country)
97-
- [schema](https://github.com/finos/FDC3/blob/master/src/context/schemas/country.schema)
97+
- [schema](/schemas/next/country.schema.json)
9898
- __fdc3.instrument__
9999
- A financial instrument from any asset class.
100100
- [Financial Objects Specification](https://fo.finos.org/docs/objects/instrument)
101-
- [schema](https://github.com/finos/FDC3/blob/master/src/context/schemas/instrument.schema)
101+
- [schema](/schemas/next/instrument.schema.json)
102102
- __fdc3.instrumentList__
103103
- A collection of instruments.
104104
- [Financial Objects Specification](https://fo.finos.org/docs/objects/instrumentList)
105-
- [schema](https://github.com/finos/FDC3/blob/master/src/context/schemas/instrumentList.schema)
105+
- [schema](/schemas/next/instrumentList.schema.json)
106106
- __fdd3.organization__
107107
- A standard organization entity.
108108
- [Financial Objects Specification](https://fo.finos.org/docs/objects/organization)
109-
- [schema](https://github.com/finos/FDC3/blob/master/src/context/schemas/organization.schema)
109+
- [schema](/schemas/next/organization.schema.json)
110110
- __fdc3.portfolio__
111111
- A collection of positions.
112112
- [Financial Objects Specification](https://fo.finos.org/docs/objects/portfolio)
113-
- [schema](https://github.com/finos/FDC3/blob/master/src/context/schemas/portfolio.schema)
113+
- [schema](/schemas/next/portfolio.schema.json)
114114
- __fdc3.position__
115115
- [Financial Objects Specification](https://fo.finos.org/docs/objects/position)
116-
- [schema](https://github.com/finos/FDC3/blob/master/src/context/schemas/position.schema)
116+
- [schema](/schemas/next/position.schema.json)
117117

118118
__Note:__ The below examples show how the base context data interface can be used to define specific context data objects. It is not the purpose of the specification at this stage to define standard representations for objects. It establishes the framework in which such definitions could be created.
119119

website/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22
"scripts": {
33
"examples": "docusaurus-examples",
44
"start": "docusaurus-start",
5+
"prebuild": "yarn run redoc-appd && yarn run copy-schemas",
56
"build": "docusaurus-build",
7+
"prepublish-gh-pages": "yarn run redoc-appd && yarn run copy-schemas",
68
"publish-gh-pages": "docusaurus-publish",
79
"write-translations": "docusaurus-write-translations",
810
"version": "docusaurus-version",
911
"rename-version": "docusaurus-rename-version",
10-
"redoc-appd": "redoc-cli bundle --output pages/appd-spec.html ../src/app-directory/specification/appd.yaml"
12+
"redoc-appd": "redoc-cli bundle --output pages/appd-spec.html ../src/app-directory/specification/appd.yaml",
13+
"copy-schemas": "copyfiles -f ../src/context/schemas/*.schema.json static/schemas/next"
1114
},
1215
"devDependencies": {
16+
"copyfiles": "2.2.0",
1317
"docusaurus": "1.12.0",
1418
"redoc-cli": "0.8.5"
1519
},
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://fdc3.finos.org/schemas/next/contact.schema.json",
4+
"type": "object",
5+
"allOf": [{ "$ref": "context.schema.json#/" }],
6+
"properties": {
7+
"type": { "const": "fdc3.contact" },
8+
"id": {
9+
"type": "object",
10+
"properties": {
11+
"email": { "type": "string" },
12+
"FDS_ID": { "type": "string" }
13+
}
14+
}
15+
},
16+
"required": ["id"]
17+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://fdc3.finos.org/schemas/next/contactList.schema.json",
4+
"type": "object",
5+
"allOf": [{ "$ref": "context.schema.json#/" }],
6+
"properties": {
7+
"type": { "const": "fdc3.contactList" },
8+
"contacts": {
9+
"type": "array",
10+
"items": { "$ref": "contact.schema#/" }
11+
}
12+
},
13+
"required": ["contacts"]
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://fdc3.finos.org/schemas/next/context.schema.json",
4+
"type": "object",
5+
"properties": {
6+
"type": { "type": "string" },
7+
"name": { "type": "string" },
8+
"id": {
9+
"type": "object",
10+
"additionalProperties": { "type": "string" }
11+
}
12+
},
13+
"required": ["type"]
14+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://fdc3.finos.org/schemas/next/country.schema.json",
4+
"type": "object",
5+
"allOf": [{ "$ref": "context.schema#/" }],
6+
"properties": {
7+
"type": { "const": "fdc3.country" },
8+
"id": {
9+
"type": "object",
10+
"properties": {
11+
"ISOALPHA2": { "type": "string" },
12+
"ISOALPHA3": { "type": "string" }
13+
}
14+
}
15+
},
16+
"required": ["id"]
17+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://fdc3.finos.org/schemas/next/instrument.schema",
4+
"type": "object",
5+
"allOf": [{ "$ref": "context.schema#/" }],
6+
"properties": {
7+
"type": { "const": "fdc3.instrument" },
8+
"id": {
9+
"type": "object",
10+
"properties": {
11+
"BBG": { "type": "string" },
12+
"CUSIP": { "type": "string" },
13+
"FDS_ID": { "type": "string" },
14+
"FIGI": { "type": "string" },
15+
"ISIN": { "type": "string" },
16+
"PERMID": { "type": "string" },
17+
"RIC": { "type": "string" },
18+
"SEDOL": { "type": "string" },
19+
"ticker": { "type": "string" }
20+
}
21+
}
22+
},
23+
"required": ["id"]
24+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://fdc3.finos.org/schemas/next/instrumentList.schema",
4+
"type": "object",
5+
"allOf": [{ "$ref": "context.schema#/" }],
6+
"properties": {
7+
"type": { "const": "fdc3.instrumentList" },
8+
"instruments": {
9+
"type": "array",
10+
"items": { "$ref": "instrument.schema#/" }
11+
}
12+
},
13+
"required": ["instruments"]
14+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://fdc3.finos.org/schemas/next/organization.schema",
4+
"type": "object",
5+
"allOf": [{ "$ref": "context.schema#/" }],
6+
"properties": {
7+
"type": { "const": "fdc3.organization" },
8+
"id": {
9+
"type": "object",
10+
"properties": {
11+
"LEI": { "type": "string" },
12+
"PERMID": { "type": "string" },
13+
"FDS_ID": { "type": "string" }
14+
}
15+
}
16+
},
17+
"required": ["id"]
18+
}

0 commit comments

Comments
 (0)