Skip to content

Commit

Permalink
feat: add viewer url to custom app schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
vladisavvv committed Jan 8, 2025
1 parent 6f03973 commit 60f9dff
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public static String getCustomApplicationMetaSchema() {
public static JsonMetaSchema.Builder getMetaschemaBuilder() {
return JsonMetaSchema.builder(MetaSchemaHolder.CUSTOM_APPLICATION_META_SCHEMA_ID, JsonMetaSchema.getV7())
.keyword(new NonValidationKeyword("dial:applicationTypeEditorUrl"))
.keyword(new NonValidationKeyword("dial:applicationTypeViewerUrl"))
.keyword(new NonValidationKeyword("dial:applicationTypeDisplayName"))
.keyword(new NonValidationKeyword("dial:applicationTypeCompletionEndpoint"))
.keyword(new NonValidationKeyword("dial:propertyKind"))
Expand Down
5 changes: 5 additions & 0 deletions config/src/main/resources/custom-application-schemas/schema
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
"format": "uri",
"description": "URL to the editor UI of the custom application of given type"
},
"dial:applicationTypeViewerUrl": {
"type": "string",
"format": "uri",
"description": "URL to the view UI of the custom application of given type"
},
"dial:applicationTypeCompletionEndpoint": {
"type": "string",
"format": "uri",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ void testApplicationTypeSchemaSchema_ok() {
Assertions.assertTrue(node.isObject());
Assertions.assertTrue(node.has("$id"));
Assertions.assertTrue(node.has("$schema"));
Assertions.assertTrue(node.has("dial:applicationTypeViewerUrl"));
}

}
1 change: 1 addition & 0 deletions server/src/test/resources/aidial.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
"$schema": "https://dial.epam.com/application_type_schemas/schema#",
"$id": "https://mydial.somewhere.com/custom_application_schemas/specific_application_type",
"dial:applicationTypeEditorUrl": "https://mydial.somewhere.com/custom_application_schemas/schema",
"dial:applicationTypeViewerUrl": "https://mydial.somewhere.com/custom_application_schemas/viewer",
"dial:applicationTypeDisplayName": "Specific Application Type",
"dial:applicationTypeCompletionEndpoint": "http://specific_application_service/opeani/v1/completion",
"properties": {
Expand Down

0 comments on commit 60f9dff

Please sign in to comment.