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

[Schema] New help repo connection schema #367

Merged
merged 6 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion schemas/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package schemas

import "embed"

//go:embed configuration
//go:embed configuration connections
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We were using embed.FS here which adds directory files/assests directly in go binary that's why it was not able to use other directories, to use other directories we need to mention name of them here

var Schemas embed.FS
31 changes: 31 additions & 0 deletions schemas/connections/helmConnection/helmRepoConnection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"//playground": "https://rjsf-team.github.io/react-jsonschema-form/#eyJmb3JtRGF0YSI6eyJmaXJzdE5hbWUiOiJDaHVjIiwibGFzdE5hbWUiOiJOb3JyaXMiLCJhZ2UiOjc1LCJiaW8iOiJSb3VuZGhvdXNlIGtpY2tpbmcgYXNzZXMgc2luY2UgMTk0MCIsInBhc3N3b3JkIjoibm9uZWVkIiwidGVsZXBob25lIjoiMS04MDAtS0lDS0FTUyJ9LCJzY2hlbWEiOnsidHlwZSI6Im9iamVjdCIsInByb3BlcnRpZXMiOnsibmFtZSI6eyJ0eXBlIjoic3RyaW5nIiwidGl0bGUiOiJOYW1lIiwibWluTGVuZ3RoIjoxLCJkZXNjcmlwdGlvbiI6Ik5hbWUgb2YgdGhlIG5ldyBIZWxtIHJlcG8gY29ubmVjdGlvbiJ9LCJkZXNjcmlwdGlvbiI6eyJ0eXBlIjoic3RyaW5nIiwidGl0bGUiOiJEZXNjcmlwdGlvbiIsImZvcm1hdCI6InRleHRhcmVhIiwiZGVzY3JpcHRpb24iOiJEZXNjcmlwdGlvbiBvZiB0aGlzIEhlbG0gcmVwbyBjb25uZWN0aW9uLiJ9LCJ1cmwiOnsidHlwZSI6InN0cmluZyIsInRpdGxlIjoiVVJMIiwiZm9ybWF0IjoidXJpIiwiZGVzY3JpcHRpb24iOiJUaGUgVVJMIG9mIHRoZSBIZWxtIHJlcG9zaXRvcnkgd2hlcmUgdGhlIGNoYXJ0cyBhcmUgaG9zdGVkLiJ9fSwicmVxdWlyZWQiOlsibmFtZSIsInVybCJdfSwidWlTY2hlbWEiOnsibmFtZSI6eyJ1aTpwbGFjZWhvbGRlciI6IkVudGVyIGEgbmFtZSJ9LCJkZXNjcmlwdGlvbiI6eyJ1aTp3aWRnZXQiOiJ0ZXh0YXJlYSIsInVpOnBsYWNlaG9sZGVyIjoiRW50ZXIgYSBkZXNjcmlwdGlvbiJ9LCJ1cmwiOnsidWk6cGxhY2Vob2xkZXIiOiJFbnRlciBhIFVSTCJ9fSwidGhlbWUiOiJkZWZhdWx0IiwibGl2ZVNldHRpbmdzIjp7InNob3dFcnJvckxpc3QiOiJ0b3AiLCJ2YWxpZGF0ZSI6ZmFsc2UsImRpc2FibGVkIjpmYWxzZSwibm9IdG1sNVZhbGlkYXRlIjpmYWxzZSwicmVhZG9ubHkiOmZhbHNlLCJvbWl0RXh0cmFEYXRhIjpmYWxzZSwibGl2ZU9taXQiOmZhbHNlLCJleHBlcmltZW50YWxfZGVmYXVsdEZvcm1TdGF0ZUJlaGF2aW9yIjp7ImFycmF5TWluSXRlbXMiOiJwb3B1bGF0ZSIsImVtcHR5T2JqZWN0RmllbGRzIjoicG9wdWxhdGVBbGxEZWZhdWx0cyJ9fX0=",
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Name",
"minLength": 1,
"description": "A short, memorable name of the Helm repository connection.",
"x-rjsf-grid-area" : "12"
},
"description": {
"type": "string",
"title": "Description",
"format": "textarea",
"description": "An explanation as to the purpose and/or use of this Helm repository.",
"x-rjsf-grid-area" : "12"
},
"url": {
"type": "string",
"title": "URL",
"format": "uri",
"description": "The URL (must be http/s) of the Helm repository in which one or more Helm charts are hosted.",
"x-rjsf-grid-area" : "12"
}
},
"required": [
"name",
"url"
]
}
3 changes: 3 additions & 0 deletions schemas/connections/helmConnection/uiHelmRepoConnection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ui:order" : ["name", "description", "url"]
}
2 changes: 2 additions & 0 deletions schemas/schemaProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ func getSchemaMap() map[string]string {
"filter": "configuration/filterImport.json",
"design": "configuration/designImport.json",
"publish": "configuration/publishCatalogItem.json",
"helmRepo": "connections/helmConnection/helmRepoConnection.json",
}
}

Expand All @@ -19,6 +20,7 @@ func getUiSchemaMap() map[string]string {
"design": "configuration/uiSchemaDesignImport.json",
"filter": "configuration/uiSchemaFilter.json",
"publish": "configuration/uiSchemaPublishCatalogItem.json",
"helmRepo": "connections/helmConnection/uiHelmRepoConnection.json",
}
}

Expand Down