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

Design schema #97

Merged
merged 14 commits into from
Jul 25, 2024
Merged

Design schema #97

merged 14 commits into from
Jul 25, 2024

Conversation

MUzairS15
Copy link
Contributor

@MUzairS15 MUzairS15 commented Jul 4, 2024

Notes for Reviewers

This PR fixes #102 #103 #104

Signed commits

  • Yes, I signed my commits.

@MUzairS15 MUzairS15 force-pushed the MUzairS15/designschema-draft branch from 52aa0bb to 92162e1 Compare July 4, 2024 16:29
@MUzairS15 MUzairS15 force-pushed the MUzairS15/designschema-draft branch from 92162e1 to cf48705 Compare July 17, 2024 09:09
@MUzairS15
Copy link
Contributor Author

Updated.

schemas/constructs/v1alpha3/relationship.json Outdated Show resolved Hide resolved
schemas/constructs/v1alpha3/relationship.json Outdated Show resolved Hide resolved
schemas/constructs/v1alpha3/relationship.json Outdated Show resolved Hide resolved
Comment on lines +73 to +86
"type": "object",
"description": "Optional selectors used to define relationships which should not be created / is restricted.",
"required": [
"to",
"from"
],
"properties": {
"from": {
"$ref": "./selectors.json#/definitions/from"
},
"to": {
"$ref": "./selectors.json#/definitions/to"
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be replaced with a selector $ref.

"description": "Reusable relationships selectors schema elements",
"$comment": "Sets of selectors are interpreted as a locical OR, while sets of allow/deny are interpreted a logical AND.",
"definitions": {
"from": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consolidate "from" and "to" into a single selector definition.

"additionalProperties": false,
"properties": {
"kind": {
"type": "string"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be a component $ref.

}
}
},

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relationships required? Can be nil?

A valid design can just have one component with no relationships.

Is there value in requiring relationships?

},
"declarationID": {
"$ref": "#/definitions/uuid",
"description": "Uniquely identifies the component/relationship declaration in the deisgn file."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove declarationID entirely.

"description": "Specifies the version of the definition."
},
"kind": {
"$ref": "./core.json#/definitions/inputString",
"$ref": "../core.json#/definitions/inputString",
"description": "Kind of the Relationship.",
"enum": [
"hierarchical",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these enums need to be Capitalized?

Comment on lines 30 to 33
"declarationID": {
"$ref": "#/definitions/uuid",
"description": "Uniquely identifies the component/relationship declaration in the deisgn file."
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"declarationID": {
"$ref": "#/definitions/uuid",
"description": "Uniquely identifies the component/relationship declaration in the deisgn file."
},

"description": "Model of the component. Learn more at https://docs.meshery.io/concepts/models"
},
"declarationID": {
"$ref": "../core.json#/definitions/declarationID"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"$ref": "../core.json#/definitions/declarationID"
"$ref": "../core.json#/definitions/uuid"

"additionalProperties": false,
"properties": {
"declarationID": {
"$ref": "../core.json#/definitions/declarationID"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"$ref": "../core.json#/definitions/declarationID"
"$ref": "../core.json#/definitions/uuid"

"type": "object",
"additionalProperties": false,
"properties": {
"declarationID": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"declarationID": {
"declarationID": {
"description": "Uniquely identifies the entity (i.e. component) as defined in a declaration (i.e. design) or as an instance (i.e. view)."

"$ref": "../v1beta1/model.json",
"description": "Model of the component. Learn more at https://docs.meshery.io/concepts/models"
},
"declarationID": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"declarationID": {
"declarationID": {
"description": "Uniquely identifies the entity (i.e. component) as defined in a declaration (i.e. design) or as an instance (i.e. view)."

"description": "List of component declarations",
"type": "array",
"items": {
"$ref": "./component.json"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this have a schemaVersion reference?

"id": {
"description": "Uniquely identifies the entity (i.e. component) as defined in a declaration (i.e. design)."
"$ref": "../core.json#/definitions/uuid"
},
"schemaVersion": {
"$ref": "../v1alpha2/core.json#/definitions/versionString",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"$ref": "../v1alpha2/core.json#/definitions/versionString",
"$ref": "../core.json#/definitions/versionString",

"properties": {
"declarationID": {
"$ref": "../core.json#/declarationID"
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MUzairS15, @aabidsofi19, @humblenginr, what is this ID in context of the fact that there is a component ID on line 87?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

@leecalcote leecalcote merged commit 660b109 into master Jul 25, 2024
2 checks passed
@leecalcote leecalcote deleted the MUzairS15/designschema-draft branch July 25, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement to Relationship Selectors
2 participants