Swagger: Fix circular reference (#62673)

* Swagger: Fix circular reference

* gitignore intermediate swagger file

* Update specs

* Do not generate specs when building the backend
pull/62760/head
Sofia Papagiannaki 2 years ago committed by GitHub
parent adaf82ffb7
commit 29d3e696f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .github/CODEOWNERS
  2. 3
      .gitignore
  3. 1
      .prettierignore
  4. 2
      Dockerfile
  5. 3
      Makefile
  6. 6
      public/api-merged.json
  7. 16508
      public/api-spec.json
  8. 6
      public/openapi3.json

@ -438,7 +438,6 @@ lerna.json @grafana/frontend-ops
/public/app/features/explore/TraceView/ @grafana/observability-traces-and-profiling
/public/api-merged.json @grafana/backend-platform
/public/api-spec.json @grafana/backend-platform
/public/openapi3.json @grafana/backend-platform
/public/app/angular/ @torkelo
/public/app/app.ts @grafana/frontend-ops

3
.gitignore vendored

@ -181,6 +181,9 @@ public/locales/_build/
public/locales/*/*.js
public/locales/*/grafana_old.json
# Auto-generated swagger intermediate file
public/api-spec.json
deployment_tools_config.json
.betterer.cache

@ -27,7 +27,6 @@ theme.light.generated.json
theme.dark.generated.json
# Generated Swagger API specs
public/api-spec.json
public/api-merged.json
public/openapi3.json

@ -49,7 +49,7 @@ COPY cue.mod cue.mod
COPY kinds kinds
COPY packages/grafana-schema packages/grafana-schema
COPY public/app/plugins public/app/plugins
COPY public/api-spec.json public/api-spec.json
COPY public/api-merged.json public/api-merged.json
COPY pkg pkg
COPY scripts scripts
COPY conf conf

@ -49,6 +49,7 @@ $(SPEC_TARGET): $(SWAGGER) ## Generate API Swagger specification
-x "github.com/prometheus/alertmanager" \
-i pkg/api/swagger_tags.json \
--exclude-tag=alpha
go run pkg/services/ngalert/api/tooling/cmd/clean-swagger/main.go -if $@ -of $@
swagger-api-spec: gen-go $(SPEC_TARGET) $(MERGED_SPEC_TARGET) validate-api-spec
@ -84,7 +85,7 @@ fix-cue: $(CUE)
gen-jsonnet:
go generate ./devenv/jsonnet
build-go: $(MERGED_SPEC_TARGET) gen-go ## Build all Go binaries.
build-go: gen-go ## Build all Go binaries.
@echo "build go files"
$(GO) run build.go $(GO_BUILD_FLAGS) build

@ -13790,6 +13790,9 @@
"type": "integer",
"format": "int64"
},
"is_paused": {
"type": "boolean"
},
"namespace_id": {
"type": "integer",
"format": "int64"
@ -19315,6 +19318,7 @@
}
},
"receiver": {
"description": "Receiver receiver",
"type": "object",
"required": [
"active",
@ -20789,4 +20793,4 @@
"name": "service_accounts"
}
]
}
}

File diff suppressed because it is too large Load Diff

@ -4976,6 +4976,9 @@
"format": "int64",
"type": "integer"
},
"is_paused": {
"type": "boolean"
},
"namespace_id": {
"format": "int64",
"type": "integer"
@ -6931,6 +6934,9 @@
],
"type": "string"
},
"is_paused": {
"type": "boolean"
},
"no_data_state": {
"enum": [
"Alerting",

Loading…
Cancel
Save