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 Policy apis and Unblock Documentation Team #1117

Merged
merged 7 commits into from
Apr 14, 2017

Conversation

solankisamir
Copy link
Member

@solankisamir solankisamir commented Apr 13, 2017

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

@solankisamir
Copy link
Member Author

@amarzavery @dsgouda this fixes the issue #1071

@fearthecowboy
Copy link
Member

FYI: I ran the latest validation (and manually suppressed some that I think are not applicable) and got the following:

You're not really modifying these today, so I'm not going to block on them, but I'm going to note that corrections will soon have to be made to pass the validations.

WARNING (TrackedResourceListByImmediateParent/M3010/RPCViolation): The child tracked resource, 'apis' with immediate parent 'ApiManagementServiceResource', must have a list by immediate parent operation.
        Path: mem:///compose/swagger_customInfo.yaml#$.paths["#/definitions/apis"]
WARNING (TrackedResourceListByImmediateParent/M3010/RPCViolation): The child tracked resource, 'operations' with immediate parent 'ApiContract', must have a list by immediate parent operation.
        Path: mem:///compose/swagger_customInfo.yaml#$.paths["#/definitions/operations"]
WARNING (TrackedResourceListByImmediateParent/M3010/RPCViolation): The child tracked resource, 'authorizationServers' with immediate parent 'ApiManagementServiceResource', must have a list by immediate parent operation.
        Path: mem:///compose/swagger_customInfo.yaml#$.paths["#/definitions/authorizationServers"]
WARNING (TrackedResourceListByImmediateParent/M3010/RPCViolation): The child tracked resource, 'backends' with immediate parent 'ApiManagementServiceResource', must have a list by immediate parent operation.
        Path: mem:///compose/swagger_customInfo.yaml#$.paths["#/definitions/backends"]
WARNING (TrackedResourceListByImmediateParent/M3010/RPCViolation): The child tracked resource, 'certificates' with immediate parent 'ApiManagementServiceResource', must have a list by immediate parent operation.
        Path: mem:///compose/swagger_customInfo.yaml#$.paths["#/definitions/certificates"]
WARNING (TrackedResourceListByImmediateParent/M3010/RPCViolation): The child tracked resource, 'groups' with immediate parent 'ApiManagementServiceResource', must have a list by immediate parent operation.
        Path: mem:///compose/swagger_customInfo.yaml#$.paths["#/definitions/groups"]
WARNING (TrackedResourceListByImmediateParent/M3010/RPCViolation): The child tracked resource, 'users' with immediate parent 'GroupContract', must have a list by immediate parent operation.
        Path: mem:///compose/swagger_customInfo.yaml#$.paths["#/definitions/users"]
WARNING (TrackedResourceListByImmediateParent/M3010/RPCViolation): The child tracked resource, 'identityProviders' with immediate parent 'ApiManagementServiceResource', must have a list by immediate parent operation.
        Path: mem:///compose/swagger_customInfo.yaml#$.paths["#/definitions/identityProviders"]
WARNING (TrackedResourceListByImmediateParent/M3010/RPCViolation): The child tracked resource, 'loggers' with immediate parent 'ApiManagementServiceResource', must have a list by immediate parent operation.
        Path: mem:///compose/swagger_customInfo.yaml#$.paths["#/definitions/loggers"]
WARNING (TrackedResourceListByImmediateParent/M3010/RPCViolation): The child tracked resource, 'openidConnectProviders' with immediate parent 'ApiManagementServiceResource', must have a list by immediate parent operation.
        Path: mem:///compose/swagger_customInfo.yaml#$.paths["#/definitions/openidConnectProviders"]
WARNING (TrackedResourceListByImmediateParent/M3010/RPCViolation): The child tracked resource, 'products' with immediate parent 'ApiManagementServiceResource', must have a list by immediate parent operation.
        Path: mem:///compose/swagger_customInfo.yaml#$.paths["#/definitions/products"]
