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

Information Model example #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
87 changes: 87 additions & 0 deletions information-model/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# EoX Information Model

An information model (IM) is a formal definition of structured data at a higher level of abstraction
than a concrete schema. It is intended to be easy to work with and understand, and to serve as the
*single source of truth* for documentation in multiple formats, concrete schemas in multiple formats,
message generation and validation in multiple data formats, and code generation for multiple
programming languages.

This is an information model for two proposed EoX schema files (core.json, shell.json) written in
the JSON Abstract Data Notation (JADN) language. It can be written as either JSON data
or as a textual Information Definition Language, and can be converted back and forth between those formats.
It can also be used to generate property tables in HTML or Markdown format and to ERDs in GraphVis or PlantUML format
for use in specification documents:

**Fig. 1**: shell.jidl
```
Shell = Record
1 schema Schema_shell
2 statements Statement [1..*] // Contains a list of statement elements.

Schema_shell = Enumerated // Specifies the schema the JSON object must be valid against.
1 https://docs.oasis-open.org/openeox/tbd/schema/shell.json

Statement = Record // Statements contain the single OpenEoX entries.
1 core c:Core
2 productName ProductName_t
3 productVersion ProductVersion_t
4 supplierName SupplierName_t
```

**Fig. 2**: shell.jadn
```json
["Shell", "Record", [], "", [
[1, "schema", "Schema_shell", [], ""],
[2, "statements", "Statement", ["]0"], "Contains a list of statement elements."]
]],

["Schema_shell", "Enumerated", [], "Specifies the schema the JSON object must be valid against.", [
[1, "https://docs.oasis-open.org/openeox/tbd/schema/shell.json", ""]
]],

["Statement", "Record", [], "Statements contain the single OpenEoX entries.", [
[1, "core", "c:Core", [], ""],
[2, "productName", "ProductName_t", [], ""],
[3, "productVersion", "ProductVersion_t", [], ""],
[4, "supplierName", "SupplierName_t", [], ""]
]],
```

**Fig. 3**: shell.md

**********
**Type: Shell (Record)**

| ID | Name | Type | \# | Description |
|----|----------------|--------------|-------|----------------------------------------|
| 1 | **schema** | Schema_shell | 1 | |
| 2 | **statements** | Statement | 1..\* | Contains a list of statement elements. |

**********

Specifies the schema the JSON object must be valid against.

**Type: Schema_shell (Enumerated)**

| ID | Item | Description |
|----|---------------------------------------------------------------|-------------|
| 1 | **https://docs.oasis-open.org/openeox/tbd/schema/shell.json** | |

**********

Statements contain the single OpenEoX entries.

**Type: Statement (Record)**

| ID | Name | Type | \# | Description |
|----|--------------------|------------------|----|-------------|
| 1 | **core** | c:Core | 1 | |
| 2 | **productName** | ProductName_t | 1 | |
| 3 | **productVersion** | ProductVersion_t | 1 | |
| 4 | **supplierName** | SupplierName_t | 1 | |

**********

**Fig. 4**: EoX entity relationship diagram

![EoX entity relationship diagram](generated/eox.graphviz.png)
44 changes: 44 additions & 0 deletions information-model/core.jadn
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"info": {
"package": "https://docs.oasis-open.org/openeox/tbd/schema/core",
"title": "EOL and EOS Information",
"description": "A draft schema for representing End-of-Life (EOL) and End-of-Support (EOS) information in OpenEoX.",
"exports": ["Core"],
"config": {
"$TypeName": "^[$A-Z][-_$A-Za-z0-9]{0,63}$"
}
},

