diff --git a/specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/JavaComponents.json b/specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/JavaComponents.json index 857877884e81..744d4f2d9b9f 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/JavaComponents.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/JavaComponents.json @@ -401,62 +401,141 @@ "properties": { "description": "Java Component resource specific properties", "type": "object", - "properties": { - "componentType": { - "description": "Type of the Java Component.", - "enum": [ - "SpringBootAdmin", - "SpringCloudEureka", - "SpringCloudConfig", - "Nacos" - ], - "type": "string", - "x-ms-enum": { - "name": "JavaComponentType", - "modelAsString": true - } - }, - "provisioningState": { - "description": "Provisioning state of the Java Component.", - "enum": [ - "Succeeded", - "Failed", - "Canceled", - "Deleting", - "InProgress" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "JavaComponentProvisioningState", - "modelAsString": true - } - }, - "configurations": { - "description": "List of Java Components configuration properties", - "type": "array", - "items": { - "$ref": "#/definitions/JavaComponentConfigurationProperty" - }, - "x-ms-identifiers": [ - "propertyName" - ] - }, - "serviceBinds": { - "description": "List of Java Components that are bound to the Java component", - "type": "array", - "items": { - "$ref": "#/definitions/JavaComponentServiceBind" - }, - "x-ms-identifiers": [ - "name" - ] - } + "$ref": "#/definitions/JavaComponentProperties" + } + } + }, + "JavaComponentProperties": { + "description": "Java Component common properties.", + "type": "object", + "required": [ + "componentType" + ], + "properties": { + "componentType": { + "description": "Type of the Java Component.", + "enum": [ + "SpringBootAdmin", + "SpringCloudEureka", + "SpringCloudConfig", + "Nacos" + ], + "type": "string", + "x-ms-enum": { + "name": "JavaComponentType", + "modelAsString": true + } + }, + "provisioningState": { + "description": "Provisioning state of the Java Component.", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Deleting", + "InProgress" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JavaComponentProvisioningState", + "modelAsString": true + } + }, + "configurations": { + "description": "List of Java Components configuration properties", + "type": "array", + "items": { + "$ref": "#/definitions/JavaComponentConfigurationProperty" + }, + "x-ms-identifiers": [ + "propertyName" + ] + }, + "serviceBinds": { + "description": "List of Java Components that are bound to the Java component", + "type": "array", + "items": { + "$ref": "#/definitions/JavaComponentServiceBind" }, - "x-ms-client-flatten": true + "x-ms-identifiers": [ + "name" + ] + } + }, + "x-ms-client-flatten": true, + "discriminator": "componentType" + }, + "JavaComponentIngress": { + "description": "Container App Ingress configuration.", + "type": "object", + "properties": { + "fqdn": { + "description": "Hostname of the Java Component endpoint", + "type": "string", + "readOnly": true } } }, + "SpringBootAdminComponent": { + "description": "Spring Boot Admin properties.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/JavaComponentProperties" + } + ], + "properties": { + "ingress": { + "$ref": "#/definitions/JavaComponentIngress", + "description": "Java Component Ingress configurations." + } + }, + "x-ms-discriminator-value": "SpringBootAdmin" + }, + "NacosComponent": { + "description": "Nacos properties.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/JavaComponentProperties" + } + ], + "properties": { + "ingress": { + "$ref": "#/definitions/JavaComponentIngress", + "description": "Java Component Ingress configurations." + } + }, + "x-ms-discriminator-value": "Nacos" + }, + "SpringCloudEurekaComponent": { + "description": "Spring Cloud Eureka properties.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/JavaComponentProperties" + } + ], + "properties": { + "ingress": { + "$ref": "#/definitions/JavaComponentIngress", + "description": "Java Component Ingress configurations." + } + }, + "x-ms-discriminator-value": "SpringCloudEureka" + }, + "SpringCloudConfigComponent": { + "description": "Spring Cloud Config properties.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/JavaComponentProperties" + } + ], + "properties": {}, + "x-ms-discriminator-value": "SpringCloudConfig" + }, "JavaComponentsCollection": { "description": "Java Components ARM resource.", "required": [ diff --git a/specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_CreateOrUpdate.json index edf1bea595dd..b1fc9b0e06cb 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_CreateOrUpdate.json @@ -40,7 +40,10 @@ "propertyName": "spring.boot.admin.monitor.status-interval", "value": "10000ms" } - ] + ], + "ingress": { + "fqdn": "myjavacomponent.myenvironment.test.net" + } } } }, @@ -62,7 +65,10 @@ "propertyName": "spring.boot.admin.monitor.status-interval", "value": "10000ms" } - ] + ], + "ingress": { + "fqdn": "myjavacomponent.myenvironment.test.net" + } } } } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Get.json b/specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Get.json index e6ba3bd16d6a..8c7fdcf7bf6d 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Get.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Get.json @@ -25,7 +25,10 @@ "propertyName": "spring.boot.admin.monitor.status-interval", "value": "10000ms" } - ] + ], + "ingress": { + "fqdn": "myjavacomponent.myenvironment.test.net" + } } } } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_List.json b/specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_List.json index 85799cf5d894..dc255672539b 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_List.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_List.json @@ -25,7 +25,10 @@ "propertyName": "spring.boot.admin.monitor.status-interval", "value": "10000ms" } - ] + ], + "ingress": { + "fqdn": "myjavacomponent.myenvironment.test.net" + } } }, { @@ -40,7 +43,10 @@ "propertyName": "spring.cloud.config.server.git.uri", "value": "" } - ] + ], + "ingress": { + "fqdn": "myjavacomponent.myenvironment.test.net" + } } } ] diff --git a/specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Patch.json b/specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Patch.json index 8af43421ce49..09af6e597e05 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Patch.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Patch.json @@ -40,7 +40,10 @@ "propertyName": "spring.boot.admin.monitor.status-interval", "value": "10000ms" } - ] + ], + "ingress": { + "fqdn": "myjavacomponent.myenvironment.test.net" + } } } }, diff --git a/specification/app/resource-manager/readme.md b/specification/app/resource-manager/readme.md index 5134bccd155b..31a4594942c2 100644 --- a/specification/app/resource-manager/readme.md +++ b/specification/app/resource-manager/readme.md @@ -63,6 +63,11 @@ input-file: - Microsoft.App/preview/2024-02-02-preview/Subscriptions.json - Microsoft.App/preview/2024-02-02-preview/Usages.json - Microsoft.App/preview/2024-02-02-preview/FunctionsExtension.json +directive: + - suppress: PatchBodyParametersSchema + from: JavaComponents.json + reason: | + Java Component is using componentType as the discriminator. While the discriminator is a required property, this rule prevent it being present in the patch request body. ``` ### Tag: package-preview-2023-11