Skip to content

Commit 5c72be0

Browse files
committed
Fix OpenAPI2CRD CI
1 parent 32f15cc commit 5c72be0

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

tools/openapi2crd/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ GO_FILES := $(shell find . -name '*.go' -not -path './vendor/*')
99
# Go packages for testing
1010
PACKAGES := $(shell go list ./...)
1111

12+
# GO TOOLS
13+
GCI := go tool -modfile=../toolbox/go.mod gci
14+
1215
crds: build ## Generate CRDs from config file
1316
@echo "==> Generating CRDs..."
1417
$(BINARY_PATH) --config config.yaml --output $(CRD_FILE)
@@ -26,7 +29,7 @@ $(BINARY_PATH): $(GO_FILES) ## File-based build target.
2629

2730
fmt: ## Format all Go code
2831
@echo "==> Formatting code..."
29-
@gci write -s standard -s default -s localmodule .
32+
$(GCI) write -s standard -s default -s localmodule .
3033

3134
unit-test: ## Run unit tests with race detection and coverage
3235
@echo "==> Running unit tests..."

tools/openapi2crd/devbox.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.16.0/.schema/devbox.schema.json",
3-
"packages": ["go-mockery@latest"],
3+
"packages": [
4+
"path:../../flakes/go",
5+
"go-mockery@latest"
6+
],
47
"shell": {
58
"init_hook": [
69
"echo 'Welcome to devbox!' > /dev/null"

tools/openapi2crd/devbox.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"lockfile_version": "1",
33
"packages": {
4+
"github:NixOS/nixpkgs/nixpkgs-unstable": {
5+
"last_modified": "2025-11-08T12:28:21Z",
6+
"resolved": "github:NixOS/nixpkgs/f6b44b2401525650256b977063dbcf830f762369?lastModified=1762604901&narHash=sha256-Pr2jpryIaQr9Yx8p6QssS03wqB6UifnnLr3HJw9veDw%3D"
7+
},
48
"go-mockery@latest": {
59
"last_modified": "2025-10-22T20:59:19Z",
610
"resolved": "github:NixOS/nixpkgs/01b6809f7f9d1183a2b3e081f0a1e6f8f415cb09#go-mockery",

tools/openapi2crd/pkg/plugins/parameters.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ package plugins
1818
import (
1919
"fmt"
2020

21-
"github.com/mongodb/mongodb-atlas-kubernetes/tools/openapi2crd/pkg/converter"
22-
2321
"github.com/getkin/kin-openapi/openapi3"
2422
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions"
23+
24+
"github.com/mongodb/mongodb-atlas-kubernetes/tools/openapi2crd/pkg/converter"
2525
)
2626

2727
// Parameters adds parameters from the OpenAPI spec to the CRD schema.

0 commit comments

Comments
 (0)