Skip to content

Commit

Permalink
Fix mockgenerator schema (microsoft#424)
Browse files Browse the repository at this point in the history
  • Loading branch information
waldekmastykarz authored Dec 18, 2023
1 parent 7c77fd1 commit a1785c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dev-proxy-plugins/MockResponses/MockResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class MockResponse {
public string Url { get; set; } = string.Empty;
[JsonPropertyName("method")]
public string Method { get; set; } = "GET";
[JsonPropertyName("nth")]
[JsonPropertyName("nth"), JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? Nth { get; set; }
[JsonPropertyName("responseCode")]
public int? ResponseCode { get; set; } = 200;
Expand Down
2 changes: 2 additions & 0 deletions dev-proxy-plugins/MockResponses/MockResponsePlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public class MockResponseConfiguration {
[JsonIgnore]
public bool BlockUnmockedRequests { get; set; } = false;

[JsonPropertyName("$schema")]
public string Schema { get; set; } = "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v1.0/responses.schema.json";
[JsonPropertyName("responses")]
public IEnumerable<MockResponse> Responses { get; set; } = Array.Empty<MockResponse>();
}
Expand Down

0 comments on commit a1785c9

Please sign in to comment.