Skip to content

Commit

Permalink
finos#128 - rename schema files and delete old examples
Browse files Browse the repository at this point in the history
- Change schema file extensions
- Change schema $id property to use correct target URI (without version, but "next" instead)
- Change "enum" for "type" to be "const", which is the more correct JSON schema usage
- Some changes to some types to bring in line with FinObj types
  • Loading branch information
rikoe committed Feb 9, 2020
1 parent b61271c commit 1c777e7
Show file tree
Hide file tree
Showing 17 changed files with 24 additions and 123 deletions.
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.

Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://fdc3.finos.org/schemas/1.0/contact.schema",
"$id": "https://fdc3.finos.org/schemas/next/contact.schema.json",
"type": "object",
"allOf": [{ "$ref": "context.schema#/" }],
"allOf": [{ "$ref": "context.schema.json#/" }],
"properties": {
"type": { "enum": ["fdc3.contact"] },
"type": { "const": "fdc3.contact" },
"id": {
"type": "object",
"properties": {
"email": { "type": "string" },
"twitter": { "type": "string" },
"phone": { "type": "string" }
"FDS_ID": { "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/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" }
}
}
},
"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/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"]
}

0 comments on commit 1c777e7

Please sign in to comment.