Skip to content

Commit

Permalink
Add json schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
cmutel committed Jul 25, 2024
1 parent 5fb1d40 commit fa6e0b6
Show file tree
Hide file tree
Showing 7 changed files with 2,739 additions and 0 deletions.
353 changes: 353 additions & 0 deletions bw_interface_schemas/json_schema/edge.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,353 @@
{
"$defs": {
"DataSource": {
"additionalProperties": true,
"description": "A data source, such as a publication or field measurement.\n\nVery preliminary.",
"properties": {
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
},
"year": {
"title": "Year",
"type": "integer"
},
"title": {
"title": "Title",
"type": "string"
},
"doi": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Doi"
}
},
"required": [
"authors",
"year",
"title"
],
"title": "DataSource",
"type": "object"
},
"Edge": {
"additionalProperties": true,
"description": "An quantitative edge linking two nodes in the graph.",
"properties": {
"amount": {
"title": "Amount",
"type": "number"
},
"uncertainty_type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Uncertainty Type"
},
"loc": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Loc"
},
"scale": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Scale"
},
"shape": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Shape"
},
"minimum": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Minimum"
},
"maximum": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Maximum"
},
"negative": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Negative"
},
"type": {
"title": "Type",
"type": "string"
},
"source": {
"$ref": "#/$defs/Node"
},
"target": {
"$ref": "#/$defs/Node"
},
"properties": {
"type": "object",
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
}
]
},
"title": "Properties"
},
"tags": {
"anyOf": [
{
"additionalProperties": {
"$ref": "#/$defs/JsonValue"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Tags"
}
},
"required": [
"amount",
"type",
"source",
"target",
"properties"
],
"title": "Edge",
"type": "object"
},
"JsonValue": {},
"Node": {
"additionalProperties": true,
"properties": {
"code": {
"title": "Code",
"type": "string"
},
"database": {
"title": "Database",
"type": "string"
},
"created": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created"
},
"modified": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Modified"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"unit": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Unit"
},
"location": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Location"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Type"
},
"comment": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Comment"
},
"filename": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Filename"
},
"references": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/DataSource"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "References"
},
"tags": {
"anyOf": [
{
"additionalProperties": {
"$ref": "#/$defs/JsonValue"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Tags"
},
"exchanges": {
"default": [],
"items": {
"$ref": "#/$defs/Edge"
},
"title": "Exchanges",
"type": "array"
}
},
"required": [
"code",
"database"
],
"title": "Node",
"type": "object"
}
},
"allOf": [
{
"$ref": "#/$defs/Edge"
}
]
}
Loading

0 comments on commit fa6e0b6

Please sign in to comment.