Skip to content

Admin Swagger Specs for Commerce, Fabric, and Infrastructure Insights#1592

Merged
sarangan12 merged 8 commits intoAzure:currentfrom
deathly809:current
Aug 30, 2017
Merged

Admin Swagger Specs for Commerce, Fabric, and Infrastructure Insights#1592
sarangan12 merged 8 commits intoAzure:currentfrom
deathly809:current

Conversation

@deathly809
Copy link
Copy Markdown
Member

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


Known validation issues

Commerce

Not implemented yet. When I try to access this I get an exception.

ERROR (OperationsAPIImplementation/R3023/RPCViolation): Operations API must be implemented for '/providers/Microsoft.Commerce/operations'.
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/commerce/resource-manager/Microsoft.Commerce.Admin/2015-06-01-preview/swagger/commerceAdmin.json:16:1 ($.paths)

Fabric

Not implemented yet. When I try to access this I get an exception.

ERROR (OperationsAPIImplementation/R3023/RPCViolation): Operations API must be implemented for '/providers/Microsoft.Fabric.Admin/operations'.
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/SlbMuxInstance.json:17:4 ($.paths)
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/ScaleUnitNode.json:17:4 ($.paths)
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/ScaleUnit.json:17:2 ($.paths)
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/Operations.json:11:4 ($.paths)
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/MacAddressPool.json:17:4 ($.paths)
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/LogicalSubnet.json:17:2 ($.paths)
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/Volume.json:17:2 ($.paths)
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/StorageSystem.json:17:4 ($.paths)
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/StoragePool.json:17:4 ($.paths)
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/LogicalNetwork.json:17:4 ($.paths)
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/IpPool.json:17:4 ($.paths)
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/InfraRoleInstance.json:17:4 ($.paths)
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/InfraRole.json:17:4 ($.paths)
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/FileShare.json:17:4 ($.paths)
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/FabricLocation.json:17:4 ($.paths)
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/EdgeGatewayPool.json:17:4 ($.paths)
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/EdgeGateway.json:17:2 ($.paths)
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/Fabric.json:17:1 ($.paths)
WARNING (EnumInsteadOfBoolean/R3018/RPCViolation): Booleans are not descriptive and make them hard to use. Consider using string enums with allowed set of values defined. Property: networkVirtualizationEnabled
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/LogicalNetwork.json:123:16 ($.definitions.LogicalNetworkModel.properties.networkVirtualizationEnabled)
WARNING (EnumInsteadOfBoolean/R3018/RPCViolation): Booleans are not descriptive and make them hard to use. Consider using string enums with allowed set of values defined. Property: isPublic
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/LogicalSubnet.json:129:8 ($.definitions.LogicalSubnetModel.properties.isPublic)

This is to fix a naming issue. Without this Autorest appends Property (I think) to the end of the name and cannot deserialize the results from the RP.

ERROR (XmsClientNameProperty/R2013/SDKViolation): Value of 'x-ms-client-name' cannot be the same as 'provisioningState' Property/Model.
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/Operations.json:112:12 ($.definitions.ProvisioningState.properties)

It is either true or false.

WARNING (EnumInsteadOfBoolean/R3018/RPCViolation): Booleans are not descriptive and make them hard to use. Consider using string enums with allowed set of values defined. Property: canPowerOff
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/ScaleUnitNode.json:299:16 ($.definitions.ScaleUnitNodeModel.properties.canPowerOff)

This only works on a multi-node environment and I don't have one.

ERROR (XmsExamplesRequired/R2022/SDKViolation): Please provide x-ms-examples describing minimum/maximum property set for response/request payloads for operations. Operation: 'InfraRoles_ScaleUp'
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/InfraRole.json:19:12 ($.paths["/subscriptions/{subscriptionId}/resourceGroups/System.{location}/providers/Microsoft.Fabric.Admin/fabricLocations/{location}/infraRoles/{infraRole}/ScaleUp"].post)

This only works on a multi-node environment and I don't have one.

