Skip to content
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
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ src/test/ctfd/* @pandatix @NicoFgrx
src/schemas/json/cargo.json @yassun7010
src/schemas/json/tombi.json @yassun7010
src/schemas/json/pyproject.json @yassun7010

# Managed by Contextive Team:
src/schemas/json/contextive-glossary.json @chrissimon-au
6 changes: 6 additions & 0 deletions src/api/json/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -7754,6 +7754,12 @@
"description": "Open Source Hardware project metadata",
"fileMatch": ["okh.{json,toml,yml,yaml}", "*.okh.{json,toml,yml,yaml}"],
"url": "https://json.schemastore.org/okh.json"
},
{
"name": "Contextive Glossary",
"description": "A Contextive Domain Language Glossary",
"fileMatch": ["**/.contextive/definitions.yml", "*.glossary.yml"],
"url": "https://json.schemastore.org/contextive-glossary.json"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# yaml-language-server: $schema=../../schemas/json/contextive-glossary.json
# Invalid definitions. Context is missing a terms key.
contexts:
- name: Context name
5 changes: 5 additions & 0 deletions src/negative_test/contextive-glossary/missing-term-name.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# yaml-language-server: $schema=../../schemas/json/contextive-glossary.json
# Invalid definitions. Term is missing a `name` key
contexts:
- terms:
- definition: A term with an invalid schema in the definitions.yml
102 changes: 102 additions & 0 deletions src/schemas/json/contextive-glossary.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://json.schemastore.org/contextive.glossary.json",
"additionalProperties": true,
"properties": {
"contexts": {
"description": "A list of contexts - see https://docs.contextive.tech/ide/guides/setting-up-glossaries/.",
"type": "array",
"items": {
"title": "Context",
"description": "A context in the ubiquitous language, consisting of a list of terms.",
"type": "object",
"properties": {
"name": {
"title": "Name",
"description": "The name of the Context.",
"type": "string",
"examples": ["The Context's Name"]
},
"domainVisionStatement": {
"title": "Domain Vision Statement",
"description": "A statement that describes the purpose of the Context.",
"type": "string",
"examples": [
"A statement that describes the purpose of the context."
]
},
"paths": {
"title": "Paths",
"description": "A list of paths that the Context is involved in.",
"type": "array",
"items": {
"title": "Path",
"description": "A path that the Context is involved in.",
"type": "string"
},
"minItems": 1,
"uniqueItems": true
},
"terms": {
"title": "Terms",
"description": "A list of Terms in the Context - see https://docs.contextive.tech/ide/guides/defining-terminology/.",
"type": "array",
"items": {
"title": "Term",
"description": "A Term in the Context.",
"type": "object",
"properties": {
"name": {
"title": "Name",
"description": "The name of the Term.",
"type": "string",
"examples": ["The Term's Name"]
},
"definition": {
"title": "Definition",
"description": "A definition of the Term in this Context.",
"type": "string",
"examples": ["A definition of the Term in this Context."]
},
"examples": {
"title": "Examples",
"description": "A list of example sentences using the Term.",
"type": "array",
"items": {
"title": "Example sentence",
"description": "An example sentence using the Term.",
"type": "string",
"examples": ["An example sentence using the Term."]
},
"minItems": 1,
"uniqueItems": true
},
"aliases": {
"title": "Aliases",
"description": "A list of aliases for the Term.",
"type": "array",
"items": {
"title": "Alias",
"description": "An alias for the Term.",
"type": "string",
"examples": ["An alias for the Term."]
},
"minItems": 1,
"uniqueItems": true
}
},
"required": ["name"]
},
"minItems": 1,
"uniqueItems": true
}
},
"required": ["terms"]
},
"minItems": 1,
"uniqueItems": true
}
},
"required": ["contexts"],
"type": "object"
}
33 changes: 33 additions & 0 deletions src/test/contextive-glossary/contextive-glossary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# yaml-language-server: $schema=../../schemas/json/contextive-glossary.json
contexts:
- name: Demo
domainVisionStatement: To illustrate the usage of the contextive glossary file.
terms:
- name: context
definition: A boundary within which words have specific meanings.
examples:
- In the _Sales_ context, the language focuses on activities associated with selling products.
- Are you sure you're thinking of the definition from the right context?
- name: term
definition: A protected word in a given context.
examples:
- _Order_ is a term that is meaningful in the _Sales_ context.
- What term should we use to describe what happens when a customer buys something from us?
aliases:
- word
- name: alias
definition: >-
An alternative word for the same concept.

It might be a legacy term, or an alternative term that is in common use while the ubiquitous language is still being adopted.
examples:
- _Product_ is an alias of _Item_ in the Sales context.
- name: definition
definition: A short summary defining the meaning of a term in a context.
examples:
- 'The definition of _Order_ in the _Sales_ context is: "The set of _Items_ that are being sold as part of this _Order_".'
- Can you provide a definition of the term _Order_?
- name: example
definition: A sentence illustrating the correct usage of the term in the context.
examples:
- Can you give me an example of how to use the term _Order_ in this context?