From 8c418a2e488f4b5eb61516b7f762e059bcc6b3c0 Mon Sep 17 00:00:00 2001 From: Rucciva Date: Wed, 19 Jun 2024 10:25:43 +0700 Subject: [PATCH] move main to folder cmd/oapik --- .goreleaser.yaml | 4 ++-- README.md | 4 ++-- cmd/{ => oapik}/main.go | 0 go.mod | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename cmd/{ => oapik}/main.go (100%) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 29bc109..81a30bf 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,3 +1,3 @@ builds: - - id: main - main: ./cmd + - id: oapik + main: ./cmd/oapik diff --git a/README.md b/README.md index f490fb2..b941994 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ OpenAPI is awesome (Indonesian: keren), so we created several utilities for work Bundle splitted Open API files into one file while trying to persist all their use of `$ref`. ```bash -go run -mod=mod github.com/telkomindonesia/oapik/cmd bundle +go run -mod=mod github.com/telkomindonesia/oapik/cmd/oapik bundle ``` For testing the functionality, you can use [spec inside testdata directory](./internal/bundle/testdata/profile/), which will produce file(s) similar to [testoutput directory](./internal/bundle/testoutput). @@ -19,7 +19,7 @@ For testing the functionality, you can use [spec inside testdata directory](./in Create a new spec by picking operations from other specs. The main purpose was to derive an OpenAPI spec for a lean [backend-for-frontends](https://microservices.io/patterns/apigateway.html) using OpenAPI spec of upstream services behind it. It introduces a new `x-proxy` extension. It can also generate ready-to-use code which is inspired by (and utilize) oapi-codegen. ```bash -go run -mod=mod github.com/telkomindonesia/oapik/cmd proxy [] +go run -mod=mod github.com/telkomindonesia/oapik/cmd/oapik proxy [] ``` For testing the functionality, you can use [specs inside testdata directory](./internal/proxy/testdata/), which will produce file(s) similar to [testoutput directory](./internal/proxy/testoutput). diff --git a/cmd/main.go b/cmd/oapik/main.go similarity index 100% rename from cmd/main.go rename to cmd/oapik/main.go diff --git a/go.mod b/go.mod index 390a162..3ee07e4 100644 --- a/go.mod +++ b/go.mod @@ -8,6 +8,7 @@ require ( github.com/oapi-codegen/oapi-codegen/v2 v2.3.0 github.com/pb33f/libopenapi v0.16.8 github.com/stretchr/testify v1.9.0 + github.com/twpayne/go-jsonstruct/v3 v3.0.0 golang.org/x/tools v0.21.0 gopkg.in/yaml.v3 v3.0.1 ) @@ -27,7 +28,6 @@ require ( github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect github.com/perimeterx/marshmallow v1.1.5 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/twpayne/go-jsonstruct/v3 v3.0.0 // indirect github.com/vmware-labs/yaml-jsonpath v0.3.2 // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect