-
Notifications
You must be signed in to change notification settings - Fork 28
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
Design schema #97
Conversation
52aa0bb
to
92162e1
Compare
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
92162e1
to
cf48705
Compare
Updated. |
"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" | ||
} | ||
} |
There was a problem hiding this comment.
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": { |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
} | ||
} | ||
}, | ||
|
There was a problem hiding this comment.
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?
schemas/constructs/core.json
Outdated
}, | ||
"declarationID": { | ||
"$ref": "#/definitions/uuid", | ||
"description": "Uniquely identifies the component/relationship declaration in the deisgn file." |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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?
Signed-off-by: Lee Calcote <[email protected]>
schemas/constructs/core.json
Outdated
"declarationID": { | ||
"$ref": "#/definitions/uuid", | ||
"description": "Uniquely identifies the component/relationship declaration in the deisgn file." | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"$ref": "../core.json#/definitions/declarationID" | |
"$ref": "../core.json#/definitions/uuid" |
"additionalProperties": false, | ||
"properties": { | ||
"declarationID": { | ||
"$ref": "../core.json#/definitions/declarationID" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"$ref": "../core.json#/definitions/declarationID" | |
"$ref": "../core.json#/definitions/uuid" |
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"declarationID": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"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": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"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" |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"$ref": "../v1alpha2/core.json#/definitions/versionString", | |
"$ref": "../core.json#/definitions/versionString", |
Signed-off-by: Lee Calcote <[email protected]>
Signed-off-by: Lee Calcote <[email protected]>
Signed-off-by: Lee Calcote <[email protected]>
Signed-off-by: Lee Calcote <[email protected]>
"properties": { | ||
"declarationID": { | ||
"$ref": "../core.json#/declarationID" | ||
}, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
Signed-off-by: Lee Calcote <[email protected]>
Signed-off-by: Mohd Uzair <[email protected]>
Signed-off-by: Lee Calcote <[email protected]>
Signed-off-by: Lee Calcote <[email protected]>
Signed-off-by: Lee Calcote <[email protected]>
Signed-off-by: Lee Calcote <[email protected]>
Notes for Reviewers
This PR fixes #102 #103 #104
Signed commits