Regenerate openapidocs at 1.21.8 to match ci (#84037)
* Regenerate openapidocs at 1.21.8 to match ci * Adjust trigger to work on the actual outputted files * Also put go.mod and go.sum in the triggers * manually fix * Make an arbitrary change rather than touching the trigger to force a run * Drop all triggers - run all the time * Print diff - taken from @papagian's PR * Manual fixes to swagger doc --------- Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
co-authored by
Ryan McKinley
parent
948c8c45d6
commit
7a171fd14a
+4
-10
@@ -1250,9 +1250,9 @@ steps:
|
||||
- make swagger-clean && make openapi3-gen
|
||||
- for f in public/api-merged.json public/openapi3.json; do git add $f; done
|
||||
- if [ -z "$(git diff --name-only --cached)" ]; then echo "Everything seems up to
|
||||
date!"; else echo "Please ensure the branch is up-to-date, then regenerate the
|
||||
specification by running make swagger-clean && make openapi3-gen" && return 1;
|
||||
fi
|
||||
date!"; else git diff --cached && echo "Please ensure the branch is up-to-date,
|
||||
then regenerate the specification by running make swagger-clean && make openapi3-gen"
|
||||
&& return 1; fi
|
||||
depends_on:
|
||||
- clone-enterprise
|
||||
environment:
|
||||
@@ -1263,12 +1263,6 @@ steps:
|
||||
trigger:
|
||||
event:
|
||||
- pull_request
|
||||
paths:
|
||||
exclude:
|
||||
- docs/**
|
||||
- '*.md'
|
||||
include:
|
||||
- pkg/**
|
||||
type: docker
|
||||
volumes:
|
||||
- host:
|
||||
@@ -4926,6 +4920,6 @@ kind: secret
|
||||
name: gcr_credentials
|
||||
---
|
||||
kind: signature
|
||||
hmac: 32b6ed2f5819225842aa94379423bcf4354dde154e91af3e293bc919594c10b9
|
||||
hmac: 2f4a5620d00189804c2facf65fa2a17b75883cf330cd32e5612a2f36d3712847
|
||||
|
||||
...
|
||||
|
||||
+1
-1
@@ -216,7 +216,7 @@ func (hs *HTTPServer) AlertTest(c *contextmodel.ReqContext) response.Response {
|
||||
|
||||
// swagger:route GET /alerts/{alert_id} legacy_alerts getAlertByID
|
||||
//
|
||||
// Get alert by ID.
|
||||
// Get alert by internal ID.
|
||||
//
|
||||
// “evalMatches” data in the response is cached in the db when and only when the state of the alert changes (e.g. transitioning from “ok” to “alerting” state).
|
||||
// If data from one server triggers the alert first and, before that server is seen leaving alerting state, a second server also enters a state that would trigger the alert, the second server will not be visible in “evalMatches” data.
|
||||
|
||||
@@ -1368,7 +1368,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"FrameType": {
|
||||
"description": "A FrameType string, when present in a frame's metadata, asserts that the\nframe's structure conforms to the FrameType's specification.\nThis property is currently optional, so FrameType may be FrameTypeUnknown even if the properties of\nthe Frame correspond to a defined FrameType.",
|
||||
"description": "A FrameType string, when present in a frame's metadata, asserts that the\nframe's structure conforms to the FrameType's specification.\nThis property is currently optional, so FrameType may be FrameTypeUnknown even if the properties of\nthe Frame correspond to a defined FrameType.\n+enum",
|
||||
"type": "string"
|
||||
},
|
||||
"FrameTypeVersion": {
|
||||
|
||||
@@ -1368,7 +1368,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"FrameType": {
|
||||
"description": "A FrameType string, when present in a frame's metadata, asserts that the\nframe's structure conforms to the FrameType's specification.\nThis property is currently optional, so FrameType may be FrameTypeUnknown even if the properties of\nthe Frame correspond to a defined FrameType.",
|
||||
"description": "A FrameType string, when present in a frame's metadata, asserts that the\nframe's structure conforms to the FrameType's specification.\nThis property is currently optional, so FrameType may be FrameTypeUnknown even if the properties of\nthe Frame correspond to a defined FrameType.\n+enum",
|
||||
"type": "string"
|
||||
},
|
||||
"FrameTypeVersion": {
|
||||
|
||||
@@ -4972,7 +4972,7 @@
|
||||
}
|
||||
},
|
||||
"FrameType": {
|
||||
"description": "A FrameType string, when present in a frame's metadata, asserts that the\nframe's structure conforms to the FrameType's specification.\nThis property is currently optional, so FrameType may be FrameTypeUnknown even if the properties of\nthe Frame correspond to a defined FrameType.",
|
||||
"description": "A FrameType string, when present in a frame's metadata, asserts that the\nframe's structure conforms to the FrameType's specification.\nThis property is currently optional, so FrameType may be FrameTypeUnknown even if the properties of\nthe Frame correspond to a defined FrameType.\n+enum",
|
||||
"type": "string"
|
||||
},
|
||||
"FrameTypeVersion": {
|
||||
|
||||
@@ -107,7 +107,7 @@ type SchedulerCfg struct {
|
||||
Log log.Logger
|
||||
}
|
||||
|
||||
// NewScheduler returns a new schedule.
|
||||
// NewScheduler returns a new scheduler.
|
||||
func NewScheduler(cfg SchedulerCfg, stateManager *state.Manager) *schedule {
|
||||
const minMaxAttempts = int64(1)
|
||||
if cfg.MaxAttempts < minMaxAttempts {
|
||||
|
||||
@@ -5959,7 +5959,7 @@
|
||||
"type": "object",
|
||||
"title": "QueryDataResponse contains the results from a QueryDataRequest.",
|
||||
"properties": {
|
||||
"Responses": {
|
||||
"results": {
|
||||
"$ref": "#/definitions/Responses"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2368,7 +2368,7 @@
|
||||
"tags": [
|
||||
"legacy_alerts"
|
||||
],
|
||||
"summary": "Get alert by ID.",
|
||||
"summary": "Get alert by internal ID.",
|
||||
"operationId": "getAlertByID",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -15287,7 +15287,7 @@
|
||||
}
|
||||
},
|
||||
"FrameType": {
|
||||
"description": "A FrameType string, when present in a frame's metadata, asserts that the\nframe's structure conforms to the FrameType's specification.\nThis property is currently optional, so FrameType may be FrameTypeUnknown even if the properties of\nthe Frame correspond to a defined FrameType.",
|
||||
"description": "A FrameType string, when present in a frame's metadata, asserts that the\nframe's structure conforms to the FrameType's specification.\nThis property is currently optional, so FrameType may be FrameTypeUnknown even if the properties of\nthe Frame correspond to a defined FrameType.\n+enum",
|
||||
"type": "string"
|
||||
},
|
||||
"FrameTypeVersion": {
|
||||
@@ -18459,7 +18459,7 @@
|
||||
"type": "object",
|
||||
"title": "QueryDataResponse contains the results from a QueryDataRequest.",
|
||||
"properties": {
|
||||
"Responses": {
|
||||
"results": {
|
||||
"$ref": "#/definitions/Responses"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5797,7 +5797,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"FrameType": {
|
||||
"description": "A FrameType string, when present in a frame's metadata, asserts that the\nframe's structure conforms to the FrameType's specification.\nThis property is currently optional, so FrameType may be FrameTypeUnknown even if the properties of\nthe Frame correspond to a defined FrameType.",
|
||||
"description": "A FrameType string, when present in a frame's metadata, asserts that the\nframe's structure conforms to the FrameType's specification.\nThis property is currently optional, so FrameType may be FrameTypeUnknown even if the properties of\nthe Frame correspond to a defined FrameType.\n+enum",
|
||||
"type": "string"
|
||||
},
|
||||
"FrameTypeVersion": {
|
||||
@@ -8967,7 +8967,7 @@
|
||||
"QueryDataResponse": {
|
||||
"description": "It is the return type of a QueryData call.",
|
||||
"properties": {
|
||||
"Responses": {
|
||||
"results": {
|
||||
"$ref": "#/components/schemas/Responses"
|
||||
}
|
||||
},
|
||||
@@ -15537,7 +15537,7 @@
|
||||
"$ref": "#/components/responses/internalServerError"
|
||||
}
|
||||
},
|
||||
"summary": "Get alert by ID.",
|
||||
"summary": "Get alert by internal ID.",
|
||||
"tags": [
|
||||
"legacy_alerts"
|
||||
]
|
||||
|
||||
@@ -145,7 +145,6 @@ def pr_pipelines():
|
||||
docs_pipelines(ver_mode, trigger_docs_pr()),
|
||||
shellcheck_pipeline(),
|
||||
swagger_gen(
|
||||
get_pr_trigger(include_paths = ["pkg/**"]),
|
||||
ver_mode,
|
||||
),
|
||||
integration_benchmarks(
|
||||
|
||||
@@ -33,14 +33,14 @@ def swagger_gen_step(ver_mode):
|
||||
"apk add --update git make",
|
||||
"make swagger-clean && make openapi3-gen",
|
||||
"for f in public/api-merged.json public/openapi3.json; do git add $f; done",
|
||||
'if [ -z "$(git diff --name-only --cached)" ]; then echo "Everything seems up to date!"; else echo "Please ensure the branch is up-to-date, then regenerate the specification by running make swagger-clean && make openapi3-gen" && return 1; fi',
|
||||
'if [ -z "$(git diff --name-only --cached)" ]; then echo "Everything seems up to date!"; else git diff --cached && echo "Please ensure the branch is up-to-date, then regenerate the specification by running make swagger-clean && make openapi3-gen" && return 1; fi',
|
||||
],
|
||||
"depends_on": [
|
||||
"clone-enterprise",
|
||||
],
|
||||
}
|
||||
|
||||
def swagger_gen(trigger, ver_mode, source = "${DRONE_SOURCE_BRANCH}"):
|
||||
def swagger_gen(ver_mode, source = "${DRONE_SOURCE_BRANCH}"):
|
||||
test_steps = [
|
||||
clone_enterprise_step_pr(source = source, canFail = True),
|
||||
swagger_gen_step(ver_mode = ver_mode),
|
||||
@@ -48,7 +48,9 @@ def swagger_gen(trigger, ver_mode, source = "${DRONE_SOURCE_BRANCH}"):
|
||||
|
||||
p = pipeline(
|
||||
name = "{}-swagger-gen".format(ver_mode),
|
||||
trigger = trigger,
|
||||
trigger = {
|
||||
"event": ["pull_request"],
|
||||
},
|
||||
services = [],
|
||||
steps = test_steps,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user