Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -150,6 +150,54 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/listProducts": {
"post": {
"x-ms-examples": {
"Returns a list of products.": {
"$ref": "examples/Product/ListPost.json"
}
},
"tags": [
"Product"
],
"description": "Returns a list of products.",
"operationId": "Products_ListProducts",
"parameters": [
{
"$ref": "AzureStack.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "AzureStack.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "AzureStack.json#/parameters/RegistrationNameParameter"
},
{
"$ref": "#/parameters/ProductNameParameter"
},
{
"$ref": "#/parameters/DeviceConfigurationParameter"
},
{
"$ref": "AzureStack.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ProductList"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/getProducts": {
"post": {
"x-ms-examples": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,54 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/listProducts": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

listProducts

why do you need a POST .. this should really be modelled as a GET collection at the top level i.e :

GET : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products

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 PR is for fixing a swagger completeness item in s360. This API has been around for the entire lifetime of the RP, but wasn't documented for some reason. Changing how we model the operation would be a breaking change, and also wouldn't fix the swagger completeness issue. I don't know why this didn't show up earlier in swagger completeness - logs show the operation has been in use for a long time.

This action is modeled as a POST request because it has a body, the DeviceConfigurationParameter in the swagger JSON.

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.

Further, this action is identical to the POST ...{productName}/getProducts action. I don't know why they both exist - anyone who wrote these APIs is long gone.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You would need to work with the breaking change board to get the "NewApiversionRequired" Tag removed. Once that is done then please remove the "ARMChangesRequested" label and we can do the arm sign off

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.

Thank you. Can you give an example of what we should do to annotate the parameter? If you look at the parameter definition further down the file it does say "in": "body". Not sure what else we should do.

"post": {
"x-ms-examples": {
"Returns a list of products.": {
"$ref": "examples/Product/ListPost.json"
}
},
"tags": [
"Product"
],
"description": "Returns a list of products.",
"operationId": "Products_ListProducts",
"parameters": [
{
"$ref": "AzureStack.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "AzureStack.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "AzureStack.json#/parameters/RegistrationNameParameter"
},
{
"$ref": "#/parameters/ProductNameParameter"
},
{
"$ref": "#/parameters/DeviceConfigurationParameter"
},
{
"$ref": "AzureStack.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ProductList"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "AzureStack.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/getProducts": {
"post": {
"x-ms-examples": {
Expand Down