Skip to content

Commit

Permalink
Merge pull request #142 from MUzairS15/fix
Browse files Browse the repository at this point in the history
update component metadata
  • Loading branch information
MUzairS15 authored Aug 21, 2024
2 parents d47b477 + 8d04e96 commit df2f911
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
16 changes: 16 additions & 0 deletions models/v1beta1/component/component.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions schemas/constructs/v1beta1/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
"type": "boolean",
"description": "Identifies whether the component is semantically meaningful or not; identifies whether the component should be treated as deployable entity or is for purposes of logical representation."
},
"isNamespaced": {
"type": "boolean",
"description": "Identifies whether the component is scoped to namespace or clsuter wide."
},
"published": {
"type": "boolean",
"description": "'published' controls whether the component should be registered in Meshery Registry. When the same 'published' property in Models, is set to 'false', the Model property takes precedence with all Entities in the Model not being registered."
Expand Down
6 changes: 6 additions & 0 deletions scripts/convertComponent.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,12 @@ func createNewComponentDef(oldCompDef ComponentDefinition, newModel model.ModelD
}
return false
}(),
IsNamespaced: func() bool {
if value, ok := oldCompDef.Metadata["isNamespaced"].(bool); ok {
return value
}
return false
}(),
AdditionalProperties: func() map[string]interface{} {
additionalProps := make(map[string]interface{})
for key, value := range oldCompDef.Metadata {
Expand Down

0 comments on commit df2f911

Please sign in to comment.