-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge: Merge pull request #27 from DSD-DBS/fix-docs
Update snapshot schema
- Loading branch information
Showing
9 changed files
with
420 additions
and
304 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
265 changes: 167 additions & 98 deletions
265
capella_rm_bridge/changeset/snapshot_input.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,120 +1,189 @@ | ||
{ | ||
"$id": "https://dsd-dbs.github.io/rm-bridge/importer/snapshot.schema.json", | ||
"$id": "https://dsd-dbs.github.io/capella-rm-bridge/importer/snapshot.schema.json", | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"title": "RM-Bridge Importer Snapshot", | ||
"title": "Capella RM-Bridge Importer Snapshot", | ||
"description": "A downloaded snapshot of Requirements Modules from an external Requirements Management tool.", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/$defs/requirements-module" | ||
}, | ||
"minItems": 1, | ||
"uniqueItems": true, | ||
"$defs": { | ||
"requirements-module": { | ||
"description": "Representation of a RequirementsModule in Capella, taken from the external RM tool. Some tools might use different terminology for the same concept (like \"Tracker\", etc.)", | ||
"type": "object", | ||
"properties": { | ||
"metadata": { | ||
"description": "Metadata of all components that created this snapshot. This includes version info and revision hashes/numbers of content.", | ||
"type": "object", | ||
"required": [ | ||
"id" | ||
], | ||
"additionalProperties": false, | ||
"properties": { | ||
"id": { | ||
"description": "The unique identifier of this module in the external RM tool.", | ||
"tool": { | ||
"description": "Version of the used RM Tool.", | ||
"type": "string" | ||
}, | ||
"attributes": { | ||
"description": "AttributeDefinitions for all possible attributes that Requirements or RequirementsFolders in a module could have. Not all of these definitions need to be actually used by any of the requirements' AttributeValues.", | ||
"revision": { | ||
"description": "Revision of the content managed by the RM Tool.", | ||
"type": "string" | ||
}, | ||
"connector": { | ||
"description": "Version of the used software for connecting/bridging the RM Tool with Capella.", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"tool", | ||
"revision", | ||
"connector" | ||
] | ||
}, | ||
"modules": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/properties/modules/$defs/requirements-module" | ||
}, | ||
"minItems": 1, | ||
"uniqueItems": true, | ||
"$defs": { | ||
"requirements-module": { | ||
"description": "Representation of a RequirementsModule in Capella, taken from the external RM tool. Some tools might use different terminology for the same concept (like \"Tracker\", etc.)", | ||
"type": "object", | ||
"patternProperties": { | ||
".": { | ||
"required": [ | ||
"id" | ||
], | ||
"additionalProperties": false, | ||
"properties": { | ||
"id": { | ||
"description": "The unique identifier of this module in the external RM tool.", | ||
"type": "string" | ||
}, | ||
"long_name": { | ||
"description": "Value of the \"Long Name\" field in Capella. Here it is the long name of the CapellaModule.", | ||
"type": "string" | ||
}, | ||
"data_types": { | ||
"description": "EnumerationDataTypeDefinition for all EnumerationAttributeDefinitions used by EnumAttributeValues. Not all of these definitions need to be actually used by any of the requirements' EnumAttributeValues.", | ||
"type": "object", | ||
"oneOf": [ | ||
{ | ||
"properties": { | ||
"type": { | ||
"type": "string", | ||
"enum": [ | ||
"Boolean", | ||
"Date", | ||
"Float", | ||
"Integer", | ||
"String" | ||
] | ||
} | ||
}, | ||
"additionalProperties": false | ||
}, | ||
{ | ||
"additionalProperties": false, | ||
"patternProperties": { | ||
".": { | ||
"description": "The values that are available for this EnumerationDataTypeDefinition. They are sometimes called \"options\"", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"requirement_types": { | ||
"description": "All RequirementTypes whose Requirements can be assigned to. These are for managing availability of values and data-types for all AttributeValues via AttributeDefinitions.", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"patternProperties": { | ||
".": { | ||
"description": "The RequirementType that are available for all Requirements to be assigned to.", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"required": [ | ||
"long_name" | ||
], | ||
"properties": { | ||
"type": { | ||
"type": "string", | ||
"const": "Enum" | ||
"long_name": { | ||
"description": "Value of the \"Long Name\" field in Capella. Here it is the long name of the RequirementType.", | ||
"type": "string" | ||
}, | ||
"values": { | ||
"description": "The values that this Enum Attribute can have.", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
"attributes": { | ||
"description": "AttributeDefinitions for all possible attributes that Requirements or RequirementsFolders in a module could have. Not all of these definitions need to be actually used by any of the requirements' AttributeValues.", | ||
"type": "object", | ||
"patternProperties": { | ||
".": { | ||
"description": "The \"Long Name\" of the AttributeDefinition.", | ||
"type": "object", | ||
"oneOf": [ | ||
{ | ||
"properties": { | ||
"type": { | ||
"type": "string", | ||
"enum": [ | ||
"Boolean", | ||
"Date", | ||
"Float", | ||
"Integer", | ||
"String" | ||
] | ||
} | ||
}, | ||
"additionalProperties": false | ||
}, | ||
{ | ||
"properties": { | ||
"type": { | ||
"type": "string", | ||
"const": "Enum" | ||
}, | ||
"multi_values": { | ||
"description": "Whether the Enum Attribute can have multiple values (true) or must always have exactly one value (false).", | ||
"type": "boolean" | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"multi_values": { | ||
"description": "Whether the Enum Attribute can have multiple values (true) or must always have exactly one value (false).", | ||
"type": "boolean" | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"items": { | ||
"description": "The Requirements or RequirementsFolders in this module, ordered in a hierarchical manner. Some tools might use different terminology for the same concept, like \"work item\".", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/properties/modules/$defs/requirement" | ||
} | ||
} | ||
} | ||
}, | ||
"items": { | ||
"description": "The Requirements or RequirementsFolders in this module, ordered in a hierarchical manner. Some tools might use different terminology for the same concept, like \"work item\".", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/$defs/requirement" | ||
} | ||
} | ||
} | ||
}, | ||
"requirement": { | ||
"description": "A Requirement or RequirementsFolder in the external Requirements Management tool. Some tools might use different terminology for the same concept, like \"work item\".", | ||
"type": "object", | ||
"required": [ | ||
"id", | ||
"long_name" | ||
], | ||
"properties": { | ||
"id": { | ||
"description": "Unique identifier of this Requirement in the external RM tool", | ||
"type": "string" | ||
}, | ||
"long_name": { | ||
"description": "Value of the \"Long Name\" field in Capella. Usually a short summary of the Requirement's \"text\".", | ||
"type": "string" | ||
}, | ||
"text": { | ||
"description": "Complete description text of the requirement as HTML.", | ||
"type": "string" | ||
}, | ||
"attributes": { | ||
"description": "Values for the attributes defined at module level. Not all attributes defined in the Module's `attributes` need to be present on any Requirement. However, it is not allowed for a Requirement to have attributes which do not also appear in the Module's `attributes`.\n\nFurthermore, the value of each Requirement attribute must match what is defined on the Module level:\n\n- For Boolean, Float, Integer and String, use the respective YAML types\n- For Date, use the date/time YAML type, including the timezone if possible\n- For Enum, use either a string that is equal to one of the Enum's members, or a list of such strings for multi-valued enums", | ||
"requirement": { | ||
"description": "A Requirement or RequirementsFolder in the external Requirements Management tool. Some tools might use different terminology for the same concept, like \"work item\".", | ||
"type": "object", | ||
"patternProperties": { | ||
".": { | ||
"description": "The value for this Requirement attribute (see the description of the `attributes` object for which types are valid)." | ||
"required": [ | ||
"id", | ||
"long_name" | ||
], | ||
"properties": { | ||
"id": { | ||
"description": "Unique identifier of this Requirement in the external RM tool", | ||
"type": "string" | ||
}, | ||
"long_name": { | ||
"description": "Value of the \"Long Name\" field in Capella. Usually a short summary of the Requirement's \"text\".", | ||
"type": "string" | ||
}, | ||
"type": { | ||
"description": "The assigned RequirementType. This value needs to be defined in the \"requirement_types\" object.", | ||
"type": "string" | ||
}, | ||
"text": { | ||
"description": "Complete description text of the requirement as HTML.", | ||
"type": "string" | ||
}, | ||
"attributes": { | ||
"description": "Values for the attributes defined at module level. Not all attributes defined in the Module's `attributes` need to be present on any Requirement. However, it is not allowed for a Requirement to have attributes which do not also appear in the Module's `attributes`.\n\nFurthermore, the value of each Requirement attribute must match what is defined on the Module level:\n\n- For Boolean, Float, Integer and String, use the respective YAML types\n- For Date, use the date/time YAML type, including the timezone if possible\n- For Enum, use either a string that is equal to one of the Enum's members, or a list of such strings for multi-valued enums", | ||
"type": "object", | ||
"patternProperties": { | ||
".": { | ||
"description": "The value for this Requirement attribute (see the description of the `attributes` object for which types are valid)." | ||
} | ||
} | ||
}, | ||
"children": { | ||
"description": "Requirements or RequirementsFolders underneath a RequirementsFolder (see description of the `items` object). If the `children` property exists, the object is recognized as a folder, as in Capella, Requirements can only be created under RequirementsModules or RequirementsFolders.", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/properties/modules/$defs/requirement" | ||
} | ||
} | ||
} | ||
}, | ||
"children": { | ||
"description": "Requirements or RequirementsFolders underneath a RequirementsFolder (see description of the `items` object). If the `children` property exists, the object is recognized as a folder, as in Capella, Requirements can only be created under RequirementsModules or RequirementsFolders.", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/$defs/requirement" | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
} | ||
} | ||
}, | ||
"required": [ | ||
"metadata", | ||
"modules" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.