Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename and publish context schema files #170

Merged
merged 4 commits into from
Feb 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ script:
- git config --global user.name "${GH_NAME}"
- git config --global user.email "${GH_EMAIL}"
- echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc
- cd website && yarn install && yarn run redoc-appd && GIT_USER="${GH_NAME}" yarn run publish-gh-pages
- cd website && yarn install && GIT_USER="${GH_NAME}" yarn run publish-gh-pages
35 changes: 24 additions & 11 deletions docs/context/ref/Contact.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,44 @@ https://fdc3.finos.org/schemas/next/contact.schema.json

## Details

| Property | Type | Required | Value |
|------------|---------|----------|-------------------|
| `type` | string | Yes | `'fdc3.contact'` |
| `name` | string | No | `'Jane Doe'` |
| `id.email` | string | Yes | `'jane@mail.com'` |
| Property | Type | Required | Value |
|-------------|---------|----------|-------------------|
| `type` | string | Yes | `'fdc3.contact'` |
| `name` | string | No | `'Jane Doe'` |
| `id.email` | string | No | `'jane@mail.com'` |
| `id.FDS_ID` | string | No | `'ABC123-E'` |

## Example

{
"type": "fdc3.contact",
"name": "Jane Doe",
"id":{
"email": "john.smith@company.com",
}
}

```js
const contact = {
type: 'fdc3.contact',
type: 'fdc3.contact'
name: 'Jane Doe',
id: {
email: 'nick@gmail.com'
},
name: 'Nick Kolba'
email: 'jane@mail.com'
}
}


fdc3.broadcast(contact)
```

## See Also

Context
Other Types
- [ContactList](ContactList)

Intents
- [StartChat](../../intents/ref/StartChat)
- [StartCall](../../intents/ref/StartCall)
- [StartCall](../../intents/ref/StartCall)

