-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
added missing Swagger #2428
Conversation
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: AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback Thanks for your co-operation. |
Automation for azure-sdk-for-pythonA 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: |
There was a problem hiding this 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", |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes thats correct
There was a problem hiding this comment.
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": [ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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" | ||
} | ||
} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please mark as readOnly
There was a problem hiding this comment.
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": { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix incoming
@ravbhatnagar some new operations; I already did a quick SDK-goggles run over it since it's not a lot of changes |
@ravbhatnagar ping |
Looks good! |
@gatneil ping |
Automation for azure-sdk-for-goA 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: |
@olydis sorry for the delay; thoughts on the latest and greatest? :) |
@AutorestCI rebuild azure-sdk-for-python |
There was a problem hiding this 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, |
There was a problem hiding this comment.
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
? 😃
There was a problem hiding this comment.
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 :)
@AutorestCI rebuild azure-sdk-for-python |
@AutorestCI rebuild azure-sdk-for-go |
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'] 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. |
Automation for azure-sdk-for-nodeThe initial PR has been merged into your service PR: |
Automation for azure-libraries-for-javaThe initial PR has been merged into your service PR: |
@olydis thanks for your patience! How's it look now? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.