Skip to content

Commit

Permalink
move main to folder cmd/oapik
Browse files Browse the repository at this point in the history
  • Loading branch information
rucciva committed Jun 19, 2024
1 parent 51471b8 commit 8c418a2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
builds:
- id: main
main: ./cmd
- id: oapik
main: ./cmd/oapik
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <path-to-main-spec> <path-to-generated-spec>
go run -mod=mod github.com/telkomindonesia/oapik/cmd/oapik bundle <path-to-main-spec> <path-to-generated-spec>
```

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).
Expand All @@ -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 <path-to-proxy-spec> <path-to-generated-spec> [<path-to-generated-go-file>]
go run -mod=mod github.com/telkomindonesia/oapik/cmd/oapik proxy <path-to-proxy-spec> <path-to-generated-spec> [<path-to-generated-go-file>]
```

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).
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand All @@ -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
Expand Down

0 comments on commit 8c418a2

Please sign in to comment.