From c6f2ae7eef1f77adb3818f814dbacff8331acce6 Mon Sep 17 00:00:00 2001 From: Ahson Khan Date: Fri, 6 Dec 2024 13:53:49 -0800 Subject: [PATCH] Update AppConfig typespec to match service behavior by returning RequestIdResponseHeader instead of ClientRequestIdHeader. (#31745) * Update AppConfig typespec to match service behavior by returning RequestIdResponseHeader instead of ClientRequestIdHeader. * Fix 2023-11-01 stable swagger to match expected headers. * Revert change for input request headers. * Address PR feedback, update description. * Revert change to getsnapshot operation in swagger for now. * Fix the response header for getSnapshot operation. * Fix tsp formatting. --- .../appconfiguration/AppConfiguration/routes.tsp | 8 +++++--- .../stable/2023-11-01/appconfiguration.json | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/specification/appconfiguration/AppConfiguration/routes.tsp b/specification/appconfiguration/AppConfiguration/routes.tsp index 376992b30aa7..93b3ee860036 100644 --- a/specification/appconfiguration/AppConfiguration/routes.tsp +++ b/specification/appconfiguration/AppConfiguration/routes.tsp @@ -22,7 +22,7 @@ alias appConfigOperation< >; alias standardOps = ResourceOperations< - SupportsClientRequestId & NoRepeatableRequests & NoConditionalRequests, + NoClientRequestId & NoRepeatableRequests & NoConditionalRequests, Error >; @@ -302,7 +302,7 @@ op getKeyValue is Foundations.ResourceOperation< ...ClientRequestIdHeader; }, Response = Body & { - ...ClientRequestIdHeader; + ...RequestIdResponseHeader; ...AppConfigResponseHeaders; ...contentTypeHeader<"application/vnd.microsoft.appconfig.kv+json">; }, @@ -523,6 +523,8 @@ op getSnapshot is standardOps.ResourceRead< """) @header("If-None-Match") ifNoneMatch?: string; + + ...ClientRequestIdHeader; }> & ResponseHeadersTrait; - }> + } & RequestIdResponseHeader> >; #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Pre-existing API contract" diff --git a/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/2023-11-01/appconfiguration.json b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/2023-11-01/appconfiguration.json index 387cd34363c3..f92959401773 100644 --- a/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/2023-11-01/appconfiguration.json +++ b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/2023-11-01/appconfiguration.json @@ -731,10 +731,10 @@ "type": "string", "description": "Used to guarantee real-time consistency between requests." }, - "x-ms-client-request-id": { + "x-ms-request-id": { "type": "string", "format": "uuid", - "description": "An opaque, globally-unique, client-generated string identifier for the request." + "description": "An opaque, globally-unique, server-generated string identifier for the request." } } }, @@ -2257,10 +2257,10 @@ "type": "string", "description": "Used to guarantee real-time consistency between requests." }, - "x-ms-client-request-id": { + "x-ms-request-id": { "type": "string", "format": "uuid", - "description": "An opaque, globally-unique, client-generated string identifier for the request." + "description": "An opaque, globally-unique, server-generated string identifier for the request." } } },