WARNING (TrackedResourceListByImmediateParent/M3010/RPCViolation): The child tracked resource, 'apis' with immediate parent 'ProductContract', must have a list by immediate parent operation.
        Path: mem:///compose/swagger_customInfo.yaml#$.paths["#/definitions/apis"]
WARNING (TrackedResourceListByImmediateParent/M3010/RPCViolation): The child tracked resource, 'groups' with immediate parent 'ProductContract', must have a list by immediate parent operation.
        Path: mem:///compose/swagger_customInfo.yaml#$.paths["#/definitions/groups"]
WARNING (TrackedResourceListByImmediateParent/M3010/RPCViolation): The child tracked resource, 'properties' with immediate parent 'ApiManagementServiceResource', must have a list by immediate parent operation.
        Path: mem:///compose/swagger_customInfo.yaml#$.paths["#/definitions/properties"]
WARNING (TrackedResourceListByImmediateParent/M3010/RPCViolation): The child tracked resource, 'quotas' with immediate parent 'ApiManagementServiceResource', must have a list by immediate parent operation.
        Path: mem:///compose/swagger_customInfo.yaml#$.paths["#/definitions/quotas"]
WARNING (TrackedResourceListByImmediateParent/M3010/RPCViolation): The child tracked resource, 'reports' with immediate parent 'ApiManagementServiceResource', must have a list by immediate parent operation.
        Path: mem:///compose/swagger_customInfo.yaml#$.paths["#/definitions/reports"]
WARNING (TrackedResourceListByImmediateParent/M3010/RPCViolation): The child tracked resource, 'subscriptions' with immediate parent 'ApiManagementServiceResource', must have a list by immediate parent operation.
        Path: mem:///compose/swagger_customInfo.yaml#$.paths["#/definitions/subscriptions"]
WARNING (TrackedResourceListByImmediateParent/M3010/RPCViolation): The child tracked resource, 'users' with immediate parent 'ApiManagementServiceResource', must have a list by immediate parent operation.
        Path: mem:///compose/swagger_customInfo.yaml#$.paths["#/definitions/users"]
ERROR (XmsExamplesProvidedValidation/M2022/None): Please provide x-ms-examples describing minimum/maximum property set for response/request payloads for operations.
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimusers.json#$.paths
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimtenant.json#$.paths
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimsubscriptions.json#$.paths
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimreports.json#$.paths
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimquotas.json#$.paths
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimproperties.json#$.paths
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimproducts.json#$.paths
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimopenidconnectproviders.json#$.paths
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimnetworkstatus.json#$.paths
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimloggers.json#$.paths
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimidentityprovider.json#$.paths
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimgroups.json#$.paths
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimdeployment.json#$.paths
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimcertificates.json#$.paths
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimbackends.json#$.paths
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimauthorizationservers.json#$.paths
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimapis.json#$.paths
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimanagement.json#$.paths
WARNING (BodyParametersValidation/M2063/SDKViolation): A body parameter must be named 'parameters'.
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimapis.json#$.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policy"].put.parameters[4].name
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimapis.json#$.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policy"].put.parameters[4]
WARNING (BodyParametersValidation/M2063/SDKViolation): A body parameter must be named 'parameters'.
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimapis.json#$.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policy"].put.parameters[3].name
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimapis.json#$.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policy"].put.parameters[3]
WARNING (BodyParametersValidation/M2063/SDKViolation): A body parameter must be named 'parameters'.
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimproducts.json#$.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policy"].put.parameters[3].name
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimproducts.json#$.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policy"].put.parameters[3]
WARNING (BodyParametersValidation/M2063/SDKViolation): A body parameter must be named 'parameters'.
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimtenant.json#$.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/policy"].put.parameters[2].name
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimtenant.json#$.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/policy"].put.parameters[2]
ERROR (XmsExamplesProvidedValidation/M2022/None): Please provide x-ms-examples describing minimum/maximum property set for response/request payloads for operations. Operation: 'ApiExport_Get'
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimapis.json#$["x-ms-paths"]["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}?export=true"].get.operationId
ERROR (ResourceModelValidation/M3001/RPCViolation): Model definition 'ApiManagementServiceResource' must have the properties 'name', 'id' and 'type' in its hierarchy and these properties must be marked as readonly.
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimdeployment.json#$.definitions.ApiManagementServiceResource
WARNING (DescriptionMissing/M4000/SDKViolation): 'statusCode' model/property lacks 'description' property. Consider adding a 'description' element. Accurate description is essential for maintaining reference documentation.
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimapis.json#$.definitions.ApiExportResult.properties.statusCode
WARNING (DescriptionMissing/M4000/SDKViolation): 'requestId' model/property lacks 'description' property. Consider adding a 'description' element. Accurate description is essential for maintaining reference documentation.
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimapis.json#$.definitions.ApiExportResult.properties.requestId
WARNING (DescriptionMissing/M4000/SDKViolation): 'oAuth2' model/property lacks 'description' property. Consider adding a 'description' element. Accurate description is essential for maintaining reference documentation.
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimapis.json#$.definitions.AuthenticationSettingsContract.properties.oAuth2
WARNING (DescriptionMissing/M4000/SDKViolation): 'properties' model/property lacks 'description' property. Consider adding a 'description' element. Accurate description is essential for maintaining reference documentation.
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimbackends.json#$.definitions.BackendBaseParameters.properties.properties
WARNING (DescriptionMissing/M4000/SDKViolation): 'error' model/property lacks 'description' property. Consider adding a 'description' element. Accurate description is essential for maintaining reference documentation.
        Path: file:///C:/work/github/azure-rest-api-specs/arm-apimanagement/2016-10-10/swagger/apimtenant.json#$.definitions.OperationResultContract.properties.error

