Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AppConfig] Migrate App Configuration swagger to TypeSpec #28634

Merged
merged 53 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
0eff175
initial commit + cleanup
cperaltah Mar 26, 2024
b4cbd21
add docs + cleanup linter warnings
cperaltah Mar 28, 2024
4fde0ca
add auth + update swagger
cperaltah Mar 28, 2024
80106a7
convert models to resources
cperaltah Apr 6, 2024
7b9844d
update routes with standard ops + more accuracy
cperaltah Apr 6, 2024
44d8455
regenerate openapi
cperaltah Apr 6, 2024
e9e77f0
add examples
cperaltah Apr 6, 2024
3103f02
flavor: azure
cperaltah Apr 6, 2024
f53c58b
tsp format
cperaltah Apr 6, 2024
3aefbd5
add spec examples
cperaltah Apr 8, 2024
d53b3b6
fix accept header + spec consistency
cperaltah Apr 9, 2024
11db639
fix nextLink + headers
cperaltah Apr 10, 2024
0a40ae9
use encodedName
cperaltah Apr 10, 2024
fd06cbf
fix accept header
cperaltah Apr 10, 2024
160e190
fix enums
cperaltah Apr 10, 2024
02cdb4d
format
cperaltah Apr 10, 2024
1d9b450
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
cperaltah Apr 10, 2024
1d2f0bb
move accept header
cperaltah Apr 10, 2024
3c3f075
remove comment
cperaltah Apr 10, 2024
0b5ed69
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
cperaltah Apr 10, 2024
132113e
format
cperaltah Apr 10, 2024
f3d7a31
spelling
cperaltah Apr 10, 2024
2ac48ec
test examples
cperaltah Apr 11, 2024
ccbd3ca
fix examples
cperaltah Apr 11, 2024
e3f9f28
wip
cperaltah Apr 12, 2024
81ff962
content type header
cperaltah Apr 19, 2024
a18d333
fix delete content type + getlabels op
cperaltah Apr 20, 2024
3a63e20
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
cperaltah Apr 20, 2024
6a22691
clean up
cperaltah Apr 20, 2024
fa409f8
update suppression
cperaltah Apr 20, 2024
2035d70
add consumes
cperaltah Apr 20, 2024
0dd51b0
fix error
cperaltah Apr 20, 2024
6f2b742
rename alias
cperaltah Apr 20, 2024
6e5963c
alias sync token header
cperaltah Apr 22, 2024
36196e3
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
cperaltah Apr 22, 2024
bbccbeb
tsp compile
cperaltah Apr 22, 2024
1b7f6d6
fix errors
cperaltah Apr 23, 2024
1df2b77
improvements
cperaltah Apr 23, 2024
d3a5fa4
more improvements
cperaltah Apr 23, 2024
eeea64c
fix datetimes
cperaltah May 2, 2024
54a5f7a
client generation fixes
cperaltah May 2, 2024
25ffe9f
more clean up
cperaltah May 2, 2024
94161c5
add scope + request id headers
cperaltah May 3, 2024
f8f33c7
add service op template
cperaltah May 3, 2024
b3645eb
improve template
cperaltah May 3, 2024
053be1b
client request id header
cperaltah May 3, 2024
eb60a79
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
cperaltah May 3, 2024
61dfb32
property type fix
cperaltah May 3, 2024
712ff8d
tsp compile
cperaltah May 3, 2024
7a067bc
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
cperaltah May 3, 2024
e05ad7d
client.tsp
cperaltah May 14, 2024
b6927fb
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
cperaltah May 14, 2024
709ccc8
tsp update
cperaltah May 14, 2024
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
9 changes: 9 additions & 0 deletions specification/appconfiguration/AppConfiguration/client.tsp
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");
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"
}
}
}
}
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"
}
}
}
}
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"
}
}
}
}
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"
}
}
}
}
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\""
}
}
}
}
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\""
}
}
}
}
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"
}
}
}
}
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"
}
}
}
}
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"
}
}
}
}
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\""
}
}
}
}
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\""
}
}
}
}
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\""
}
}
}
}
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"
}
}
}
}
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": {}
}
}
}
}
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": {}
}
}
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": {}
}
}
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"
}
}
}
}
Loading