ERROR (XmsExamplesRequired/R2022/SDKViolation): Please provide x-ms-examples describing minimum/maximum property set for response/request payloads for operations. Operation: 'ScaleUnits_ScaleOut'
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/fabric/resource-manager/Microsoft.Fabric.Admin/2016-05-01/swagger/ScaleUnit.json:19:6 ($.paths["/subscriptions/{subscriptionId}/resourceGroups/System.{location}/providers/Microsoft.Fabric.Admin/fabricLocations/{location}/scaleUnits/{scaleUnit}/ScaleOut"].post)

InfrastructureInsights

Not implemented yet. When I try to access this I get an exception.

ERROR (OperationsAPIImplementation/R3023/RPCViolation): Operations API must be implemented for '/providers/Microsoft.InfrastructureInsights.Admin/operations'.
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/infrastructureinsights/resource-manager/Microsoft.InfrastructureInsights.Admin/2016-05-01/swagger/serviceHealth.json:11:4 ($.paths)
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/infrastructureinsights/resource-manager/Microsoft.InfrastructureInsights.Admin/2016-05-01/swagger/resourceHealth.json:11:4 ($.paths)
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/infrastructureinsights/resource-manager/Microsoft.InfrastructureInsights.Admin/2016-05-01/swagger/regionHealth.json:11:4 ($.paths)
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/infrastructureinsights/resource-manager/Microsoft.InfrastructureInsights.Admin/2016-05-01/swagger/alert.json:11:4 ($.paths)
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/infrastructureinsights/resource-manager/Microsoft.InfrastructureInsights.Admin/2016-05-01/swagger/infrastructureinsights.json:16:1 ($.paths)

If I do this I cannot perform an operation. Newtonsoft has an issue where it cannot serialize readonly variables.

ERROR (RequiredPropertiesMissingInResourceModel/R2020/RPCViolation): Model definition 'Alert' must have the properties 'name', 'id' and 'type' in its hierarchy and these properties must be marked as readonly.
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/infrastructureinsights/resource-manager/Microsoft.InfrastructureInsights.Admin/2016-05-01/swagger/alert.json:142:8 ($.definitions.Alert)

If I do this I cannot perform an operation. Newtonsoft has an issue where it cannot serialize readonly variables.

ERROR (RequiredPropertiesMissingInResourceModel/R2020/RPCViolation): Model definition 'RegionHealth' must have the properties 'name', 'id' and 'type' in its hierarchy and these properties must be marked as readonly.
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/infrastructureinsights/resource-manager/Microsoft.InfrastructureInsights.Admin/2016-05-01/swagger/regionHealth.json:98:8 ($.definitions.RegionHealth)

If I do this I cannot perform an operation. Newtonsoft has an issue where it cannot serialize readonly variables.

ERROR (RequiredPropertiesMissingInResourceModel/R2020/RPCViolation): Model definition 'ResourceHealth' must have the properties 'name', 'id' and 'type' in its hierarchy and these properties must be marked as readonly.
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/infrastructureinsights/resource-manager/Microsoft.InfrastructureInsights.Admin/2016-05-01/swagger/resourceHealth.json:107:8 ($.definitions.ResourceHealth)

If I do this I cannot perform an operation. Newtonsoft has an issue where it cannot serialize readonly variables.

ERROR (RequiredPropertiesMissingInResourceModel/R2020/RPCViolation): Model definition 'ServiceHealth' must have the properties 'name', 'id' and 'type' in its hierarchy and these properties must be marked as readonly.
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/infrastructureinsights/resource-manager/Microsoft.InfrastructureInsights.Admin/2016-05-01/swagger/serviceHealth.json:97:8 ($.definitions.ServiceHealth)

I don't know why the RP did this but you can only change a single variable from "Open" to "Closed" and then pass it using a PUT.

WARNING (PutInOperationName/R1006/SDKViolation): 'PUT' operation 'Alerts_Close' should use method name 'Create'. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
    - file:///C:/temp/azure-rest-api-specs/specification/azsadmin/infrastructureinsights/resource-manager/Microsoft.InfrastructureInsights.Admin/2016-05-01/swagger/alert.json:103:16 ($.paths["/subscriptions/{subscriptionId}/resourceGroups/System.{location}/providers/Microsoft.InfrastructureInsights.Admin/regionHealths/{location}/alerts/{alertName}"].put.operationId)