"types": [
["Core", "Record", [], "", [
[1, "schema", "Schema_core", [], ""],
[2, "last_updated", "Timestamp", [], "Timestamp of last change"],
[3, "status", "Status", ["]0"], "Contains a list of status elements."]
]],

["Schema_core", "Enumerated", [], "Specifies the schema the JSON object must be valid against.", [
[1, "https://docs.oasis-open.org/openeox/tbd/schema/core", ""]
]],

["Timestamp", "String", [], "Contains the RFC 3339 timestamp", []],

["Status", "Record", [], "Contains a single entry in the product lifecycle.", [
[1, "category", "Category", [], "Contains the category of the status"],
[2, "timestamp", "StatusTimestamp", [], "Contains the timestamp at which the product enters the category."]
]],

["Category", "Enumerated", [], "", [
[1, "EndOfLife", ""],
[2, "EndOfSupport", ""]
]],

["StatusTimestamp", "Choice", [], "", [
[1, "timestamp", "Timestamp", [], ""],
[2, "timeValues", "TimeValues", [], ""]
]],

["TimeValues", "Enumerated", [], "", [
[1, "tba", ""]
]]
]
}
30 changes: 30 additions & 0 deletions information-model/generated/core.jidl
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
title: "EOL and EOS Information"
package: "https://docs.oasis-open.org/openeox/tbd/schema/core"
description: "A draft schema for representing End-of-Life (EOL) and End-of-Support (EOS) information in OpenEoX."
exports: ["Core"]
config: {"$TypeName": "^[$A-Z][-_$A-Za-z0-9]{0,63}$"}

Core = Record
1 schema Schema_core
2 last_updated Timestamp // Timestamp of last change
3 status Status [1..*] // Contains a list of status elements.

Schema_core = Enumerated // Specifies the schema the JSON object must be valid against.
1 https://docs.oasis-open.org/openeox/tbd/schema/core

Timestamp = String // Contains the RFC 3339 timestamp

Status = Record // Contains a single entry in the product lifecycle.
1 category Category // Contains the category of the status
2 timestamp StatusTimestamp // Contains the timestamp at which the product enters the category.

Category = Enumerated
1 EndOfLife
2 EndOfSupport

StatusTimestamp = Choice
1 timestamp Timestamp
2 timeValues TimeValues

TimeValues = Enumerated
1 tba
106 changes: 106 additions & 0 deletions information-model/generated/core.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://docs.oasis-open.org/openeox/tbd/schema/core",
"title": "EOL and EOS Information",
"description": "A draft schema for representing End-of-Life (EOL) and End-of-Support (EOS) information in OpenEoX.",
"$ref": "#/definitions/Core",
"definitions": {
"Core": {
"title": "Core",
"type": "object",
"additionalProperties": false,
"required": [
"schema",
"last_updated",
"status"
],
"maxProperties": 100,
"properties": {
"schema": {
"$ref": "#/definitions/Schema_core",
"description": ""
},
"last_updated": {
"$ref": "#/definitions/Timestamp",
"description": "Timestamp of last change"
},
"status": {
"type": "array",
"description": "Contains a list of status elements.",
"minItems": 1,
"items": {
"$ref": "#/definitions/Status",
"description": "Contains a list of status elements."
}
}
}
},
"Schema_core": {
"title": "Schema core",
"type": "string",
"description": "Specifies the schema the JSON object must be valid against.",
"enum": [
"https://docs.oasis-open.org/openeox/tbd/schema/core"
]
},
"Timestamp": {
"title": "Timestamp",
"type": "string",
"description": "Contains the RFC 3339 timestamp",
"maxLength": 255
},
"Status": {
"title": "Status",
"type": "object",
"description": "Contains a single entry in the product lifecycle.",
"additionalProperties": false,
"required": [
"category",
"timestamp"
],
"maxProperties": 100,
"properties": {
"category": {
"$ref": "#/definitions/Category",
"description": "Contains the category of the status"
},
"timestamp": {
"$ref": "#/definitions/StatusTimestamp",
"description": "Contains the timestamp at which the product enters the category."
}
}
},
"Category": {
"title": "Category",
"type": "string",
"enum": [
"EndOfLife",
"EndOfSupport"
]
},
"StatusTimestamp": {
"title": "StatusTimestamp",
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"maxProperties": 1,
"properties": {
"timestamp": {
"$ref": "#/definitions/Timestamp",
"description": ""
},
"timeValues": {
"$ref": "#/definitions/TimeValues",
"description": ""
}
}
},
"TimeValues": {
"title": "TimeValues",
"type": "string",
"enum": [
"tba"
]
}
}
}
68 changes: 68 additions & 0 deletions information-model/generated/core.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
title: "EOL and EOS Information"
package: "https://docs.oasis-open.org/openeox/tbd/schema/core"
description: "A draft schema for representing End-of-Life (EOL) and End-of-Support (EOS) information in OpenEoX."
exports: ["Core"]
config: {"$TypeName": "^[$A-Z][-_$A-Za-z0-9]{0,63}$"}

