-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Add version 2016-10-10 for api management #1039
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please provide x-ms-examples of each operation as well.
Reference: https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/x-ms-examples.md
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "#/definitions/ErrorBodyContract" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please define schema instead of using anonymous types.
I mean a separate schema for this collection in definitions like:
"PolicySnippetContractCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/PolicySnippetContract"
},
"description": "Result of the List list policy contracts operation."
}
},
"description": "The response of the list policy contracts operation."
}
And refer it from here:
"schema": {
"$ref": "#/definitions/PolicySnippetContractCollection"
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#fixed.
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "#/definitions/ErrorBodyContract" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid anonymous type as recommended for PolicySnippetContractCollection
"tags": [ | ||
"GroupUsers" | ||
], | ||
"operationId": "GroupUsers_Remove", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we follow the naming convention then it should be named as GroupUsers_Delete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"description": "The user was successfully removed from the group.." | ||
}, | ||
"405": { | ||
"description": "Attempt was made to add a user to a built-in group. Built-in group membership is managed by the system.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this error valid for delete scenario? the description says "Attempt was made to ADD a user to a built-in group"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#fixed.
"required": false, | ||
"type": "string", | ||
"description": "| Field | Supported operators | Supported functions |\n|-------------|------------------------|-----------------------------------|\n| id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith |\n| name | ge, le, eq, ne, gt, lt | substringof, startswith, endswith |\n| description | ge, le, eq, ne, gt, lt | substringof, startswith, endswith |\n| serviceUrl | ge, le, eq, ne, gt, lt | substringof, startswith, endswith |\n| path | ge, le, eq, ne, gt, lt | substringof, startswith, endswith |" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it make sense to move $filter parameter to common section like other OData parameters (top and skip)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, these filters are different for each api. Each api has distinct properties, and different operators applied.
"description": "Product was successfully created." | ||
}, | ||
"204": { | ||
"description": "Product already exists." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this means - i cannot use PUT to update product
entry? The method name is CreateOrUpdate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Description was incorrect. You can use PUT to updateproduct
entity. #fixed
"$ref": "#/definitions/ErrorBodyContract" | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is product PUT LRO? if so please model it so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no PUT is not LRO.
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "#/definitions/ErrorBodyContract" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Subsctions" => "Subscriptions"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#fixed.
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "#/definitions/ErrorBodyContract" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does count
represents number of items in SubscriptionCollection. properties.value.items
or total entries across all pages? Will be good to clarify that in the description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#fixed. It represents total entries across all pages.
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "#/definitions/ErrorBodyContract" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"loggerid" is a parameter used ~4 times, so consider moving this to global parameter section and doing a $ref.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"type": "string", | ||
"description": "Base64 Encoded certificate." | ||
}, | ||
"certificate_password": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use camel casing here certificatePassword
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will take this as feedback and update it in next version of the API. This api-version is already being used, we are just updating the swagger for documentation purpose.
In reply to: 106763958 [](ancestors = 106763958)
}, | ||
"ApiManagementServiceGetSsoTokenResult": { | ||
"properties": { | ||
"redirect_uri": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use camel case redirectUri
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will take this as feedback and update it in next version of the API. This api-version is already being used, we are just updating the swagger for documentation purpose.
In reply to: 106764472 [](ancestors = 106764472)
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "#/definitions/ErrorBodyContract" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use camel case rawJson
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "#/definitions/ErrorBodyContract" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rawJson
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "#/definitions/ErrorBodyContract" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to avoid avoidAnonymous types, refer #1039 (comment)
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "#/definitions/ErrorBodyContract" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is ISO8601 duration then specify "format": "duration"
], | ||
"description": "Custom hostname configuration." | ||
}, | ||
"VirtualNetworkConfiguration": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VirtualNetworkConfiguration
- is this something user provides? If so, the values that can be set is subnetResourceId
and location
. Why are we asking location
from user? can it be inferred from the subnetResourceId
(assuming you have linked access enabled for network RP).
Is readonly property VirtualNetworkConfiguration::vnetid the resource id of vnet in which user provided subnet reside? the comment says it's a GUID.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, we support setting up API Management service in both Classic and ARM Vnets. For Classic VNET, we accept vnetId(GUID) and Location and for ARM VNet we only require subnetResourceId. For Classic, we are not integrated as linked resource.
], | ||
"description": "API Management service resource SKU properties." | ||
}, | ||
"ApiManagementServiceResource": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is ApiManagementServiceResource
an ARM resource? if yes any reason not to define Resource
("x-ms-azure-resource") model and allOf from it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#fixed.
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "#/definitions/ErrorBodyContract" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be Apis_get
Closed this review, as it took some files from the bad branch, which were not intended. Have incorporated the feedback into the new pull request. |
This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.
PR information
api-version
in the path should match theapi-version
in the spec).Quality of Swagger