@msftclas
Copy link
Copy Markdown

@deathly809,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

@sarangan12
Copy link
Copy Markdown
Contributor

@deathly809 Please take a look at the build jobs here: https://travis-ci.org/Azure/azure-rest-api-specs/builds/268547010?utm_source=github_status&utm_medium=notification

There are 2 sets of jobs: Regular & Allowed Failure Jobs. Here Regular Jobs must be completed successfully for approval. In this case, one of the regular jobs failed. Take a look at: https://travis-ci.org/Azure/azure-rest-api-specs/jobs/268547011

There are 25 errors which are listed at https://travis-ci.org/Azure/azure-rest-api-specs/jobs/268547011#L3678. I have looked at these errors and the messages seem to be self explanatory. Please fix them and update the PR

@deathly809
Copy link
Copy Markdown
Member Author

deathly809 commented Aug 26, 2017

@sarangan12

I have gone through and fixed all the issues except one specific error. It says I cannot use x-ms-headers but the RP team returns the location to an operation status in the headers.

What should I do about the header issue? Is there a way to get a waiver?

- "Microsoft.Fabric.Admin/2016-05-01/Volume.json"
- "Microsoft.Fabric.Admin/2016-05-01/LogicalSubnet.json"
- "Microsoft.Fabric.Admin/2016-05-01/MacAddressPool.json"
- "Microsoft.Fabric.Admin/2016-05-01/Operations.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.

The name of the file is oncorrect. operations.json vs Operations.json. Please fix

@azuresdkciprbot
Copy link
Copy Markdown

Hi There,

I am the AutoRest Linter Azure bot. I am here to help. My task is to analyze the situation from the AutoRest linter perspective. Please review the below analysis result:

File: specification/azsadmin/resource-manager/InfrastructureInsights/readme.md
Before the PR: Warning(s): 0 Error(s): 0
After the PR: Warning(s): 0 Error(s): 0

File: specification/azsadmin/resource-manager/commerce/readme.md
Before the PR: Warning(s): 0 Error(s): 0
After the PR: Warning(s): 0 Error(s): 0

File: specification/azsadmin/resource-manager/fabric/readme.md
Before the PR: Warning(s): 0 Error(s): 0
After the PR: Warning(s): 3 Error(s): 5

AutoRest Linter Guidelines | AutoRest Linter Issues

Send feedback and make AutoRest Linter Azure Bot smarter day by day!

Thanks for your co-operation.

@azuresdkciprbot
Copy link
Copy Markdown

Hi There,

I am the AutoRest Linter Azure bot. I am here to help. My task is to analyze the situation from the AutoRest linter perspective. Please review the below analysis result:

File: specification/azsadmin/resource-manager/InfrastructureInsights/readme.md
Before the PR: Warning(s): 0 Error(s): 0
After the PR: Warning(s): 1 Error(s): 6

File: specification/azsadmin/resource-manager/commerce/readme.md
Before the PR: Warning(s): 0 Error(s): 0
After the PR: Warning(s): 0 Error(s): 0

File: specification/azsadmin/resource-manager/fabric/readme.md
Before the PR: Warning(s): 0 Error(s): 0
After the PR: Warning(s): 3 Error(s): 5

AutoRest Linter Guidelines | AutoRest Linter Issues

Send feedback and make AutoRest Linter Azure Bot smarter day by day!

Thanks for your co-operation.

@sarangan12 sarangan12 merged commit 999521d into Azure:current Aug 30, 2017
@AutorestCI
Copy link
Copy Markdown

No modification for AutorestCI/azure-sdk-for-node

@AutorestCI
Copy link
Copy Markdown

No modification for AutorestCI/azure-sdk-for-ruby

@AutorestCI
Copy link
Copy Markdown

No modification for AutorestCI/azure-sdk-for-python

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.

5 participants