Skip to content

Commit

Permalink
fix: Fix enum in Microsoft.iotoperations@2024-08-15-preview (Azure#30303
Browse files Browse the repository at this point in the history
)

* fix: Fix enum in 2024-08-15-preview

* tsv

* QoS 2 not supported

* Kafka host value should be required

* MQTT host should be nullable

* generate updates to schema

---------

Co-authored-by: John Lian <jlian@users.noreply.github.com>
  • Loading branch information
nonsocode and jlian authored Aug 26, 2024
1 parent 260651b commit 9af6991
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ alias AccessToken = "AccessToken";
alias Sasl = "Sasl";
alias X509Certificate = "X509Certificate";
alias Anonymous = "Anonymous";
alias ServiceAccountToken = "ServiceAccountToken";

@doc("Managed Identity Method")
union ManagedIdentityMethod {
Expand Down Expand Up @@ -234,3 +235,11 @@ union AnonymousMethod {
@doc("Anonymous Option")
Anonymous: Anonymous,
}

@doc("Service Account Token Method")
union ServiceAccountTokenMethod {
string,

@doc("ServiceAccountToken Option")
ServiceAccountToken: ServiceAccountToken,
}
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ model DataflowEndpointKafka {
consumerGroupId?: string;

@doc("Kafka endpoint host.")
host?: string;
host: string;

@doc("Batching configuration.")
batching?: DataflowEndpointKafkaBatching;
Expand Down Expand Up @@ -336,7 +336,7 @@ model DataflowEndpointMqtt {
clientIdPrefix?: string;

@doc("Host of the Broker in the form of <hostname>:<port>. Optional; connects to Broker if omitted.")
host?: string = "aio-mq-dmqtt-frontend:8883";
host?: string;

@doc("Enable or disable websockets.")
protocol?: BrokerProtocolType = BrokerProtocolType.Mqtt;
Expand All @@ -354,7 +354,7 @@ model DataflowEndpointMqtt {

@doc("Qos for Broker connection.")
@minValue(0)
@maxValue(2)
@maxValue(1)
qos?: int32 = 1;

@doc("Session expiry in seconds.")
Expand Down Expand Up @@ -385,7 +385,7 @@ model DataflowEndpointMqttAuthentication {
@doc("DataflowEndpoint Mqtt Authentication Method properties")
union MqttAuthMethod {
ManagedIdentityMethod,
SaslMethod,
ServiceAccountTokenMethod,
x509CertificateMethod,
AnonymousMethod,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4414,7 +4414,8 @@
}
},
"required": [
"authentication"
"authentication",
"host"
]
},
"DataflowEndpointKafkaAcks": {
Expand Down Expand Up @@ -4630,8 +4631,7 @@
},
"host": {
"type": "string",
"description": "Host of the Broker in the form of <hostname>:<port>. Optional; connects to Broker if omitted.",
"default": "aio-mq-dmqtt-frontend:8883"
"description": "Host of the Broker in the form of <hostname>:<port>. Optional; connects to Broker if omitted."
},
"protocol": {
"type": "string",
Expand Down Expand Up @@ -4703,7 +4703,7 @@
"description": "Qos for Broker connection.",
"default": 1,
"minimum": 0,
"maximum": 2
"maximum": 1
},
"sessionExpirySeconds": {
"type": "integer",
Expand Down Expand Up @@ -5668,7 +5668,7 @@
"enum": [
"SystemAssignedManagedIdentity",
"UserAssignedManagedIdentity",
"Sasl",
"ServiceAccountToken",
"X509Certificate",
"Anonymous"
],
Expand All @@ -5687,9 +5687,9 @@
"description": "UserAssignedManagedIdentity type"
},
{
"name": "Sasl",
"value": "Sasl",
"description": "Sasl Option"
"name": "ServiceAccountToken",
"value": "ServiceAccountToken",
"description": "ServiceAccountToken Option"
},
{
"name": "X509Certificate",
Expand Down Expand Up @@ -6193,6 +6193,24 @@
}
}
},
"ServiceAccountTokenMethod": {
"type": "string",
"description": "Service Account Token Method",
"enum": [
"ServiceAccountToken"
],
"x-ms-enum": {
"name": "ServiceAccountTokenMethod",
"modelAsString": true,
"values": [
{
"name": "ServiceAccountToken",
"value": "ServiceAccountToken",
"description": "ServiceAccountToken Option"
}
]
}
},
"ServiceType": {
"type": "string",
"description": "Kubernetes Service Types supported by Listener",
Expand Down

0 comments on commit 9af6991

Please sign in to comment.