Prediction/Commands Service API v2 updates#13767
Prediction/Commands Service API v2 updates#13767wyunchi-ms merged 5 commits intoAzure:masterfrom jjaguirre394:apiv2-updates
Conversation
|
Thank you for your contribution jjaguirre394! We will review the pull request and get back to you soon. |
tools/Az.Tools.Predictor/Az.Tools.Predictor.Test/Mocks/MockAzPredictorService.cs
Outdated
Show resolved
Hide resolved
| // limitations under the License. | ||
| // ---------------------------------------------------------------------------------- | ||
|
|
||
| using Newtonsoft.Json; |
There was a problem hiding this comment.
Can you convert to use the built-in json serialization https://docs.microsoft.com/en-us/dotnet/standard/serialization/system-text-json-how-to?pivots=dotnet-5-0
You can find the default option for deserialization here https://github.com/Azure/azure-powershell/blob/master/tools/Az.Tools.Predictor/Az.Tools.Predictor/Utilities/JsonUtilities.cs
There was a problem hiding this comment.
Is there a reason we use the built-in json serialization over the Newtonsoft one? I ask because it seems the built-in version wasn't able to parse the string into the objects I had defined. I'm sure it is possible but I found that the Newtonsoft library was able to do it without any issue. If we really don't want to have a dependency on this library, I can find out how to do this using the built-in version.
tools/Az.Tools.Predictor/Az.Tools.Predictor/AzPredictorService.cs
Outdated
Show resolved
Hide resolved
tools/Az.Tools.Predictor/Az.Tools.Predictor/AzPredictorService.cs
Outdated
Show resolved
Hide resolved
tools/Az.Tools.Predictor/Az.Tools.Predictor/AzPredictorService.cs
Outdated
Show resolved
Hide resolved
tools/Az.Tools.Predictor/Az.Tools.Predictor/CommandLinePredictor.cs
Outdated
Show resolved
Hide resolved
tools/Az.Tools.Predictor/Az.Tools.Predictor/PredictiveCommand.cs
Outdated
Show resolved
Hide resolved
tools/Az.Tools.Predictor/Az.Tools.Predictor/AzPredictorService.cs
Outdated
Show resolved
Hide resolved
tools/Az.Tools.Predictor/Az.Tools.Predictor/PredictiveCommand.cs
Outdated
Show resolved
Hide resolved
- Removed unnecessary usings - Added copyright - Misc. code clean up
Description
The Aladdin service is releasing v2 API endpoints to allow for version support of the Predictions and Commands endpoints. This would allow this Powershell client to query the model for predictions based on the module version.
Checklist
CONTRIBUTING.mdChangeLog.mdfile(s) has been updated:ChangeLog.mdfile can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md## Upcoming Releaseheader -- no new version header should be added