|
| 1 | + |
| 2 | + |
| 3 | +<p align="center"> |
| 4 | + |
| 5 | +<a href="https://github.com/bow-swift/nef"> |
| 6 | +<img src="https://img.shields.io/badge/Dependency%20Manager-Swift%20PM-orange" alt="Swift Package Manager compatible"> |
| 7 | +</a> |
| 8 | + |
| 9 | +<a href="https://gitter.im/bowswift/bow"> |
| 10 | +<img src="https://img.shields.io/badge/Gitter-Bow%20OpenAPI-red" alt="Gitter"> |
| 11 | +</a> |
| 12 | + |
| 13 | +</p> |
| 14 | + |
| 15 | +**Bow OpenAPI** is a command-line tool to generate a Swift network client from an OpenAPI / Swagger specification file. Please, refer to the [project website](https://openapi.bow-swift.io) for extensive and detailed documentation about the project. |
| 16 | + |
| 17 | +### Features |
| 18 | + |
| 19 | +💡 [Automatic generation](https://openapi.bow-swift.io/docs/generation-examples/basic-generation/) of network clients written in Swift from an OpenAPI / Swagger specification file, in YAML or JSON formats. |
| 20 | + |
| 21 | +📦 Provision of a [Swift Package](https://openapi.bow-swift.io/docs/consuming-generated-code/adding-the-module-to-your-project/) that can be consumed from Swift Package Manager. |
| 22 | + |
| 23 | +🔨 [Integration with Xcode](https://openapi.bow-swift.io/docs/quick-start/integration-in-xcode/) as a build phase to always keep your code in sync with your specification. |
| 24 | + |
| 25 | +💥 Usage of [Environmental Effects](https://openapi.bow-swift.io/docs/consuming-generated-code/running-a-network-request/) from [Bow](https://bow-swift.io) to suspend side-effects, and improve their composition and testability. |
| 26 | + |
| 27 | +✅ [Enhanced test support](https://openapi.bow-swift.io/docs/consuming-generated-code/testing-your-network-calls/) for integration or end-to-end test with no mocks. |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | +## 💻 Installation |
| 32 | + |
| 33 | +You can [install Bow OpenAPI](https://openapi.bow-swift.io/docs/quick-start/installation-guide/) using [Homebrew](https://brew.sh/index_es). Its formula is not still in the main repository; therefore, you need to tap it first, before installing it: |
| 34 | + |
| 35 | +```bash |
| 36 | +brew tap bow-swift/bow |
| 37 | +brew install bow-openapi |
| 38 | +``` |
| 39 | + |
| 40 | +## ⚙️ Usage |
| 41 | + |
| 42 | +You can [invoke the tool](https://openapi.bow-swift.io/docs/quick-start/how-to-run-bow-openapi/) with the following parameters: |
| 43 | + |
| 44 | +```bash |
| 45 | +bow-openapi --name <NAME> --schema <YAML | JSON> --output <FOLDER> |
| 46 | +``` |
| 47 | + |
| 48 | +- `name` is the name for the generated module in the resulting Swift Package. You will have to import it in your code using `import <NAME>`. |
| 49 | +- `schema` is the path to the OpenAPI / Swagger specification file. It accepts both YAML or JSON formats. |
| 50 | +- `output` is the folder where the result will be saved. |
| 51 | + |
| 52 | +## ❤️ Contributing to the project |
| 53 | + |
| 54 | +We welcome your contributions! Help us make Bow OpenAPI better: |
| 55 | + |
| 56 | +🐛 File an issue if you find a bug. |
| 57 | + |
| 58 | +🆕 Suggest a new feature for Bow OpenAPI. |
| 59 | + |
| 60 | +➡️ Open a Pull Request fixing a problem or adding new functionality. |
| 61 | + |
| 62 | +💬 Discuss with us in our [Gitter channel](https://gitter.im/bowswift/bow) to help us shape the future of Bow OpenAPI. |
| 63 | + |
| 64 | +# ⚖️ License |
| 65 | + |
| 66 | + Copyright (C) 2020 The Bow Authors |
| 67 | + |
| 68 | + Licensed under the Apache License, Version 2.0 (the "License"); |
| 69 | + you may not use this file except in compliance with the License. |
| 70 | + You may obtain a copy of the License at |
| 71 | + |
| 72 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 73 | + |
| 74 | + Unless required by applicable law or agreed to in writing, software |
| 75 | + distributed under the License is distributed on an "AS IS" BASIS, |
| 76 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 77 | + See the License for the specific language governing permissions and |
| 78 | + limitations under the License. |
0 commit comments