-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AppConfig] Migrate App Configuration swagger to TypeSpec (#28634)
* initial commit + cleanup * add docs + cleanup linter warnings * add auth + update swagger * convert models to resources * update routes with standard ops + more accuracy * regenerate openapi * add examples * flavor: azure * tsp format * add spec examples * fix accept header + spec consistency * fix nextLink + headers * use encodedName * fix accept header * fix enums * format * move accept header * remove comment * format * spelling * test examples * fix examples * wip * content type header * fix delete content type + getlabels op * clean up * update suppression * add consumes * fix error * rename alias * alias sync token header * tsp compile * fix errors * improvements * more improvements * fix datetimes * client generation fixes * more clean up * add scope + request id headers * add service op template * improve template * client request id header * property type fix * tsp compile * client.tsp * tsp update --------- Co-authored-by: Catalina Peralta <[email protected]>
- Loading branch information
1 parent
da326fe
commit 3531504
Showing
84 changed files
with
4,955 additions
and
1,140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import "./main.tsp"; | ||
import "@azure-tools/typespec-client-generator-core"; | ||
|
||
using Azure.ClientGenerator.Core; | ||
using AzureAppConfiguration; | ||
|
||
namespace SdkCustomizations; | ||
|
||
@@clientName(Error, "AppConfigError", "python"); |
19 changes: 19 additions & 0 deletions
19
specification/appconfiguration/AppConfiguration/examples/2023-11-01/CheckKeyValue.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"operationId": "CheckKeyValue", | ||
"title": "Requests the headers and status of the given resource.", | ||
"parameters": { | ||
"endpoint": "https://{exampleAppConfigurationName}.azconfig.io", | ||
"api-version": "2023-11-01", | ||
"key": "Message" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": { | ||
"Content-Type": "application/vnd.microsoft.appconfig.kv+json", | ||
"ETag": "W/\"7XpB48ET4VAlB9068ft6fKMyA3m\"", | ||
"Last-Modified": "Tue, 27 Aug 2019 16:52:32 GMT", | ||
"Sync-Token": "zAJw6V16=NjotMSM3ODk3NjM=;sn=789763" | ||
} | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...fication/appconfiguration/AppConfiguration/examples/2023-11-01/CheckKeyValue_IfMatch.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"operationId": "CheckKeyValue", | ||
"title": "Requests the headers and status of the given resource using the If-Match header.", | ||
"parameters": { | ||
"endpoint": "https://{exampleAppConfigurationName}.azconfig.io", | ||
"api-version": "2023-11-01", | ||
"key": "Message", | ||
"If-Match": "\"L10qpBghN693OaxydgTkLmrBbV5\"" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": { | ||
"Content-Type": "application/vnd.microsoft.appconfig.kv+json", | ||
"ETag": "W/\"L10qpBghN693OaxydgTkLmrBbV5\"", | ||
"Last-Modified": "Tue, 27 Aug 2019 16:52:32 GMT", | ||
"Sync-Token": "zAJw6V16=NjotMSM3ODk3NjM=;sn=789763" | ||
} | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...tion/appconfiguration/AppConfiguration/examples/2023-11-01/CheckKeyValue_IfNoneMatch.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"operationId": "CheckKeyValue", | ||
"title": "Requests the headers and status of the given resource using the If-None-Match header.", | ||
"parameters": { | ||
"endpoint": "https://{exampleAppConfigurationName}.azconfig.io", | ||
"api-version": "2023-11-01", | ||
"key": "Message", | ||
"If-None-Match": "L10qpBghN693OaxydgTkLmrBbV5" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": { | ||
"Content-Type": "application/vnd.microsoft.appconfig.kv+json", | ||
"ETag": "W/\"7XpB48ET4VAlB9068ft6fKMyA3m\"", | ||
"Last-Modified": "Tue, 27 Aug 2019 16:52:32 GMT", | ||
"Sync-Token": "zAJw6V16=NjotMSM3ODk3NjM=;sn=789763" | ||
} | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
specification/appconfiguration/AppConfiguration/examples/2023-11-01/CheckKeyValues.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"operationId": "CheckKeyValues", | ||
"title": "Requests the headers and status of the given resource.", | ||
"parameters": { | ||
"endpoint": "https://{exampleAppConfigurationName}.azconfig.io", | ||
"api-version": "2023-11-01" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": { | ||
"Content-Type": "application/vnd.microsoft.appconfig.kvset+json" | ||
} | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...ication/appconfiguration/AppConfiguration/examples/2023-11-01/CheckKeyValues_IfMatch.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"operationId": "CheckKeyValues", | ||
"title": "Requests the headers and status of the given resource using the If-Match header.", | ||
"parameters": { | ||
"endpoint": "https://{exampleAppConfigurationName}.azconfig.io", | ||
"api-version": "2023-11-01", | ||
"If-Match": "\"L10qpBghN693OaxydgTkLmrBbV5\"" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": { | ||
"Content-Type": "application/vnd.microsoft.appconfig.kvset+json", | ||
"ETag": "W/\"L10qpBghN693OaxydgTkLmrBbV5\"" | ||
} | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...ion/appconfiguration/AppConfiguration/examples/2023-11-01/CheckKeyValues_IfNoneMatch.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"operationId": "CheckKeyValues", | ||
"title": "Requests the headers and status of the given resource using the If-None-Match header.", | ||
"parameters": { | ||
"endpoint": "https://{exampleAppConfigurationName}.azconfig.io", | ||
"api-version": "2023-11-01", | ||
"If-None-Match": "\"L10qpBghN693OaxydgTkLmrBbV5\"" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": { | ||
"Content-Type": "application/vnd.microsoft.appconfig.kvset+json", | ||
"ETag": "W/\"7XpB48ET4VAlB9068ft6fKMyA3m\"" | ||
} | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
specification/appconfiguration/AppConfiguration/examples/2023-11-01/CheckKeys.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"operationId": "CheckKeys", | ||
"title": "Check keys", | ||
"parameters": { | ||
"endpoint": "https://{exampleAppConfigurationName}.azconfig.io", | ||
"api-version": "2023-11-01" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": { | ||
"Content-Type": "application/vnd.microsoft.appconfig.keyset+json" | ||
} | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
specification/appconfiguration/AppConfiguration/examples/2023-11-01/CheckLabels.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"operationId": "CheckLabels", | ||
"title": "Requests the headers and status of the given resource.", | ||
"parameters": { | ||
"endpoint": "https://{exampleAppConfigurationName}.azconfig.io", | ||
"api-version": "2023-11-01" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": { | ||
"Content-Type": "application/vnd.microsoft.appconfig.labelset+json" | ||
} | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
specification/appconfiguration/AppConfiguration/examples/2023-11-01/CheckRevisions.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"operationId": "CheckRevisions", | ||
"title": "Requests the headers and status of the given resource.", | ||
"parameters": { | ||
"endpoint": "https://{exampleAppConfigurationName}.azconfig.io", | ||
"api-version": "2023-11-01" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": { | ||
"Content-Type": "application/vnd.microsoft.appconfig.kvset+json" | ||
} | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
specification/appconfiguration/AppConfiguration/examples/2023-11-01/CheckSnapshot.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"operationId": "CheckSnapshot", | ||
"title": "Requests the headers and status of the given resource.", | ||
"parameters": { | ||
"endpoint": "https://{exampleAppConfigurationName}.azconfig.io", | ||
"api-version": "2023-11-01", | ||
"name": "Prod-2022-08-01" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": { | ||
"Content-Type": "application/vnd.microsoft.appconfig.snapshot+json", | ||
"ETag": "W/\"4f6dd610dd5e4deebc7fbaef685fb903\"", | ||
"Last-Modified": "Tue, 01 Aug 2022 16:52:32 GMT", | ||
"Sync-Token": "zAJw6V16=NjotMSM3ODk3NjM=;sn=789763", | ||
"Link": "</kv?snapshot=Prod-2022-08-01?api-version={api-ver}>; rel=\"items\"" | ||
} | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...fication/appconfiguration/AppConfiguration/examples/2023-11-01/CheckSnapshot_IfMatch.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"operationId": "CheckSnapshot", | ||
"title": "Requests the headers and status of the given resource using If-Match header.", | ||
"parameters": { | ||
"endpoint": "https://{exampleAppConfigurationName}.azconfig.io", | ||
"api-version": "2023-11-01", | ||
"name": "Prod-2022-08-01", | ||
"If-Match": "\"4f6dd610dd5e4deebc7fbaef685fb903\"" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": { | ||
"Content-Type": "application/vnd.microsoft.appconfig.snapshot+json", | ||
"ETag": "W/\"4f6dd610dd5e4deebc7fbaef685fb903\"", | ||
"Last-Modified": "Tue, 01 Aug 2022 16:52:32 GMT", | ||
"Sync-Token": "zAJw6V16=NjotMSM3ODk3NjM=;sn=789763", | ||
"Link": "</kv?snapshot=Prod-2022-08-01?api-version={api-ver}>; rel=\"items\"" | ||
} | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...tion/appconfiguration/AppConfiguration/examples/2023-11-01/CheckSnapshot_IfNoneMatch.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"operationId": "CheckSnapshot", | ||
"title": "Requests the headers and status of the given resource using If-None-Match header", | ||
"parameters": { | ||
"endpoint": "https://{exampleAppConfigurationName}.azconfig.io", | ||
"api-version": "2023-11-01", | ||
"name": "Prod-2022-08-01", | ||
"If-None-Match": "\"L10qpBghN693OaxydgTkLmrBbV5\"" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": { | ||
"Content-Type": "application/vnd.microsoft.appconfig.snapshot+json", | ||
"ETag": "W/\"4f6dd610dd5e4deebc7fbaef685fb903\"", | ||
"Last-Modified": "Tue, 01 Aug 2022 16:52:32 GMT", | ||
"Sync-Token": "zAJw6V16=NjotMSM3ODk3NjM=;sn=789763", | ||
"Link": "</kv?snapshot=Prod-2022-08-01?api-version={api-ver}>; rel=\"items\"" | ||
} | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
specification/appconfiguration/AppConfiguration/examples/2023-11-01/CheckSnapshots.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"operationId": "CheckSnapshots", | ||
"title": "Requests the headers and status of the given resource.", | ||
"parameters": { | ||
"endpoint": "https://{exampleAppConfigurationName}.azconfig.io", | ||
"api-version": "2023-11-01" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": { | ||
"Content-Type": "application/vnd.microsoft.appconfig.snapshotset+json" | ||
} | ||
} | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
specification/appconfiguration/AppConfiguration/examples/2023-11-01/CreateSnapshot.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"operationId": "CreateSnapshot", | ||
"title": "Creates a key-value snapshot.", | ||
"parameters": { | ||
"endpoint": "https://{exampleAppConfigurationName}.azconfig.io", | ||
"api-version": "2023-11-01", | ||
"name": "Prod-2022-08-01", | ||
"entity": { | ||
"filters": [ | ||
{ | ||
"key": "app1/*", | ||
"label": "Production" | ||
} | ||
], | ||
"retention_period": 3600 | ||
} | ||
}, | ||
"responses": { | ||
"201": { | ||
"headers": { | ||
"Content-Type": "application/vnd.microsoft.appconfig.snapshot+json", | ||
"ETag": "W/\"4f6dd610dd5e4deebc7fbaef685fb903\"", | ||
"Last-Modified": "Tue, 01 Aug 2022 16:52:32 GMT", | ||
"Sync-Token": "zAJw6V16=NjotMSM3ODk3NjM=;sn=789763", | ||
"Operation-Location": "https://{exampleAppConfigurationName}.azconfig.io/operations?snapshot=Prod-2022-08-01&Api-Version=2023-11-01" | ||
}, | ||
"body": { | ||
"etag": "4f6dd610dd5e4deebc7fbaef685fb903", | ||
"name": "Prod-2022-08-01", | ||
"status": "provisioning", | ||
"filters": [ | ||
{ | ||
"key": "app1/*", | ||
"label": "Production" | ||
} | ||
], | ||
"composition_type": "all", | ||
"created": "2022-08-01T22:19:40+00:00", | ||
"size": 0, | ||
"items_count": 0, | ||
"retention_period": 3600, | ||
"tags": {} | ||
} | ||
} | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
specification/appconfiguration/AppConfiguration/examples/2023-11-01/DeleteKeyValue.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"operationId": "DeleteKeyValue", | ||
"title": "Deletes a key-value.", | ||
"parameters": { | ||
"endpoint": "https://{exampleAppConfigurationName}.azconfig.io", | ||
"api-version": "2023-11-01", | ||
"key": "Message" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": { | ||
"Content-Type": "application/vnd.microsoft.appconfig.kv+json", | ||
"ETag": "W/\"7XpB48ET4VAlB9068ft6fKMyA3m\"", | ||
"Last-Modified": "Tue, 27 Aug 2019 16:52:32 GMT", | ||
"Sync-Token": "zAJw6V16=NjotMSM3ODk3NjM=;sn=789763" | ||
}, | ||
"body": { | ||
"etag": "7XpB48ET4VAlB9068ft6fKMyA3m", | ||
"key": "Message", | ||
"label": null, | ||
"content_type": null, | ||
"value": "Hello World!", | ||
"tags": {}, | ||
"locked": false, | ||
"last_modified": "2019-08-27T16:52:32+00:00" | ||
} | ||
}, | ||
"204": {} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
...ication/appconfiguration/AppConfiguration/examples/2023-11-01/DeleteKeyValue_IfMatch.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"operationId": "DeleteKeyValue", | ||
"title": "Deletes a key-value using If-Match header", | ||
"parameters": { | ||
"endpoint": "https://{exampleAppConfigurationName}.azconfig.io", | ||
"api-version": "2023-11-01", | ||
"key": "Message", | ||
"If-Match": "\"L10qpBghN693OaxydgTkLmrBbV5\"" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": { | ||
"Content-Type": "application/vnd.microsoft.appconfig.kv+json", | ||
"ETag": "W/\"L10qpBghN693OaxydgTkLmrBbV5\"", | ||
"Last-Modified": "Tue, 27 Aug 2019 16:52:32 GMT", | ||
"Sync-Token": "zAJw6V16=NjotMSM3ODk3NjM=;sn=789763" | ||
}, | ||
"body": { | ||
"etag": "L10qpBghN693OaxydgTkLmrBbV5", | ||
"key": "Message", | ||
"label": null, | ||
"content_type": null, | ||
"value": "Hello World!", | ||
"tags": {}, | ||
"locked": false, | ||
"last_modified": "2019-08-27T16:52:32+00:00" | ||
} | ||
}, | ||
"204": {} | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
specification/appconfiguration/AppConfiguration/examples/2023-11-01/DeleteLock.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"operationId": "DeleteLock", | ||
"title": "Unlocks a key-value.", | ||
"parameters": { | ||
"endpoint": "https://{exampleAppConfigurationName}.azconfig.io", | ||
"api-version": "2023-11-01", | ||
"key": "Message" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": { | ||
"Content-Type": "application/vnd.microsoft.appconfig.kv+json", | ||
"ETag": "W/\"0BGYCoQ6iNdp5NtQ7N8shrobo6s\"", | ||
"Last-Modified": "Tue, 27 Aug 2019 16:52:32 GMT", | ||
"Sync-Token": "zAJw6V16=NjotMSM3ODk3NjM=;sn=789763" | ||
}, | ||
"body": { | ||
"etag": "0BGYCoQ6iNdp5NtQ7N8shrobo6s", | ||
"key": "Message", | ||
"label": null, | ||
"content_type": null, | ||
"value": "Hello World!", | ||
"tags": {}, | ||
"locked": false, | ||
"last_modified": "2019-08-27T16:52:32+00:00" | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.