Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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 @@ -3,8 +3,7 @@
"api-version": "2017-04-01",
"subscriptionId": "29cfa613-cbbc-4512-b1d6-1b3a92c7fa40",
"parameters": {
"name": "sdk-Namespace-2924",
"location": "West Europe"
"name": "sdk-Namespace-2924"
}
},
"responses": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"parameters": {
"namespaceName": "nh-sdk-ns",
"resourceGroupName": "5ktrial",
"notificationHubName": "nh-sdk-hub",
"api-version": "2017-04-01",
"subscriptionId": "29cfa613-cbbc-4512-b1d6-1b3a92c7fa40"
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Required parameter "parameters" missing.

"responses": {
"200": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"200" is not a valid response defined in the spec.

"body": {
"id": "/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/sdkresourceGroup/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/nh-sdk-hub",
"name": "nh-sdk-hub",
"type": "Microsoft.NotificationHubs/namespaces/notificationHubs",
"location": "South Central US",
"tags": null,
"properties": {
"success": 1,
"failure": 0,
"results": null
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"parameters": {
"namespaceName": "nh-sdk-ns",
"resourceGroupName": "sdkresourceGroup",
"notificationHubName": "sdk-notificationHubs-8708",
"api-version": "2017-04-01",
"subscriptionId": "29cfa613-cbbc-4512-b1d6-1b3a92c7fa40",
"properties": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be "parameters"

"properties": {
"maxSizeInMegabytes": 1024,
"maxDeliveryCount": 5,
"enableExpress": true
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/sdkresourceGroup/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/nh-sdk-hub",
"name": "nh-sdk-hub",
"type": "Microsoft.NotificationHubs/namespaces/notificationHubs",
"location": "South Central US",
"tags": null,
"properties": {
"registrationTtl": "10675199.02:48:05.4775807",
"authorizationRules": []
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,64 @@
}
}
},
"patch": {
"tags": [
"NotificationHubs"
],
"x-ms-examples": {
"notificationhubCreate": {
"$ref": "./examples/NotificationHubs/NotificationHubPatch.json"
}
},
"operationId": "NotificationHubs_Patch",
"description": "Patch a NotificationHub in a namespace.",
"parameters": [
{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
},
{
"name": "namespaceName",
"in": "path",
"required": true,
"type": "string",
"description": "The namespace name."
},
{
"name": "notificationHubName",
"in": "path",
"required": true,
"type": "string",
"description": "The notification hub name."
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/NotificationHubPatchParameters"
},
"description": "Parameters supplied to patch a NotificationHub Resource."
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "NotificationHub is patched",
"schema": {
"$ref": "#/definitions/NotificationHubResource"
}
}
}
},
"delete": {
"tags": [
"NotificationHubs"
Expand Down Expand Up @@ -916,6 +974,60 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/debugsend": {
"post": {
"tags": [
"NotificationHubs"
],
"x-ms-examples": {
"debugsend": {
"$ref": "./examples/NotificationHubs/NotificationHubDebugSend.json"
}
},
"operationId": "NotificationHubs_DebugSend",
"description": "test send a push notification",
"parameters": [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing parameter 'subscriptionId'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed now

{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
},
{
"name": "namespaceName",
"in": "path",
"required": true,
"type": "string",
"description": "The namespace name."
},
{
"name": "notificationHubName",
"in": "path",
"required": true,
"type": "string",
"description": "The notification hub name."
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"type": "string"
},
"description": "The shared access authorization rule."
}
],
"responses": {
"201": {
"description": "push send status",
"schema": {
"$ref": "#/definitions/NotificationHubResource"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}": {
"put": {
"tags": [
Expand Down Expand Up @@ -1474,8 +1586,7 @@
}
},
"required": [
"name",
"location"
"name"
],
"description": "Parameters supplied to the Check Name Availability for Namespace and NotificationHubs."
},
Expand Down Expand Up @@ -2017,6 +2128,21 @@
],
"description": "Parameters supplied to the CreateOrUpdate NotificationHub operation."
},
"NotificationHubPatchParameters": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/NotificationHubProperties",
"description": "Properties of the NotificationHub."
}
},
"allOf": [
{
"$ref": "#/definitions/Resource"
}
],
"description": "Parameters supplied to the patch NotificationHub operation."
},
"NotificationHubResource": {
"properties": {
"properties": {
Expand Down
10 changes: 10 additions & 0 deletions specification/notificationhubs/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ To see additional help and options, run:
### Basic Information
These are the global settings for the NotificationHubs API.

directive:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The directives must be defined in the yaml section for the tag containing this definition

- where:
- $.definitions.NamespaceCreateOrUpdateParameters
suppress:
- TrackedResourcePatchOperation
- where:
- $.definitions.NamespaceCreateOrUpdateParameters
suppress:
- TrackedResourceGetOperation

``` yaml
openapi-type: arm
tag: package-2017-04
Expand Down