Skip to content

Commit

Permalink
update design schema
Browse files Browse the repository at this point in the history
Signed-off-by: MUzairS15 <[email protected]>
  • Loading branch information
MUzairS15 committed Jul 4, 2024
1 parent f642f61 commit 52aa0bb
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 221 deletions.
109 changes: 0 additions & 109 deletions schemas/constructs/v1beta1/designs-draft.json

This file was deleted.

178 changes: 66 additions & 112 deletions schemas/constructs/v1beta1/designs.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,131 +25,85 @@
"format": "uuid"
},
"type": "object",
"properties": {
"schemaVersion": {
"$ref": "./component.json#/properties/schemaVersion"
},
"version": {
"$ref": "./component.json#/properties/version"
},
"name": {
"$ref": "../v1alpha2/core.json#/definitions/inputString"
},
"metadata": {
"$ref": "./component.json#/properties/metadata"
},
"model": {
"$ref": "./component.json#/properties/model"
},
"component": {
"type": "object",
"description": "Component and it's configuration.",
"allOf": [
{
"properties": {
"version": {
"$ref": "./component.json#/properties/component/properties/version"
},
"kind": {
"$ref": "./component.json#/properties/component/properties/kind"
},
"configuration": {
"$comment": "The configuration of the component. The configuration is based on the schema defined within the component definition.",
"additionalProperties": {
"type": "string"
},
"type": "object"
}
},
"required": [
"version",
"kind",
"configuration"
]
}
},
{
"$ref": "./component.json"
}
},
"required": [
"schemaVersion",
"version",
"name",
"model",
"metadata",
"component"
]
}
},
"preferences": {
"type": "object",
"description": "Design-level preferences",
"properties": {
"layers": {
"type": "array",
"description": "List of available layers",
"items": {
"type": "string"
}
}
},
"preferences": {
"required": [
"layers"
]
},
"relationships": {
"type": "array",
"description": "List of relationships between components",
"items": {
"type": "object",
"description": "Design-level preferences",
"properties": {
"layers": {
"type": "array",
"description": "List of available layers",
"items": {
"type": "string"
}
"allOf": [
{
"$ref": "../v1alpha2/relationship.json"
},
{
"properties": {
"from": {
"type": "string",
"format": "uuid",
"description": "ID (UUID) of the source component"
},
"to": {
"type": "string",
"format": "uuid",
"description": "ID (UUID) of the target component"
},
"status": {
"type": "string",
"enum": [
"evaluating",
"valid",
"invalid"
],
"description": "Status of the relationship"
}
},
"required": [
"from",
"to",
"status"
]
}
},
"required": [
"layers"
]
},
"relationships": {
"type": "array",
"description": "List of relationships between components",
"items": {
"type": "object",
"properties": {
"schemaVersion": {
"$ref": "../v1alpha2/relationship.json#/properties/schemaVersion"
},
"version": {
"$ref": "../v1alpha2/relationship.json#/properties/version"
},
"from": {
"type": "string",
"format": "uuid",
"description": "ID (UUID) of the source component"
},
"to": {
"type": "string",
"format": "uuid",
"description": "ID (UUID) of the target component"
},
"kind": {
"$ref": "../v1alpha2/relationship.json#/properties/kind",
"description": "Kind of the relationship"
},
"type": {
"$ref": "../v1alpha2/relationship.json#/properties/type",
"description": "Type of the relationship"
},
"subType": {
"$ref": "../v1alpha2/relationship.json#/properties/subType",
"description": "Subtype of the relationship (optional)"
},
"status": {
"type": "string",
"enum": [
"evaluating",
"valid",
"invalid"
],
"description": "Status of the relationship"
}
},
"required": [
"from",
"to",
"kind",
"type",
"status"
]
}
}
},
"required": [
"name",
"schemaVersion",
"version",
"components",
"relationships"
]
"required": [
"name",
"schemaVersion",
"version",
"components",
"relationships"
]
}
}

0 comments on commit 52aa0bb

Please sign in to comment.