Skip to content
Draft
Show file tree
Hide file tree
Changes from 9 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
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ model Request extends DocumentIngress {

@doc("Request URL with all query string parameters.")
@maxLength(2048)
Url?: url;
Url?: string;

@doc("Result of a request execution. For http requests, it could be some HTTP status code.")
@maxLength(1024)
Expand Down Expand Up @@ -390,7 +390,7 @@ model KeyValuePairStringString {
key: string;

@doc("Value of the key-value pair.")
value: string;
value?: string;
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand this change. I saw your explanation in the PR description (BTW thank you for this -- I see many PRs that lack this kind of explanation):

This change makes the value property settable

But this should not be dependent on whether the property is required or optional. Making the value property optional means that a key-value-pair that only contains a key is valid -- which makes no sense to me.

Copy link
Author

@TimothyMothra TimothyMothra May 2, 2024

Choose a reason for hiding this comment

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

Discussed with my team, we'll remove this change.

}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ options:
package-mode: dataplane
flavor: azure
"@azure-tools/typespec-csharp":
package-dir: "LiveMetrics"
package-dir: "Azure.Monitor.OpenTelemetry.LiveMetrics"
namespace: "{package-dir}"
clear-output-folder: true
model-namespace: false
model-namespace: true
flavor: azure
"@azure-tools/typespec-ts":
package-dir: "livemetrics-rest"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,7 @@
}
},
"required": [
"key",
"value"
"key"
]
},
"MetricPoint": {
Expand Down Expand Up @@ -892,7 +891,6 @@
},
"Url": {
"type": "string",
"format": "uri",
"description": "Request URL with all query string parameters.",
"maxLength": 2048
},
Expand Down