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

added missing Swagger #2428

Merged
merged 4 commits into from
Mar 20, 2018
Merged

added missing Swagger #2428

merged 4 commits into from
Mar 20, 2018

Conversation

gatneil
Copy link
Contributor

@gatneil gatneil commented Feb 6, 2018

No description provided.

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

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@AutorestCI
Copy link

AutorestCI commented Feb 6, 2018

Automation for azure-sdk-for-python

A PR has been created for you based on this PR content.

Once this PR will be merged, content will be added to your service PR:
Azure/azure-sdk-for-python#1930

Copy link
Contributor

@olydis olydis left a comment

Choose a reason for hiding this comment

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

some comments 🙂

"tags": [
"ComputeOperations"
],
"operationId": "ComputeOperations_List",
Copy link
Contributor

Choose a reason for hiding this comment

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

pretty sure it is convention to call this Operations_List; @ravbhatnagar ?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes thats correct

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix incoming

@@ -34,6 +34,28 @@
}
},
"paths": {
"/providers/Microsoft.Compute/operations": {
"get": {
"tags": [
Copy link
Contributor

Choose a reason for hiding this comment

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

mark this operation as

    "x-ms-pageable": {
     "nextLinkName": null
    },

to hide the wrapping of ComputeOperationListResult from users. Just to confirm: There are no further pages in the result, i.e. you'll return just one page?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup! just one page; fix incoming

"schema": {
"$ref": "#/definitions/AvailabilitySet"
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

just caught my eye because it's different from the others: this PATCH is not long running?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nope! it always returns immediately :)

"ComputeOperationListResult": {
"properties": {
"value": {
"type": "array",
Copy link
Contributor

Choose a reason for hiding this comment

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

please mark as readOnly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix incoming

"description": "The List Compute Operation operation response."
},
"ComputeOperationValue": {
"properties": {
Copy link
Contributor

Choose a reason for hiding this comment

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

mark all properties as readOnly, same for next type

Copy link
Contributor

Choose a reason for hiding this comment

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

(since they are only ever received from the service, not sent to it)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix incoming

@olydis olydis added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Feb 6, 2018
@olydis
Copy link
Contributor

olydis commented Feb 6, 2018

@ravbhatnagar some new operations; I already did a quick SDK-goggles run over it since it's not a lot of changes

@olydis
Copy link
Contributor

olydis commented Feb 15, 2018

@ravbhatnagar ping

@ravbhatnagar
Copy link
Contributor

Looks good!

@ravbhatnagar ravbhatnagar 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 Feb 15, 2018
@olydis
Copy link
Contributor

olydis commented Feb 20, 2018

@gatneil ping

@AutorestCI
Copy link

AutorestCI commented Feb 21, 2018

Automation for azure-sdk-for-go

A PR has been created for you based on this PR content.

Once this PR will be merged, content will be added to your service PR:
Azure/azure-sdk-for-go#1366

@gatneil
Copy link
Contributor Author

gatneil commented Feb 21, 2018

@olydis sorry for the delay; thoughts on the latest and greatest? :)

@Azure Azure deleted a comment from AutorestCI Feb 21, 2018
@lmazuel
Copy link
Member

lmazuel commented Feb 21, 2018

@AutorestCI rebuild azure-sdk-for-python

Copy link
Contributor

@olydis olydis left a comment

Choose a reason for hiding this comment

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

Looking good overall, thanks for the fixes! Just a minor comment 😉

"$ref": "#/definitions/VirtualMachineProperties"
},
"resources": {
"readOnly": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

what does it mean for a property of VirtualMachineUpdate (if I see correctly, only ever sent) to be readOnly? 😃

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, you're right. It makes no sense, so I removed it. Originally, I copied that from the VirtualMachine object, which is used in GETs as well, so it makes sense to have it in that object as readOnly, but it doesn't make sense for the VirtualMachineUpdate object :)

@lmazuel
Copy link
Member

lmazuel commented Mar 13, 2018

@AutorestCI rebuild azure-sdk-for-python

@jhendrixMSFT
Copy link
Member

@AutorestCI rebuild azure-sdk-for-go

@AutorestCI
Copy link

Encountered a Subprocess error

Command: ['/usr/local/bin/autorest', '/tmp/tmpekhqdq7p/rest/specification/compute/resource-manager/readme.md', '--go', '--go-sdk-folder=/tmp/tmpekhqdq7p/sdk', '--multiapi', '--package-version=latest', '--use=@microsoft.azure/autorest.go@~2.1.87', "--user-agent='Azure-SDK-For-Go/latest services'", '--verbose']
Finished with return code 1
and output:

AutoRest code generation utility [version: 2.0.4255; node: v7.10.1]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
   Loading AutoRest core      '/tmp/.autorest/@microsoft.azure_autorest-core@2.0.4255/node_modules/@microsoft.azure/autorest-core/dist' (2.0.4255)
   Loading AutoRest extension '@microsoft.azure/autorest.go' (~2.1.87->2.1.88)
   Loading AutoRest extension '@microsoft.azure/autorest.modeler' (2.3.38->2.3.38)
Processing batch task - {"tag":"package-disks-2018-04"} .
Processing batch task - {"tag":"package-2017-12"} .
FATAL: System.InvalidOperationException: Swagger document contains two or more x-ms-enum extensions with the same name 'StorageAccountTypes' and different values: Standard_LRS,Premium_LRS vs. Standard_LRS,Premium_LRS
   at AutoRest.Modeler.ObjectBuilder.BuildServiceType(String serviceTypeName, Boolean required) in C:\Users\ci\AppData\Local\Temp\PUBLISH8kiit\38_20171116T010915\autorest.modeler\src\ObjectBuilder.cs:line 147
   at AutoRest.Modeler.SchemaBuilder.ParentBuildServiceType(String serviceTypeName, Boolean required) in C:\Users\ci\AppData\Local\Temp\PUBLISH8kiit\38_20171116T010915\autorest.modeler\src\SchemaBuilder.cs:line 204
   at AutoRest.Modeler.SchemaBuilder.BuildServiceType(String serviceTypeName, Boolean required) in C:\Users\ci\AppData\Local\Temp\PUBLISH8kiit\38_20171116T010915\autorest.modeler\src\SchemaBuilder.cs:line 46
   at AutoRest.Modeler.SchemaBuilder.BuildServiceType(String serviceTypeName, Boolean required) in C:\Users\ci\AppData\Local\Temp\PUBLISH8kiit\38_20171116T010915\autorest.modeler\src\SchemaBuilder.cs:line 131
   at AutoRest.Modeler.SchemaBuilder.BuildServiceType(String serviceTypeName, Boolean required) in C:\Users\ci\AppData\Local\Temp\PUBLISH8kiit\38_20171116T010915\autorest.modeler\src\SchemaBuilder.cs:line 131
   at AutoRest.Modeler.SwaggerModeler.BuildCompositeTypes() in C:\Users\ci\AppData\Local\Temp\PUBLISH8kiit\38_20171116T010915\autorest.modeler\src\SwaggerModeler.cs:line 271
   at AutoRest.Modeler.SwaggerModeler.Build(ServiceDefinition serviceDefinition) in C:\Users\ci\AppData\Local\Temp\PUBLISH8kiit\38_20171116T010915\autorest.modeler\src\SwaggerModeler.cs:line 66
   at AutoRest.Modeler.Program.<ProcessInternal>d__2.MoveNext() in C:\Users\ci\AppData\Local\Temp\PUBLISH8kiit\38_20171116T010915\autorest.modeler\src\Program.cs:line 60
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NewPlugin.<Process>d__15.MoveNext()
FATAL: go/imodeler1 - FAILED
FATAL: Error: Plugin imodeler1 reported failure.
Process() cancelled due to exception : Plugin imodeler1 reported failure.
Failure during batch task - {"tag":"package-2017-12"} -- Error: Plugin imodeler1 reported failure..
  Error: Plugin imodeler1 reported failure.

@gatneil gatneil requested a review from a user March 20, 2018 02:47
@AutorestCI
Copy link

AutorestCI commented Mar 20, 2018

Automation for azure-sdk-for-node

The initial PR has been merged into your service PR:
Azure/azure-sdk-for-node#2495

@AutorestCI
Copy link

AutorestCI commented Mar 20, 2018

Automation for azure-libraries-for-java

The initial PR has been merged into your service PR:
Azure/azure-libraries-for-java#273

@gatneil
Copy link
Contributor Author

gatneil commented Mar 20, 2018

@olydis thanks for your patience! How's it look now? :)

Copy link
Contributor

@olydis olydis left a comment

Choose a reason for hiding this comment

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

LGTM

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 Reviewed-FeedbackProvided
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants