From e10830434b6fd0c848b60e82e8ef3f78b70924f9 Mon Sep 17 00:00:00 2001 From: bakito Date: Mon, 15 Sep 2025 18:47:07 +0200 Subject: [PATCH] chore: remove openapi patch for fixed upstream / move utils to cmd --- Makefile | 8 ++++---- {docs => cmd/docs}/main.go | 0 {openapi => cmd/openapi}/main.go | 4 ---- 3 files changed, 4 insertions(+), 8 deletions(-) rename {docs => cmd/docs}/main.go (100%) rename {openapi => cmd/openapi}/main.go (92%) diff --git a/Makefile b/Makefile index 718551e..95abe44 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ deepcopy-gen: tb.controller-gen .PHONY: docs docs: - go run docs/main.go + go run cmd/docs/main.go # Run tests test: generate lint test-ci @@ -79,12 +79,12 @@ ADGUARD_HOME_VERSION ?= v0.107.66 model: tb.oapi-codegen @mkdir -p tmp - go run openapi/main.go $(ADGUARD_HOME_VERSION) + go run cmd/openapi/main.go $(ADGUARD_HOME_VERSION) $(TB_OAPI_CODEGEN) -package model -generate types,client -config .oapi-codegen.yaml tmp/schema.yaml > internal/client/model/model_generated.go model-diff: - go run openapi/main.go $(ADGUARD_HOME_VERSION) - go run openapi/main.go + go run cmd/openapi/main.go $(ADGUARD_HOME_VERSION) + go run cmd/openapi/main.go diff tmp/schema.yaml tmp/schema-master.yaml zellij: diff --git a/docs/main.go b/cmd/docs/main.go similarity index 100% rename from docs/main.go rename to cmd/docs/main.go diff --git a/openapi/main.go b/cmd/openapi/main.go similarity index 92% rename from openapi/main.go rename to cmd/openapi/main.go index 5984c22..c475706 100644 --- a/openapi/main.go +++ b/cmd/openapi/main.go @@ -87,10 +87,6 @@ func main() { } func correctEntries(schema map[string]any) { - // https://github.com/AdguardTeam/AdGuardHome/pull/7678 - if err := unstructured.SetNestedField(schema, "string", "components", "schemas", "QueryLogItem", "properties", "client_proto", "type"); err != nil { - log.Fatalln(err) - } } func addFakeTags(schema map[string]any) {