**Type: Core (Record)**

| ID | Name | Type | \# | Description |
|----|------------------|-------------|-------|-------------------------------------|
| 1 | **schema** | Schema_core | 1 | |
| 2 | **last_updated** | Timestamp | 1 | Timestamp of last change |
| 3 | **status** | Status | 1..\* | Contains a list of status elements. |

**********

Specifies the schema the JSON object must be valid against.

**Type: Schema_core (Enumerated)**

| ID | Item | Description |
|----|---------------------------------------------------------|-------------|
| 1 | **https://docs.oasis-open.org/openeox/tbd/schema/core** | |

**********

| Type Name | Type Definition | Description |
|---------------|-----------------|---------------------------------|
| **Timestamp** | String | Contains the RFC 3339 timestamp |

**********

Contains a single entry in the product lifecycle.

**Type: Status (Record)**

| ID | Name | Type | \# | Description |
|----|---------------|-----------------|----|------------------------------------------------------------------|
| 1 | **category** | Category | 1 | Contains the category of the status |
| 2 | **timestamp** | StatusTimestamp | 1 | Contains the timestamp at which the product enters the category. |

**********

**Type: Category (Enumerated)**

| ID | Item | Description |
|----|------------------|-------------|
| 1 | **EndOfLife** | |
| 2 | **EndOfSupport** | |

**********

**Type: StatusTimestamp (Choice)**

| ID | Name | Type | \# | Description |
|----|----------------|------------|----|-------------|
| 1 | **timestamp** | Timestamp | 1 | |
| 2 | **timeValues** | TimeValues | 1 | |

**********

**Type: TimeValues (Enumerated)**

| ID | Item | Description |
|----|---------|-------------|
| 1 | **tba** | |

**********
Binary file added information-model/generated/eox.graphviz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions information-model/generated/shell-resolved.jidl
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
title: "EOL and EOS Information"
package: "https://docs.oasis-open.org/openeox/tbd/schema/shell"
description: "A draft schema for representing End-of-Life (EOL) and End-of-Support (EOS) information in OpenEoX."
exports: ["Shell"]
config: {"$TypeName": "^[$A-Z][-_$A-Za-z0-9]{0,63}$"}

Shell = Record
1 schema Schema_shell
2 statements Statement [1..*] // Contains a list of statement elements.

Statement = Record // Statements contain the single OpenEoX entries.
1 core Core
2 productName ProductName_t
3 productVersion ProductVersion_t
4 supplierName SupplierName_t

Core = Record
1 schema Schema_core
2 last_updated Timestamp // Timestamp of last change
3 status Status [1..*] // Contains a list of status elements.

Status = Record // Contains a single entry in the product lifecycle.
1 category Category // Contains the category of the status
2 timestamp StatusTimestamp // Contains the timestamp at which the product enters the category.

StatusTimestamp = Choice
1 timestamp Timestamp
2 timeValues TimeValues

Schema_core = Enumerated // Specifies the schema the JSON object must be valid against.
1 https://docs.oasis-open.org/openeox/tbd/schema/core

Schema_shell = Enumerated // Specifies the schema the JSON object must be valid against.
1 https://docs.oasis-open.org/openeox/tbd/schema/shell.json

Category = Enumerated
1 EndOfLife
2 EndOfSupport

TimeValues = Enumerated
1 tba

Timestamp = String // Contains the RFC 3339 timestamp

ProductName_t = String // Contains the name of the product.

ProductVersion_t = String // Contains the version or release of the product.

SupplierName_t = String // Contains the name of the supplier or service provider.
Loading