Skip to content

Commit 40f81d4

Browse files
chore: add grad rollouts to webapi
1 parent 2007196 commit 40f81d4

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

apps/api/openapi/openapi.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,27 @@
418418
},
419419
"type": "object"
420420
},
421+
"GradualRolloutRule": {
422+
"properties": {
423+
"id": {
424+
"type": "string"
425+
},
426+
"policyId": {
427+
"type": "string"
428+
},
429+
"timeScaleInterval": {
430+
"format": "int32",
431+
"minimum": 0,
432+
"type": "integer"
433+
}
434+
},
435+
"required": [
436+
"id",
437+
"policyId",
438+
"timeScaleInterval"
439+
],
440+
"type": "object"
441+
},
421442
"IntegerValue": {
422443
"type": "integer"
423444
},
@@ -690,6 +711,9 @@
690711
"environmentProgression": {
691712
"$ref": "#/components/schemas/EnvironmentProgressionRule"
692713
},
714+
"gradualRollout": {
715+
"$ref": "#/components/schemas/GradualRolloutRule"
716+
},
693717
"id": {
694718
"type": "string"
695719
},

apps/api/openapi/schemas/policies.jsonnet

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ local openapi = import '../lib/openapi.libsonnet';
7272
createdAt: { type: 'string' },
7373
anyApproval: openapi.schemaRef('AnyApprovalRule'),
7474
environmentProgression: openapi.schemaRef('EnvironmentProgressionRule'),
75+
gradualRollout: openapi.schemaRef('GradualRolloutRule'),
7576
},
7677
},
7778

@@ -110,4 +111,14 @@ local openapi = import '../lib/openapi.libsonnet';
110111
minApprovals: { type: 'integer', format: 'int32' },
111112
},
112113
},
114+
115+
GradualRolloutRule: {
116+
type: 'object',
117+
required: ['id', 'policyId', 'timeScaleInterval'],
118+
properties: {
119+
id: { type: 'string' },
120+
policyId: { type: 'string' },
121+
timeScaleInterval: { type: 'integer', format: 'int32', minimum: 0 },
122+
},
123+
},
113124
}

apps/api/src/types/openapi.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,12 @@ export interface components {
623623
/** @example Workspace not found */
624624
error?: string;
625625
};
626+
GradualRolloutRule: {
627+
id: string;
628+
policyId: string;
629+
/** Format: int32 */
630+
timeScaleInterval: number;
631+
};
626632
IntegerValue: number;
627633
Job: {
628634
/** Format: date-time */
@@ -694,6 +700,7 @@ export interface components {
694700
anyApproval?: components["schemas"]["AnyApprovalRule"];
695701
createdAt: string;
696702
environmentProgression?: components["schemas"]["EnvironmentProgressionRule"];
703+
gradualRollout?: components["schemas"]["GradualRolloutRule"];
697704
id: string;
698705
policyId: string;
699706
};

0 commit comments

Comments
 (0)