Copy link
Member

@fearthecowboy fearthecowboy left a comment

Choose a reason for hiding this comment

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

Looks nearly good to me, couple minor fixes, that's all.

@@ -2,13 +2,9 @@
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for managing OAuth2 servers configuration in your Azure API Management deployment.",
"description": "Use these REST APIs for managing OAuth2 servers configuration in your Azure API Management deployment. We can authorize developer accounts using OAuth 2.0 in Azure API Management. For more information refer to [How to OAuth2](https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-oauth2).",
Copy link
Member

Choose a reason for hiding this comment

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

Minor quibble : We can authorize developer accounts...

We seems an odd choice for words here. Typically, documentation should be written in the non-possessive tense:

OAuth 2.0 can be used to authorize developer accounts for Azure API Management or something. (like I said... minor quibble 😄 )

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

"$ref": "#/parameters/OperationIdParameter"
},
{
"name": "policyData",
Copy link
Member

Choose a reason for hiding this comment

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

Standards are now that a body parameter should be named parameters (instead of policyData )
(BodyParametersValidation/M2063/SDKViolation): A body parameter must be named 'parameters'.

let's fix these ones 👍 (all cases!)

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

@solankisamir
Copy link
Member Author

@fearthecowboy regarding RPC Violations, we have got exception from @ravbhatnagar and have an open issue #1060 tracking to be fixed in next api-version

@fearthecowboy
Copy link
Member

@solankisamir I assumed as much; just like to point them out 😄

@fearthecowboy fearthecowboy merged commit 0b5e60d into Azure:master Apr 14, 2017
@AutorestCI
Copy link

No modification for Ruby

@AutorestCI
Copy link

No modification for Python

@AutorestCI
Copy link

No modification for NodeJS

mccleanp pushed a commit that referenced this pull request Mar 23, 2022
* Create FeatureRP swagger file

* Address comments

* Address comments

* add SubscriptionFeatureRegistrationGET example

* Create SubscriptionFeatureRegistrationPUT.json

* Create SubscriptionFeatureRegistrationDELETE.json

* Create SubscriptionFeatureRegistrationLIST.json

* Update SubscriptionFeatureRegistrationGET.json

* Update SubscriptionFeatureRegistrationPUT.json

* Update SubscriptionFeatureRegistration.json

* Update SubscriptionFeatureRegistrationLIST.json

* Update SubscriptionFeatureRegistration.json
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.

4 participants