From 40a3903f9529d1c852f2b92d03802f90fd5ae060 Mon Sep 17 00:00:00 2001 From: Liangying Wei Date: Fri, 3 Sep 2021 16:59:06 +0800 Subject: [PATCH] Update version --- .../preview/2021-09-01-preview/webpubsub.json | 98 +++++++++++++++---- specification/webpubsub/data-plane/readme.md | 53 +++++----- 2 files changed, 108 insertions(+), 43 deletions(-) diff --git a/specification/webpubsub/data-plane/WebPubSub/preview/2021-09-01-preview/webpubsub.json b/specification/webpubsub/data-plane/WebPubSub/preview/2021-09-01-preview/webpubsub.json index 722bac5465ee..c4ae087edca8 100644 --- a/specification/webpubsub/data-plane/WebPubSub/preview/2021-09-01-preview/webpubsub.json +++ b/specification/webpubsub/data-plane/WebPubSub/preview/2021-09-01-preview/webpubsub.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "title": "Azure Web PubSub Service REST API", - "version": "2021-08-01-preview" + "version": "2021-09-01-preview" }, "paths": { "/api/health": { @@ -18,7 +18,7 @@ "name": "api-version", "description": "The version of the REST APIs.", "type": "string", - "default": "2021-05-01-preview" + "default": "2021-09-01-preview" } ], "responses": { @@ -57,8 +57,7 @@ "in": "query", "name": "userId", "description": "User Id.", - "type": "string", - "default": "" + "type": "string" }, { "in": "query", @@ -83,7 +82,7 @@ "name": "api-version", "description": "The version of the REST APIs.", "type": "string", - "default": "2021-05-01-preview" + "default": "2021-09-01-preview" } ], "responses": { @@ -136,7 +135,7 @@ "name": "api-version", "description": "The version of the REST APIs.", "type": "string", - "default": "2021-05-01-preview" + "default": "2021-09-01-preview" }, { "in": "body", @@ -189,7 +188,7 @@ "name": "api-version", "description": "The version of the REST APIs.", "type": "string", - "default": "2021-05-01-preview" + "default": "2021-09-01-preview" } ], "responses": { @@ -239,7 +238,7 @@ "name": "api-version", "description": "The version of the REST APIs.", "type": "string", - "default": "2021-05-01-preview" + "default": "2021-09-01-preview" } ], "responses": { @@ -287,7 +286,7 @@ "name": "api-version", "description": "The version of the REST APIs.", "type": "string", - "default": "2021-05-01-preview" + "default": "2021-09-01-preview" }, { "in": "body", @@ -341,7 +340,7 @@ "name": "api-version", "description": "The version of the REST APIs.", "type": "string", - "default": "2021-05-01-preview" + "default": "2021-09-01-preview" } ], "responses": { @@ -403,7 +402,7 @@ "name": "api-version", "description": "The version of the REST APIs.", "type": "string", - "default": "2021-05-01-preview" + "default": "2021-09-01-preview" }, { "in": "body", @@ -465,7 +464,7 @@ "name": "api-version", "description": "The version of the REST APIs.", "type": "string", - "default": "2021-05-01-preview" + "default": "2021-09-01-preview" } ], "responses": { @@ -518,7 +517,7 @@ "name": "api-version", "description": "The version of the REST APIs.", "type": "string", - "default": "2021-05-01-preview" + "default": "2021-09-01-preview" } ], "responses": { @@ -561,7 +560,7 @@ "name": "api-version", "description": "The version of the REST APIs.", "type": "string", - "default": "2021-05-01-preview" + "default": "2021-09-01-preview" } ], "responses": { @@ -612,7 +611,7 @@ "name": "api-version", "description": "The version of the REST APIs.", "type": "string", - "default": "2021-05-01-preview" + "default": "2021-09-01-preview" }, { "in": "body", @@ -636,6 +635,63 @@ } } }, + "/api/hubs/{hub}/users/{userId}/:closeConnections": { + "post": { + "tags": [ + "webpubsub" + ], + "summary": "Closes the connections belonging to the user.", + "operationId": "WebPubSub_CloseUserConnections", + "parameters": [ + { + "in": "path", + "name": "hub", + "description": "Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.", + "required": true, + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$" + }, + { + "in": "query", + "name": "excluded", + "description": "Exclude these connectionIds when closing the connections for the user.", + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "in": "query", + "name": "reason", + "description": "The reason closing the client connection.", + "type": "string" + }, + { + "in": "path", + "name": "userId", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "api-version", + "description": "The version of the REST APIs.", + "type": "string", + "default": "2021-09-01-preview" + } + ], + "responses": { + "200": { + "description": "Success" + }, + "default": { + "description": "Error response", + "x-ms-error-response": true + } + } + } + }, "/api/hubs/{hub}/users/{userId}/groups/{group}": { "put": { "tags": [ @@ -674,7 +730,7 @@ "name": "api-version", "description": "The version of the REST APIs.", "type": "string", - "default": "2021-05-01-preview" + "default": "2021-09-01-preview" } ], "responses": { @@ -727,7 +783,7 @@ "name": "api-version", "description": "The version of the REST APIs.", "type": "string", - "default": "2021-05-01-preview" + "default": "2021-09-01-preview" } ], "responses": { @@ -770,7 +826,7 @@ "name": "api-version", "description": "The version of the REST APIs.", "type": "string", - "default": "2021-05-01-preview" + "default": "2021-09-01-preview" } ], "responses": { @@ -834,7 +890,7 @@ "name": "api-version", "description": "The version of the REST APIs.", "type": "string", - "default": "2021-05-01-preview" + "default": "2021-09-01-preview" } ], "responses": { @@ -896,7 +952,7 @@ "name": "api-version", "description": "The version of the REST APIs.", "type": "string", - "default": "2021-05-01-preview" + "default": "2021-09-01-preview" } ], "responses": { @@ -958,7 +1014,7 @@ "name": "api-version", "description": "The version of the REST APIs.", "type": "string", - "default": "2021-05-01-preview" + "default": "2021-09-01-preview" } ], "responses": { diff --git a/specification/webpubsub/data-plane/readme.md b/specification/webpubsub/data-plane/readme.md index 9fc79b49c9cf..b8c56d5d7179 100644 --- a/specification/webpubsub/data-plane/readme.md +++ b/specification/webpubsub/data-plane/readme.md @@ -4,10 +4,10 @@ This is the AutoRest configuration file for Web PubSub Service. - - --- + ## Getting Started + To build the SDK for Web PubSub Service, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: > `autorest` @@ -15,23 +15,23 @@ To build the SDK for Web PubSub Service, simply [Install AutoRest](https://aka.m To see additional help and options, run: > `autorest --help` + --- ## Configuration - - ### Basic Information + These are the global settings for the Web PubSub Service API. -``` yaml +```yaml openapi-type: data-plane -tag: package-2021-08-01-preview +tag: package-2021-09-01-preview ``` ### Suppression -``` yaml +```yaml directive: - suppress: LROStatusCodesReturnTypeSchema reason: For this data plane API, it is not a long run operation and the status code indicates the results. @@ -39,13 +39,23 @@ directive: reason: There are a lot of APIs that does not have the example. While it is being worked upon disabling this to ensure that we catch and fix other violations ``` +### Tag: package-2021-09-01-preview + +These settings apply only when `--tag=package-2021-09-01-preview` is specified on the command line. + +```yaml $(tag) == 'package-2021-09-01-preview' +input-file: + - WebPubSub/preview/2021-09-01-preview/webpubsub.json +title: AzureMessagingWebPubSubServiceClient +``` + ### Tag: package-2021-08-01-preview These settings apply only when `--tag=package-2021-08-01-preview` is specified on the command line. -``` yaml $(tag) == 'package-2021-08-01-preview' +```yaml $(tag) == 'package-2021-08-01-preview' input-file: -- WebPubSub/preview/2021-08-01-preview/webpubsub.json + - WebPubSub/preview/2021-08-01-preview/webpubsub.json title: AzureMessagingWebPubSubServiceClient ``` @@ -53,21 +63,20 @@ title: AzureMessagingWebPubSubServiceClient These settings apply only when `--tag=package-2021-05-01-preview` is specified on the command line. -``` yaml $(tag) == 'package-2021-05-01-preview' +```yaml $(tag) == 'package-2021-05-01-preview' input-file: -- WebPubSub/preview/2021-05-01-preview/webpubsub.json + - WebPubSub/preview/2021-05-01-preview/webpubsub.json title: AzureMessagingWebPubSubServiceClient ``` # Code Generation - ## Swagger to SDK This section describes what SDK should be generated by the automatic system. This is not used by Autorest itself. -``` yaml $(swagger-to-sdk) +```yaml $(swagger-to-sdk) swagger-to-sdk: - repo: azure-sdk-for-python - repo: azure-sdk-for-net @@ -79,7 +88,7 @@ swagger-to-sdk: These settings apply only when `--csharp` is specified on the command line. Please also specify `--csharp-sdks-folder=`. -``` yaml $(csharp) +```yaml $(csharp) csharp: # last generated with AutoRest.0.17.3 azure-arm: false @@ -95,7 +104,7 @@ These settings apply only when `--python` is specified on the command line. Please also specify `--python-sdks-folder=`. Use `--python-mode=update` if you already have a setup.py and just want to update the code itself. -``` yaml $(python) +```yaml $(python) python-mode: create azure-arm: false license-header: MICROSOFT_MIT_NO_VERSION @@ -104,36 +113,36 @@ package-name: azure-messaging-webpubsubservice package-version: 1.0.0b1 clear-output-folder: true ``` -``` yaml $(python) && $(python-mode) == 'update' + +```yaml $(python) && $(python-mode) == 'update' no-namespace-folders: true output-folder: $(python-sdks-folder)/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice ``` -``` yaml $(python) && $(python-mode) == 'create' + +```yaml $(python) && $(python-mode) == 'create' basic-setup-py: true output-folder: $(python-sdks-folder)/webpubsub/azure-messaging-webpubsubservice ``` - ## Multi-API/Profile support for AutoRest v3 generators AutoRest V3 generators require the use of `--tag=all-api-versions` to select api files. This block is updated by an automatic script. Edits may be lost! -``` yaml $(tag) == 'all-api-versions' /* autogenerated */ +```yaml $(tag) == 'all-api-versions' /* autogenerated */ # include the azure profile definitions from the standard location require: $(this-folder)/../../../profiles/readme.md # all the input files across all versions input-file: - $(this-folder)/WebPubSub/preview/2021-05-01-preview/webpubsub.json - ``` If there are files that should not be in the `all-api-versions` set, -uncomment the `exclude-file` section below and add the file paths. +uncomment the `exclude-file` section below and add the file paths. -``` yaml $(tag) == 'all-api-versions' +```yaml $(tag) == 'all-api-versions' #exclude-file: # - $(this-folder)/Microsoft.Example/stable/2010-01-01/somefile.json ```