Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/telkomindonesia/oapik
OpenAPI Keren
https://github.com/telkomindonesia/oapik
Last synced: about 1 month ago
JSON representation
OpenAPI Keren
- Host: GitHub
- URL: https://github.com/telkomindonesia/oapik
- Owner: TelkomIndonesia
- Created: 2024-06-17T04:30:50.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-08-29T07:47:16.000Z (4 months ago)
- Last Synced: 2024-08-29T09:22:20.355Z (4 months ago)
- Language: Go
- Size: 215 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OpenAPI Keren
OpenAPI is awesome (Indonesian: keren), so we created several utilities for working with it.
## Features
### Bundle
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/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).
### Proxy
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/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).
## Limitations
This utilities are still in a very early development stage. Current limitations includes but not restricted to:
- When [bundling](#bundle), all components on non-root files are required to be defined under `components` key [accordingly](https://swagger.io/specification/#components-object).