Skip to content

Commit

Permalink
Create tools.go
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Velichkevich <[email protected]>
  • Loading branch information
andreyvelich committed Feb 4, 2025
1 parent f121251 commit c5eafbc
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
2 changes: 0 additions & 2 deletions hack/swagger-v2/tools.go → hack/swagger-v2/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ import (
"k8s.io/kube-openapi/pkg/common"
"k8s.io/kube-openapi/pkg/validation/spec"

_ "k8s.io/code-generator"

kubeflowv2 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v2alpha1"
)

Expand Down
21 changes: 21 additions & 0 deletions hack/tools.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
Copyright 2024 The Kubeflow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package tools

import (
_ "k8s.io/code-generator"
)
2 changes: 1 addition & 1 deletion hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ go run ${OPENAPI_PKG}/cmd/openapi-gen \

# Generating OpenAPI Swagger for Kubeflow Trainer V2.
echo "Generate OpenAPI Swagger for kubeflow.org/v2alpha1"
go run hack/swagger-v2/tools.go >api.v2/openapi-spec/swagger.json
go run hack/swagger-v2/main.go >api.v2/openapi-spec/swagger.json

0 comments on commit c5eafbc

Please sign in to comment.