diff --git a/config/src/main/java/com/epam/aidial/core/metaschemas/MetaSchemaHolder.java b/config/src/main/java/com/epam/aidial/core/metaschemas/MetaSchemaHolder.java index 7f9e8211..ab30dc74 100644 --- a/config/src/main/java/com/epam/aidial/core/metaschemas/MetaSchemaHolder.java +++ b/config/src/main/java/com/epam/aidial/core/metaschemas/MetaSchemaHolder.java @@ -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")) diff --git a/config/src/main/resources/custom-application-schemas/schema b/config/src/main/resources/custom-application-schemas/schema index 5431e273..2119ad6c 100644 --- a/config/src/main/resources/custom-application-schemas/schema +++ b/config/src/main/resources/custom-application-schemas/schema @@ -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", diff --git a/server/src/test/java/com/epam/aidial/core/server/ApplicationTypeSchemaApiTest.java b/server/src/test/java/com/epam/aidial/core/server/ApplicationTypeSchemaApiTest.java index a3b543a9..5e9e44d1 100644 --- a/server/src/test/java/com/epam/aidial/core/server/ApplicationTypeSchemaApiTest.java +++ b/server/src/test/java/com/epam/aidial/core/server/ApplicationTypeSchemaApiTest.java @@ -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")); } } diff --git a/server/src/test/resources/aidial.config.json b/server/src/test/resources/aidial.config.json index 0fba1d0b..05c6ece9 100644 --- a/server/src/test/resources/aidial.config.json +++ b/server/src/test/resources/aidial.config.json @@ -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": {