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

Add version 2016-10-10 for api management #1039

Closed
wants to merge 0 commits into from

Conversation

solankisamir
Copy link
Member

@solankisamir solankisamir commented Mar 16, 2017

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

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes.
  • Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

  • I have read the contribution guidelines.
  • My spec meets the review criteria:
    • The spec conforms to the Swagger 2.0 specification.
    • Validation errors from the Linter extension for VS Code have all been fixed for this spec. (Note: for large, previously checked in specs, there will likely be many errors shown. Please contact our team so we can set a timeframe for fixing these errors if your PR is not going to address them).
    • The spec follows the patterns described in the Swagger good patterns document unless the service API makes this impossible.

Copy link
Member

@anuchandy anuchandy left a 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"

Copy link
Member

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"
            }

Copy link
Member Author

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"

Copy link
Member

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",
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

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

#fixed


In reply to: 106752535 [](ancestors = 106752535)

"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.",
Copy link
Member

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"

Copy link
Member Author

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 |"
},
Copy link
Member

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)?

Copy link
Member Author

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."
Copy link
Member

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

Copy link
Member Author

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"
}
}
}
Copy link
Member

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.

Copy link
Member Author

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"

Copy link
Member

Choose a reason for hiding this comment

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

"Subsctions" => "Subscriptions"

Copy link
Member Author

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"

Copy link
Member

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

Copy link
Member Author

@solankisamir solankisamir Mar 18, 2017

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"

Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

#fixed


In reply to: 106758104 [](ancestors = 106758104)

"type": "string",
"description": "Base64 Encoded certificate."
},
"certificate_password": {
Copy link
Member

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

Copy link
Member Author

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": {
Copy link
Member

Choose a reason for hiding this comment

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

use camel case redirectUri

Copy link
Member Author

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"

Copy link
Member

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"

Copy link
Member

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"

Copy link
Member

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"

Copy link
Member

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": {
Copy link
Member

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.

Copy link
Member Author

@solankisamir solankisamir Mar 18, 2017

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": {
Copy link
Member

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?

Copy link
Member Author

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"

Copy link
Member

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

@solankisamir
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants