-
Notifications
You must be signed in to change notification settings - Fork 440
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow parsing nested JSON responses V3 (#3015)
* Modify helpers so JSON responses can be deserialized correctly * Added explicit contract for responses * Enforce the expectation that status is of type DeployStatus?
- Loading branch information
1 parent
45ee637
commit f181eda
Showing
3 changed files
with
61 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
using System; | ||
using Newtonsoft.Json; | ||
|
||
namespace Azure.Functions.Cli.Models | ||
{ | ||
[JsonObject] | ||
public class DeploymentLogResponse | ||
{ | ||
[JsonProperty("log_time")] | ||
public DateTime LogTime { get; set; } | ||
|
||
[JsonProperty("message")] | ||
public string Message { get; set; } | ||
|
||
[JsonProperty("details_url")] | ||
public string DetailsUrlString { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
using System; | ||
using Newtonsoft.Json; | ||
using Azure.Functions.Cli.Common; | ||
|
||
namespace Azure.Functions.Cli.Models | ||
{ | ||
[JsonObject] | ||
public class DeploymentResponse | ||
{ | ||
[JsonProperty("id")] | ||
public string Id { get; set; } | ||
|
||
[JsonProperty("status")] | ||
public DeployStatus? Status { get; set; } | ||
} | ||
} |