Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add annotations array to schedule terraform requests #60

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
230 changes: 147 additions & 83 deletions internal/apischema/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2738,11 +2738,11 @@
"/v2/schedule_entries": {
"get": {
"tags": [
"Schedule Entries V2"
"Schedules V2"
],
"summary": "List Schedule Entries V2",
"summary": "ListScheduleEntries Schedules V2",
"description": "Get a list of schedule entries.",
"operationId": "Schedule Entries V2#List",
"operationId": "Schedules V2#ListScheduleEntries",
"parameters": [
{
"name": "schedule_id",
Expand Down Expand Up @@ -2772,7 +2772,7 @@
"200": {
"description": "OK response.",
"schema": {
"$ref": "#/definitions/ScheduleEntriesV2ListResponseBody",
"$ref": "#/definitions/SchedulesV2ListScheduleEntriesResponseBody",
"required": [
"schedule_entries"
]
Expand Down Expand Up @@ -2919,6 +2919,7 @@
"timezone",
"external_provider",
"external_provider_id",
"annotations",
"created_at",
"updated_at"
]
Expand Down Expand Up @@ -17718,7 +17719,9 @@
"catalog_editor",
"incident_memberships_editor",
"schedules_editor",
"schedules_reader"
"schedules_reader",
"workflows_editor",
"private_workflows_editor"
]
},
"description": "Which roles have been enabled for this key",
Expand Down Expand Up @@ -22862,6 +22865,17 @@
"title": "ScheduleCreatePayloadV2RequestBody",
"type": "object",
"properties": {
"annotations": {
"type": "object",
"description": "Annotations that can track metadata about the schedule",
"example": {
"incident.io/terraform/version": "version-of-terraform"
},
"additionalProperties": {
"type": "string",
"example": "abc123"
}
},
"config": {
"$ref": "#/definitions/ScheduleConfigCreatePayloadV2RequestBody"
},
Expand All @@ -22877,6 +22891,9 @@
}
},
"example": {
"annotations": {
"incident.io/terraform/version": "version-of-terraform"
},
"config": {
"rotations": [
{
Expand Down Expand Up @@ -23050,80 +23067,6 @@
"final"
]
},
"ScheduleEntriesV2ListResponseBody": {
"title": "ScheduleEntriesV2ListResponseBody",
"type": "object",
"properties": {
"pagination_meta": {
"$ref": "#/definitions/AfterPaginationMetaResultV2ResponseBody"
},
"schedule_entries": {
"$ref": "#/definitions/ScheduleEntriesListPayloadV2ResponseBody"
}
},
"example": {
"pagination_meta": {
"after": "abc123",
"after_url": "abc123"
},
"schedule_entries": {
"final": [
{
"end_at": "2021-08-17T13:28:57.801578Z",
"entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH",
"fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH",
"layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH",
"rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH",
"start_at": "2021-08-17T13:28:57.801578Z",
"user": {
"email": "lisa@incident.io",
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"name": "Lisa Karlin Curtis",
"role": "viewer",
"slack_user_id": "U02AYNF2XJM"
}
}
],
"overrides": [
{
"end_at": "2021-08-17T13:28:57.801578Z",
"entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH",
"fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH",
"layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH",
"rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH",
"start_at": "2021-08-17T13:28:57.801578Z",
"user": {
"email": "lisa@incident.io",
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"name": "Lisa Karlin Curtis",
"role": "viewer",
"slack_user_id": "U02AYNF2XJM"
}
}
],
"scheduled": [
{
"end_at": "2021-08-17T13:28:57.801578Z",
"entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH",
"fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH",
"layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH",
"rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH",
"start_at": "2021-08-17T13:28:57.801578Z",
"user": {
"email": "lisa@incident.io",
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"name": "Lisa Karlin Curtis",
"role": "viewer",
"slack_user_id": "U02AYNF2XJM"
}
}
]
}
},
"required": [
"schedule_entries"
]
},
"ScheduleEntryV2ResponseBody": {
"title": "ScheduleEntryV2ResponseBody",
"type": "object",
Expand Down Expand Up @@ -23757,6 +23700,17 @@
"title": "ScheduleUpdatePayloadV2RequestBody",
"type": "object",
"properties": {
"annotations": {
"type": "object",
"description": "Annotations that can track metadata about the schedule",
"example": {
"incident.io/terraform/version": "version-of-terraform"
},
"additionalProperties": {
"type": "string",
"example": "abc123"
}
},
"config": {
"$ref": "#/definitions/ScheduleConfigUpdatePayloadV2RequestBody"
},
Expand All @@ -23772,6 +23726,9 @@
}
},
"example": {
"annotations": {
"incident.io/terraform/version": "version-of-terraform"
},
"config": {
"rotations": [
{
Expand Down Expand Up @@ -23816,6 +23773,17 @@
"title": "ScheduleV2ResponseBody",
"type": "object",
"properties": {
"annotations": {
"type": "object",
"description": "Annotations that can track metadata about this schedule",
"example": {
"incident.io/terraform/version": "version-of-terraform"
},
"additionalProperties": {
"type": "string",
"example": "abc123"
}
},
"config": {
"$ref": "#/definitions/ScheduleConfigV2ResponseBody"
},
Expand Down Expand Up @@ -23870,6 +23838,9 @@
}
},
"example": {
"annotations": {
"incident.io/terraform/version": "version-of-terraform"
},
"config": {
"rotations": [
{
Expand Down Expand Up @@ -23937,6 +23908,7 @@
"timezone",
"external_provider",
"external_provider_id",
"annotations",
"created_at",
"updated_at"
]
Expand All @@ -23951,6 +23923,9 @@
},
"example": {
"schedule": {
"annotations": {
"incident.io/terraform/version": "version-of-terraform"
},
"config": {
"rotations": [
{
Expand Down Expand Up @@ -24005,6 +23980,9 @@
},
"example": {
"schedule": {
"annotations": {
"incident.io/terraform/version": "version-of-terraform"
},
"config": {
"rotations": [
{
Expand Down Expand Up @@ -24085,6 +24063,9 @@
},
"example": [
{
"annotations": {
"incident.io/terraform/version": "version-of-terraform"
},
"config": {
"rotations": [
{
Expand Down Expand Up @@ -24157,6 +24138,9 @@
},
"schedules": [
{
"annotations": {
"incident.io/terraform/version": "version-of-terraform"
},
"config": {
"rotations": [
{
Expand Down Expand Up @@ -24224,6 +24208,80 @@
"schedules"
]
},
"SchedulesV2ListScheduleEntriesResponseBody": {
"title": "SchedulesV2ListScheduleEntriesResponseBody",
"type": "object",
"properties": {
"pagination_meta": {
"$ref": "#/definitions/AfterPaginationMetaResultV2ResponseBody"
},
"schedule_entries": {
"$ref": "#/definitions/ScheduleEntriesListPayloadV2ResponseBody"
}
},
"example": {
"pagination_meta": {
"after": "abc123",
"after_url": "abc123"
},
"schedule_entries": {
"final": [
{
"end_at": "2021-08-17T13:28:57.801578Z",
"entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH",
"fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH",
"layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH",
"rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH",
"start_at": "2021-08-17T13:28:57.801578Z",
"user": {
"email": "lisa@incident.io",
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"name": "Lisa Karlin Curtis",
"role": "viewer",
"slack_user_id": "U02AYNF2XJM"
}
}
],
"overrides": [
{
"end_at": "2021-08-17T13:28:57.801578Z",
"entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH",
"fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH",
"layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH",
"rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH",
"start_at": "2021-08-17T13:28:57.801578Z",
"user": {
"email": "lisa@incident.io",
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"name": "Lisa Karlin Curtis",
"role": "viewer",
"slack_user_id": "U02AYNF2XJM"
}
}
],
"scheduled": [
{
"end_at": "2021-08-17T13:28:57.801578Z",
"entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH",
"fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH",
"layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH",
"rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH",
"start_at": "2021-08-17T13:28:57.801578Z",
"user": {
"email": "lisa@incident.io",
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"name": "Lisa Karlin Curtis",
"role": "viewer",
"slack_user_id": "U02AYNF2XJM"
}
}
]
}
},
"required": [
"schedule_entries"
]
},
"SchedulesV2ShowResponseBody": {
"title": "SchedulesV2ShowResponseBody",
"type": "object",
Expand All @@ -24234,6 +24292,9 @@
},
"example": {
"schedule": {
"annotations": {
"incident.io/terraform/version": "version-of-terraform"
},
"config": {
"rotations": [
{
Expand Down Expand Up @@ -24310,6 +24371,9 @@
},
"example": {
"schedule": {
"annotations": {
"incident.io/terraform/version": "version-of-terraform"
},
"config": {
"rotations": [
{
Expand Down Expand Up @@ -24356,6 +24420,7 @@
"timezone",
"external_provider",
"external_provider_id",
"annotations",
"created_at",
"updated_at"
]
Expand All @@ -24370,6 +24435,9 @@
},
"example": {
"schedule": {
"annotations": {
"incident.io/terraform/version": "version-of-terraform"
},
"config": {
"rotations": [
{
Expand Down Expand Up @@ -27020,10 +27088,6 @@
"name": "Incidents V2",
"description": "Create and read incidents.\n\nIncidents are a core resource, on which many other resources (actions, etc) are created.\n\nCare should be taken around these endpoints, as automation that creates duplicate\nincidents can be distracting, and impact reporting.\n"
},
{
"name": "Schedule Entries V2",
"description": "\nBeta: List your historic and future schedule entries.\n"
},
{
"name": "Schedules V2",
"description": "Beta: \nView and manage schedules.\nManage your full schedule of on-call rotations, including the users and rotation configuration.\n"
Expand Down
Loading
Loading