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 swagger for ACE provisioning GSM sevice, the related APIs can be used for ManagementPartner management #2285

Merged
merged 12 commits into from
Jan 25, 2018

Conversation

jeffrey-ACE-zz
Copy link
Contributor

@jeffrey-ACE-zz jeffrey-ACE-zz commented Jan 18, 2018

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

@marstr marstr changed the base branch from current to master January 18, 2018 21:32
@marstr
Copy link
Member

marstr commented Jan 18, 2018

I've updated the target branch to conform to the policy changes that were made in late December 2017.

Other than that, I need to reassign this to load balance a little.

@azuresdkci azuresdkci assigned jianghaolu and unassigned marstr Jan 18, 2018
@jianghaolu
Copy link
Contributor

@jeffrey-ace While I'm reviewing, please note that we introduced stable and preview sub-folders here: https://github.com/Azure/azure-rest-api-specs#news. Please move your changes into the corresponding sub-folder.

The review will be published soon.

@jianghaolu jianghaolu added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Jan 19, 2018
@jeffrey-ACE-zz
Copy link
Contributor Author

Added preview sub folder. thank you


``` yaml $(tag) == 'package-2018-02'
input-file:
- Microsoft.ManagementPartner\2018-02-01\gsm.json
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use forward slashes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thank you

"put": {
"summary": "Add a specific `Partner`.",
"description": "Add a management partner for the objectId and tenantId.",
"operationId": "Partner_Put",
Copy link
Contributor

Choose a reason for hiding this comment

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

Rename this to "CreateOrUpdate" to keep it consistent.

}
}
},
"ManagementPartnerState": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add "description".

}
}
},
"PartnerProperties": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add "description".

"Deleted"
]
},
"ErrorResponseCode": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add "description" for the type.

"OperationList": {
"type": "object",
"properties": {
"value": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add "description".

},
"OperationResponse": {
"type": "object",
"properties": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add "description" for all the properties.

},
"OperationDisplay": {
"type": "object",
"properties": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add "description" for all properties.

},
"PartnerProperties": {
"type": "object",
"properties": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please provide more useful descriptions for the properties.

"operationId": "PartnerNoId_Get",
"x-ms-examples": {
"GetPartnerDetails": {
"$ref": "./examples/GetPartnerDetails.json"
Copy link
Contributor

Choose a reason for hiding this comment

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

This example is not valid for this operation - "partnerId" is not a parameter here.

@jianghaolu
Copy link
Contributor

The reviews are collapsed - "show outdated" button should show my comments. Thanks!

@AutorestCI
Copy link

Was unable to find SDK Azure/azure-sdk-for-python PR for this closed PR.

@jeffrey-ACE-zz
Copy link
Contributor Author

@jianghaolu, thanks for you review, fixed all your comments, can you please take a look?

@ravbhatnagar
Copy link
Contributor

@jeffrey-ace - is this a new RP? Apologies but I dont understand the scenarios and so will not be able to do a meaningful review from ARM side. Please set up a skype call and include folks from Azure API review board - @NiklasGustafsson @johanste @david justice.

@jeffrey-ACE-zz
Copy link
Contributor Author

@ravbhatnagar we already had a skype meeting with Simon Davies, can you please sync with him or add him as a reviewer too?

@jianghaolu
Copy link
Contributor

Hi @jeffrey-ace After fixing the forward slash CI is able to report more issues. I'll be publishing them in a moment.

"partnerId": "123456",
"tenantId": "1b1121dd-6900-412a-af73-e8d44f81e1c1",
"objectId": "aa67f786-0552-423e-8849-244ed12bf581",
"version": 3,
Copy link
Contributor

Choose a reason for hiding this comment

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

Version is defined as a string - same in other examples..

"put": {
"summary": "Create a specific `Partner`.",
"description": "Create a management partner for the objectId and tenantId.",
"operationId": "Partner_Put",
Copy link
Contributor

Choose a reason for hiding this comment

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

The name should be "Create" or "CreateOrUpdate", in 1st case "Patch" should also be named "Update"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, what should be changed to "Create",
Partner_Put should be changed to Parnter_Create?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes - sorry for the confusion

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, will update

"description": "this is the management partner operations response",
"x-ms-azure-resource": true,
"properties": {
"etag": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Description missing.

"type": "object",
"description": "this is the management partner operations error",
"properties": {
"error": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Description missing.

"type": "object",
"description": "this is the extended error info",
"properties": {
"code": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Description still missing for "error" and "message"

"type": "object",
"description": "this is the management partner operations list",
"properties": {
"value": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Description missing.

"OperationResponse": {
"type": "object",
"description": "this is the management partner operations response",
"properties": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Descriptions are still missing for these properties.

"OperationDisplay": {
"description": "this is the management partner operation",
"type": "object",
"properties": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Description still missing for these properties.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jianghaolu fixed all the issues, can you please help check

}
},
"/providers/Microsoft.ManagementPartner/partners": {
"get": {
Copy link
Member

Choose a reason for hiding this comment

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

Why are there 2 gets for partner one with and without the id? In the case of the one without the partner Id why is this not a list?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@simongdavies you are right, we only need one get operation, the partner is optional. Delete the one without partner id. Can you please approve

@simongdavies simongdavies added ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review and removed WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Jan 25, 2018
@AutorestCI
Copy link

Was unable to find SDK Azure/azure-sdk-for-go PR for this closed PR.

@AutorestCI
Copy link

Was unable to find SDK Azure/azure-sdk-for-python PR for this closed PR.

@azuresdkciprbot
Copy link

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/gsm/resource-manager/readme.md
Before the PR: Warning(s): 0 Error(s): 0
After the PR: Warning(s): 0 Error(s): 0

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

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/gsm/resource-manager/readme.md
Before the PR: Warning(s): 0 Error(s): 0
After the PR: Warning(s): 0 Error(s): 0

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@jeffrey-ACE-zz
Copy link
Contributor Author

Code review is approved, can you please help merge?

@jianghaolu jianghaolu merged commit 679502c into Azure:master Jan 25, 2018
@AutorestCI
Copy link

This commit was treated and no generation was made for Python

@AutorestCI
Copy link

Swagger to SDK encountered an error: (Azure/azure-sdk-for-go)

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/github_tools.py", line 28, in exception_to_github
    yield context
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 180, in rest_handle_action
    return rest_pull_close(body, github_con, restapi_repo, sdk_pr_target_repo, sdkbase)
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 306, in rest_pull_close
    rest_pr.create_issue_comment("Was unable to create SDK %s PR for this closed PR.", sdkid)
TypeError: create_issue_comment() takes 2 positional arguments but 3 were given

@AutorestCI
Copy link

This commit was treated and no generation was made for Python

@AutorestCI
Copy link

Swagger to SDK encountered an error: (Azure/azure-sdk-for-python)

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/github_tools.py", line 28, in exception_to_github
    yield context
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 180, in rest_handle_action
    return rest_pull_close(body, github_con, restapi_repo, sdk_pr_target_repo, sdkbase)
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 306, in rest_pull_close
    rest_pr.create_issue_comment("Was unable to create SDK %s PR for this closed PR.", sdkid)
TypeError: create_issue_comment() takes 2 positional arguments but 3 were given

@AutorestCI
Copy link

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

@AutorestCI
Copy link

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

1 similar comment
@AutorestCI
Copy link

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

@AutorestCI
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants