Skip to content

Commit 24316d4

Browse files
github-actions[bot]github-actions[bot]
andauthored
Update client (#14)
Co-authored-by: github-actions[bot] <github-actions-bot@users.noreply.github.com>
1 parent cd2a618 commit 24316d4

18 files changed

Lines changed: 398 additions & 204 deletions

api/openapi.yaml

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2120,9 +2120,14 @@ paths:
21202120
content:
21212121
application/json:
21222122
schema:
2123-
type: object
2124-
description: Bad request from client. Could be api.ErrorInvalidRequestExample
2125-
or dto.SaveTriggerResponse
2123+
$ref: "#/components/schemas/api.ErrorResponse"
2124+
description: Bad request from client
2125+
"418":
2126+
content:
2127+
application/json:
2128+
schema:
2129+
$ref: "#/components/schemas/dto.SaveTriggerResponse"
2130+
description: Target Validation failed
21262131
"422":
21272132
content:
21282133
application/json:
@@ -2270,6 +2275,12 @@ paths:
22702275
schema:
22712276
$ref: "#/components/schemas/api.ErrorResponse"
22722277
description: Resource not found
2278+
"418":
2279+
content:
2280+
application/json:
2281+
schema:
2282+
$ref: "#/components/schemas/dto.SaveTriggerResponse"
2283+
description: Target Validation failed
22732284
"422":
22742285
content:
22752286
application/json:
@@ -3283,6 +3294,7 @@ components:
32833294
example: devops@example.com
32843295
type: string
32853296
required:
3297+
- id
32863298
- type
32873299
- value
32883300
dto.ContactEventItem:
@@ -3312,6 +3324,9 @@ components:
33123324
- trigger_id
33133325
dto.ContactEventItemList:
33143326
example:
3327+
total: 10
3328+
size: 100
3329+
page: 0
33153330
list:
33163331
- metric: metric
33173332
trigger_id: trigger_id
@@ -3329,8 +3344,23 @@ components:
33293344
$ref: "#/components/schemas/dto.ContactEventItem"
33303345
type: array
33313346
uniqueItems: false
3347+
page:
3348+
example: 0
3349+
format: int64
3350+
type: integer
3351+
size:
3352+
example: 100
3353+
format: int64
3354+
type: integer
3355+
total:
3356+
example: 10
3357+
format: int64
3358+
type: integer
33323359
required:
33333360
- list
3361+
- page
3362+
- size
3363+
- total
33343364
dto.ContactList:
33353365
example:
33363366
list:
@@ -3393,6 +3423,7 @@ components:
33933423
type: string
33943424
required:
33953425
- events_count
3426+
- id
33963427
- type
33973428
- value
33983429
dto.ContactNoisinessList:
@@ -3501,6 +3532,7 @@ components:
35013532
example: devops@example.com
35023533
type: string
35033534
required:
3535+
- id
35043536
- type
35053537
- value
35063538
dto.EventsList:
@@ -3579,6 +3611,9 @@ components:
35793611
type: string
35803612
required:
35813613
- message
3614+
dto.MetricsMaintenance:
3615+
additionalProperties:
3616+
type: integer
35823617
dto.NotificationDeleteResponse:
35833618
example:
35843619
result: 0
@@ -4525,6 +4560,7 @@ components:
45254560
example: devops@example.com
45264561
type: string
45274562
required:
4563+
- id
45284564
- type
45294565
- value
45304566
dto.TeamContactWithScore:
@@ -4568,6 +4604,7 @@ components:
45684604
example: devops@example.com
45694605
type: string
45704606
required:
4607+
- id
45714608
- type
45724609
- value
45734610
dto.TeamMembers:
@@ -4600,7 +4637,6 @@ components:
46004637
example: Infrastructure Team
46014638
type: string
46024639
required:
4603-
- description
46044640
- id
46054641
- name
46064642
dto.TeamSettings:

docs/apis/TriggerApi.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ No authorization required
5656
| Status code | Description | Response headers |
5757
|-------------|-------------|------------------|
5858
| **200** | Trigger created successfully | - |
59-
| **400** | Bad request from client. Could be api.ErrorInvalidRequestExample or dto.SaveTriggerResponse | - |
59+
| **400** | Bad request from client | - |
60+
| **418** | Target Validation failed | - |
6061
| **422** | Render error | - |
6162
| **500** | Internal server error | - |
6263
| **503** | Remote server unavailable | - |
@@ -739,6 +740,7 @@ No authorization required
739740
| **200** | Updated trigger | - |
740741
| **400** | Bad request from client | - |
741742
| **404** | Resource not found | - |
743+
| **418** | Target Validation failed | - |
742744
| **422** | Render error | - |
743745
| **500** | Internal server error | - |
744746
| **503** | Remote server unavailable | - |

docs/models/DtoContact.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7+
**Id** | **string** | |
78
**Type** | **string** | |
89
**Value** | **string** | |
910
**ExtraMessage** | **string** | | [optional]
10-
**Id** | **string** | | [optional]
1111
**Name** | **string** | | [optional]
1212
**TeamId** | **string** | | [optional]
1313
**User** | **string** | | [optional]

docs/models/DtoContactEventItemList.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**List** | [**List&lt;DtoContactEventItem&gt;**](DtoContactEventItem.md) | |
8+
**Page** | **long** | |
9+
**Size** | **long** | |
10+
**Total** | **long** | |
811

912
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
1013

docs/models/DtoContactNoisiness.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**EventsCount** | **int** | EventsCount for the contact. |
8+
**Id** | **string** | |
89
**Type** | **string** | |
910
**Value** | **string** | |
1011
**ExtraMessage** | **string** | | [optional]
11-
**Id** | **string** | | [optional]
1212
**Name** | **string** | | [optional]
1313
**TeamId** | **string** | | [optional]
1414
**User** | **string** | | [optional]

docs/models/DtoContactWithScore.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7+
**Id** | **string** | |
78
**Type** | **string** | |
89
**Value** | **string** | |
910
**ExtraMessage** | **string** | | [optional]
10-
**Id** | **string** | | [optional]
1111
**Name** | **string** | | [optional]
1212
**Score** | [**DtoContactScore**](DtoContactScore.md) | | [optional]
1313
**TeamId** | **string** | | [optional]

docs/models/DtoTeamContact.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7+
**Id** | **string** | |
78
**Type** | **string** | |
89
**Value** | **string** | |
910
**ExtraMessage** | **string** | | [optional]
10-
**Id** | **string** | | [optional]
1111
**Name** | **string** | | [optional]
1212
**Team** | **string** | This field is deprecated | [optional]
1313
**TeamId** | **string** | | [optional]

docs/models/DtoTeamContactWithScore.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7+
**Id** | **string** | |
78
**Type** | **string** | |
89
**Value** | **string** | |
910
**ExtraMessage** | **string** | | [optional]
10-
**Id** | **string** | | [optional]
1111
**Name** | **string** | | [optional]
1212
**Score** | [**DtoContactScore**](DtoContactScore.md) | | [optional]
1313
**Team** | **string** | This field is deprecated | [optional]

docs/models/DtoTeamModel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**Description** | **string** | |
87
**Id** | **string** | |
98
**Name** | **string** | |
9+
**Description** | **string** | | [optional]
1010

1111
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
1212

src/Moira.ApiClient/Api/TriggerApi.cs

Lines changed: 93 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ public interface ITriggerApi : IApi
520520
/// <summary>
521521
/// The <see cref="ICreateTriggerApiResponse"/>
522522
/// </summary>
523-
public interface ICreateTriggerApiResponse : Moira.ApiClient.Client.IApiResponse, IOk<Moira.ApiClient.Model.DtoSaveTriggerResponse>, IBadRequest<Object>, IUnprocessableContent<Moira.ApiClient.Model.ApiErrorResponse>, IInternalServerError<Moira.ApiClient.Model.ApiErrorResponse>, IServiceUnavailable<Moira.ApiClient.Model.ApiErrorResponse>
523+
public interface ICreateTriggerApiResponse : Moira.ApiClient.Client.IApiResponse, IOk<Moira.ApiClient.Model.DtoSaveTriggerResponse>, IBadRequest<Moira.ApiClient.Model.ApiErrorResponse>, ICustomHttpStatusCode418<Moira.ApiClient.Model.DtoSaveTriggerResponse>, IUnprocessableContent<Moira.ApiClient.Model.ApiErrorResponse>, IInternalServerError<Moira.ApiClient.Model.ApiErrorResponse>, IServiceUnavailable<Moira.ApiClient.Model.ApiErrorResponse>
524524
{
525525
/// <summary>
526526
/// Returns true if the response is 200 Ok
@@ -534,6 +534,12 @@ public interface ICreateTriggerApiResponse : Moira.ApiClient.Client.IApiResponse
534534
/// <returns></returns>
535535
bool IsBadRequest { get; }
536536

537+
/// <summary>
538+
/// Returns true if the response is 418 CustomHttpStatusCode418
539+
/// </summary>
540+
/// <returns></returns>
541+
bool IsCustomHttpStatusCode418 { get; }
542+
537543
/// <summary>
538544
/// Returns true if the response is 422 UnprocessableContent
539545
/// </summary>
@@ -1042,7 +1048,7 @@ public interface ITriggerCheckApiResponse : Moira.ApiClient.Client.IApiResponse,
10421048
/// <summary>
10431049
/// The <see cref="IUpdateTriggerApiResponse"/>
10441050
/// </summary>
1045-
public interface IUpdateTriggerApiResponse : Moira.ApiClient.Client.IApiResponse, IOk<Moira.ApiClient.Model.DtoSaveTriggerResponse>, IBadRequest<Moira.ApiClient.Model.ApiErrorResponse>, INotFound<Moira.ApiClient.Model.ApiErrorResponse>, IUnprocessableContent<Moira.ApiClient.Model.ApiErrorResponse>, IInternalServerError<Moira.ApiClient.Model.ApiErrorResponse>, IServiceUnavailable<Moira.ApiClient.Model.ApiErrorResponse>
1051+
public interface IUpdateTriggerApiResponse : Moira.ApiClient.Client.IApiResponse, IOk<Moira.ApiClient.Model.DtoSaveTriggerResponse>, IBadRequest<Moira.ApiClient.Model.ApiErrorResponse>, INotFound<Moira.ApiClient.Model.ApiErrorResponse>, ICustomHttpStatusCode418<Moira.ApiClient.Model.DtoSaveTriggerResponse>, IUnprocessableContent<Moira.ApiClient.Model.ApiErrorResponse>, IInternalServerError<Moira.ApiClient.Model.ApiErrorResponse>, IServiceUnavailable<Moira.ApiClient.Model.ApiErrorResponse>
10461052
{
10471053
/// <summary>
10481054
/// Returns true if the response is 200 Ok
@@ -1062,6 +1068,12 @@ public interface IUpdateTriggerApiResponse : Moira.ApiClient.Client.IApiResponse
10621068
/// <returns></returns>
10631069
bool IsNotFound { get; }
10641070

1071+
/// <summary>
1072+
/// Returns true if the response is 418 CustomHttpStatusCode418
1073+
/// </summary>
1074+
/// <returns></returns>
1075+
bool IsCustomHttpStatusCode418 { get; }
1076+
10651077
/// <summary>
10661078
/// Returns true if the response is 422 UnprocessableContent
10671079
/// </summary>
@@ -1750,11 +1762,11 @@ public bool TryOk(out Moira.ApiClient.Model.DtoSaveTriggerResponse result)
17501762
/// Deserializes the response if the response is 400 BadRequest
17511763
/// </summary>
17521764
/// <returns></returns>
1753-
public Object BadRequest()
1765+
public Moira.ApiClient.Model.ApiErrorResponse BadRequest()
17541766
{
17551767
// This logic may be modified with the AsModel.mustache template
17561768
return IsBadRequest
1757-
? System.Text.Json.JsonSerializer.Deserialize<Object>(RawContent, _jsonSerializerOptions)
1769+
? System.Text.Json.JsonSerializer.Deserialize<Moira.ApiClient.Model.ApiErrorResponse>(RawContent, _jsonSerializerOptions)
17581770
: default;
17591771
}
17601772

@@ -1763,7 +1775,7 @@ public Object BadRequest()
17631775
/// </summary>
17641776
/// <param name="result"></param>
17651777
/// <returns></returns>
1766-
public bool TryBadRequest(out Object result)
1778+
public bool TryBadRequest(out Moira.ApiClient.Model.ApiErrorResponse result)
17671779
{
17681780
result = null;
17691781

@@ -1778,6 +1790,44 @@ public bool TryBadRequest(out Object result)
17781790
return result != null;
17791791
}
17801792

1793+
/// <summary>
1794+
/// Returns true if the response is 418 CustomHttpStatusCode418
1795+
/// </summary>
1796+
/// <returns></returns>
1797+
public bool IsCustomHttpStatusCode418 => 418 == (int)StatusCode;
1798+
1799+
/// <summary>
1800+
/// Deserializes the response if the response is 418 CustomHttpStatusCode418
1801+
/// </summary>
1802+
/// <returns></returns>
1803+
public Moira.ApiClient.Model.DtoSaveTriggerResponse CustomHttpStatusCode418()
1804+
{
1805+
// This logic may be modified with the AsModel.mustache template
1806+
return IsCustomHttpStatusCode418
1807+
? System.Text.Json.JsonSerializer.Deserialize<Moira.ApiClient.Model.DtoSaveTriggerResponse>(RawContent, _jsonSerializerOptions)
1808+
: default;
1809+
}
1810+
1811+
/// <summary>
1812+
/// Returns true if the response is 418 CustomHttpStatusCode418 and the deserialized response is not null
1813+
/// </summary>
1814+
/// <param name="result"></param>
1815+
/// <returns></returns>
1816+
public bool TryCustomHttpStatusCode418(out Moira.ApiClient.Model.DtoSaveTriggerResponse result)
1817+
{
1818+
result = null;
1819+
1820+
try
1821+
{
1822+
result = CustomHttpStatusCode418();
1823+
} catch (Exception e)
1824+
{
1825+
OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode)418);
1826+
}
1827+
1828+
return result != null;
1829+
}
1830+
17811831
/// <summary>
17821832
/// Returns true if the response is 422 UnprocessableContent
17831833
/// </summary>
@@ -7931,6 +7981,44 @@ public bool TryNotFound(out Moira.ApiClient.Model.ApiErrorResponse result)
79317981
return result != null;
79327982
}
79337983