FINOS Financial Objects
- [Contact](https://fo.finos.org/docs/objects/contact)
4 changes: 3 additions & 1 deletion docs/context/ref/Instrument.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ sidebar_label: Instrument
title: Instrument
hide_title: true
---
# `Instrument`
# `Instrument`

_TO BE COMPLETED_
16 changes: 8 additions & 8 deletions docs/context/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,34 +86,34 @@ The following are standard FDC3 context types.
- __fdc3.contact__
- A person contact that can be engaged with through email, calling, messaging, CMS, etc.
- [Financial Objects Specification](https://fo.finos.org/docs/objects/contact)
- [schema](https://github.com/finos/FDC3/blob/master/src/context/schemas/contact.schema)
- [schema](/schemas/next/contact.schema.json)
- __fd3.contactList__
- A collection of contacts.
- [Financial Objects Specification](https://fo.finos.org/docs/objects/contactlist)
- [schema](https://github.com/finos/FDC3/blob/master/src/context/schemas/contactList.schema)
- [schema](/schemas/next/contactList.schema.json)
- __fdc3.country__
- A standard country entity.
- [Financial Objects Specification](https://fo.finos.org/docs/objects/country)
- [schema](https://github.com/finos/FDC3/blob/master/src/context/schemas/country.schema)
- [schema](/schemas/next/country.schema.json)
- __fdc3.instrument__
- A financial instrument from any asset class.
- [Financial Objects Specification](https://fo.finos.org/docs/objects/instrument)
- [schema](https://github.com/finos/FDC3/blob/master/src/context/schemas/instrument.schema)
- [schema](/schemas/next/instrument.schema.json)
- __fdc3.instrumentList__
- A collection of instruments.
- [Financial Objects Specification](https://fo.finos.org/docs/objects/instrumentList)
- [schema](https://github.com/finos/FDC3/blob/master/src/context/schemas/instrumentList.schema)
- [schema](/schemas/next/instrumentList.schema.json)
- __fdd3.organization__
- A standard organization entity.
- [Financial Objects Specification](https://fo.finos.org/docs/objects/organization)
- [schema](https://github.com/finos/FDC3/blob/master/src/context/schemas/organization.schema)
- [schema](/schemas/next/organization.schema.json)
- __fdc3.portfolio__
- A collection of positions.
- [Financial Objects Specification](https://fo.finos.org/docs/objects/portfolio)
- [schema](https://github.com/finos/FDC3/blob/master/src/context/schemas/portfolio.schema)
- [schema](/schemas/next/portfolio.schema.json)
- __fdc3.position__
- [Financial Objects Specification](https://fo.finos.org/docs/objects/position)
- [schema](https://github.com/finos/FDC3/blob/master/src/context/schemas/position.schema)
- [schema](/schemas/next/position.schema.json)

__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.

Expand Down
6 changes: 3 additions & 3 deletions docs/intents/ref/StartChat.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ Initiate a chat with a contact or list of contacts.
```js
const contact = {
type: 'fdc3.contact',
name: 'Jane Doe',
id: {
email: 'nick@gmail.com'
},
name: 'Nick Kolba'
email: 'jane@mail.com'
}
}

fdc3.raiseIntent('StartChat', contact)
Expand Down
13 changes: 0 additions & 13 deletions examples/context/Contact.ts

This file was deleted.

9 changes: 0 additions & 9 deletions examples/context/ContactList.ts

This file was deleted.

13 changes: 0 additions & 13 deletions examples/context/Country.ts

This file was deleted.

19 changes: 0 additions & 19 deletions examples/context/Instrument.ts

This file was deleted.

9 changes: 0 additions & 9 deletions examples/context/InstrumentList.ts

This file was deleted.

13 changes: 0 additions & 13 deletions examples/context/Organization.ts

This file was deleted.

12 changes: 0 additions & 12 deletions examples/context/Portfolio.ts

This file was deleted.

10 changes: 0 additions & 10 deletions examples/context/Position.ts

This file was deleted.

17 changes: 17 additions & 0 deletions src/context/schemas/contact.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://fdc3.finos.org/schemas/next/contact.schema.json",
"type": "object",
"allOf": [{ "$ref": "context.schema.json#/" }],
"properties": {
"type": { "const": "fdc3.contact" },
"id": {
"type": "object",
"properties": {
"email": { "type": "string" },
"FDS_ID": { "type": "string" }
rikoe marked this conversation as resolved.
Show resolved Hide resolved
}
}
},
"required": ["id"]
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://fdc3.finos.org/schemas/1.0/contactList.schema",
"$id": "https://fdc3.finos.org/schemas/next/contactList.schema.json",
"type": "object",
"allOf": [{ "$ref": "context.schema#/" }],
"allOf": [{ "$ref": "context.schema.json#/" }],
"properties": {
"type": { "enum": ["fdc3.contactList"] },
"type": { "const": "fdc3.contactList" },
"contacts": {
"type": "array",
"items": { "$ref": "contact.schema#/" }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://fdc3.finos.org/schemas/1.0/context.schema",
"$id": "https://fdc3.finos.org/schemas/next/context.schema.json",
"type": "object",
"properties": {
"type": { "type": "string" },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://fdc3.finos.org/schemas/1.0/country.schema",
"$id": "https://fdc3.finos.org/schemas/next/country.schema.json",
"type": "object",
"allOf": [{ "$ref": "context.schema#/" }],
"properties": {
"type": { "enum": ["fdc3.country"] },
"type": { "const": "fdc3.country" },
"id": {
"type": "object",
"properties": {
Expand All @@ -13,5 +13,5 @@
}
}
},
"required": ["id", "name"]
"required": ["id"]
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://fdc3.finos.org/schemas/1.0/instrument.schema",
"$id": "https://fdc3.finos.org/schemas/next/instrument.schema",
"type": "object",
"allOf": [{ "$ref": "context.schema#/" }],
"properties": {
"type": { "enum": ["fdc3.instrument"] },
"type": { "const": "fdc3.instrument" },
"id": {
"type": "object",
"properties": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://fdc3.finos.org/schemas/1.0/instrumentList.schema",
"$id": "https://fdc3.finos.org/schemas/next/instrumentList.schema",
"type": "object",
"allOf": [{ "$ref": "context.schema#/" }],
"properties": {
"type": { "enum": ["fdc3.instrumentList"] },
"type": { "const": "fdc3.instrumentList" },
"instruments": {
"type": "array",
"items": { "$ref": "instrument.schema#/" }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://fdc3.finos.org/schemas/1.0/organization.schema",
"$id": "https://fdc3.finos.org/schemas/next/organization.schema",
"type": "object",
"allOf": [{ "$ref": "context.schema#/" }],
"properties": {
"type": { "enum": ["fdc3.organization"] },
"type": { "const": "fdc3.organization" },
"id": {
"type": "object",
"properties": {
"LEI": { "type": "string" },
"PERMID": { "type": "string" },
"FDSID": { "type": "string" }
"FDS_ID": { "type": "string" }
rikoe marked this conversation as resolved.
Show resolved Hide resolved
}
}
},
"required": ["id","name"]
"required": ["id"]
rikoe marked this conversation as resolved.
Show resolved Hide resolved
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://fdc3.finos.org/schemas/1.0/portfolio.schema",
"$id": "https://fdc3.finos.org/schemas/next/portfolio.schema",
"type": "object",
"allOf": [{ "$ref": "context.schema#/" }],
"properties": {
"type": { "enum": ["fdc3.portfolio"] },
"type": { "const": "fdc3.portfolio" },
"positions": {
"type": "array",
"items": { "$ref": "position.schema#/" }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://fdc3.finos.org/schemas/1.0/position.schema",
"$id": "https://fdc3.finos.org/schemas/next/position.schema",
"type": "object",
"allOf": [{ "$ref": "context.schema#/" }],
"properties": {
"type": { "enum": ["fdc3.position"] },
"type": { "const": "fdc3.position" },
"instrument": { "$ref": "instrument.schema#/" },
"holding": { "type": "number", "minimum": 0 }
},
"required": ["instrument", "holding"]
"required": ["instrument","holding"]
}
Loading