vishesh92 opened a new pull request, #118: URL: https://github.com/apache/cloudstack-go/pull/118
Ref: https://github.com/apache/cloudstack-terraform-provider/pull/158#pullrequestreview-3172189779 This pull request improves the handling and code generation for parameters that require specific indexing formats in CloudStack API requests. The main changes address how map parameters are serialized, especially for commands and parameters that use zero-based indexing or require explicit index variables. **Improvements to parameter indexing logic:** * Added `updateVirtualMachine` to the `detailsRequireZeroIndex` map, ensuring its `details` parameter uses zero-based indexing in generated code. * Introduced a new `parametersRequireIndexing` map to track parameters that always need index variables, even if the command uses zero indexing. **Adjustments to code generation:** * Updated the code generation logic in `generateConvertCode` to use index variables only when required by the new maps, improving accuracy for map parameter serialization. * Refined the conditional logic for formatting key-value pairs, ensuring zero-based indexing is only applied when appropriate, and index variables are used when needed. **Bug fix in VM update parameter serialization:** * Fixed the `UpdateVirtualMachineParams.toURLValues` method to always use zero-based indexing for the `details` parameter, aligning with API expectations. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