7984+
/// <summary>
7985+
/// Returns true if the response is 418 CustomHttpStatusCode418
7986+
/// </summary>
7987+
/// <returns></returns>
7988+
public bool IsCustomHttpStatusCode418 => 418 == (int)StatusCode;
7989+
7990+
/// <summary>
7991+
/// Deserializes the response if the response is 418 CustomHttpStatusCode418
7992+
/// </summary>
7993+
/// <returns></returns>
7994+
public Moira.ApiClient.Model.DtoSaveTriggerResponse CustomHttpStatusCode418()
7995+
{
7996+
// This logic may be modified with the AsModel.mustache template
7997+
return IsCustomHttpStatusCode418
7998+
? System.Text.Json.JsonSerializer.Deserialize<Moira.ApiClient.Model.DtoSaveTriggerResponse>(RawContent, _jsonSerializerOptions)
7999+
: default;
8000+
}
8001+
8002+
/// <summary>
8003+
/// Returns true if the response is 418 CustomHttpStatusCode418 and the deserialized response is not null
8004+
/// </summary>
8005+
/// <param name="result"></param>
8006+
/// <returns></returns>
8007+
public bool TryCustomHttpStatusCode418(out Moira.ApiClient.Model.DtoSaveTriggerResponse result)
8008+
{
8009+
result = null;
8010+
8011+
try
8012+
{
8013+
result = CustomHttpStatusCode418();
8014+
} catch (Exception e)
8015+
{
8016+
OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode)418);
8017+
}
8018+
8019+
return result != null;
8020+
}
8021+
79348022
/// <summary>
79358023
/// Returns true if the response is 422 UnprocessableContent
79368024
/// </summary>

0 commit comments

Comments
 (0)