🌐 Functional HTTP client generator from an OpenAPI/Swagger specification.

What's New

Bow OpenAPI 0.2.0


What's new

This version includes:

  • New argument parsing using Swift Argument Parser library.
  • Compatibility with Bow 0.8.0
  • Compatibility with Linux: the tool can be installed and used in Linux, and the generated code also works on Linux.
  • Bug fixes and stability improvements.

Bow OpenAPI

Build Site SPM compatible Gitter

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 for extensive and detailed documentation about the project.


💡 Automatic generation of network clients written in Swift from an OpenAPI / Swagger specification file, in YAML or JSON formats.

📦 Provision of a Swift Package that can be consumed from Swift Package Manager.

🔨 Integration with Xcode as a build phase to always keep your code in sync with your specification.

💥 Usage of Environmental Effects from Bow to suspend side-effects, and improve their composition and testability.

Enhanced test support for integration or end-to-end test with no mocks.


Installation guide

Bow OpenAPI is compatible with Unix systems.

💻 OS X users

You can install Bow OpenAPI using Homebrew. Its formula is not still in the main repository; therefore, you need to tap it first, before installing it:

brew tap bow-swift/bow
brew install bow-openapi

🐧 Linux users

curl -s \
 | grep -oP '"tag_name": "\K(.*)(?=")' \
 | xargs -I {} wget -O -{}.tar.gz \
 | tar xz \
 && sudo make linux -C bow-openapi-*

It will install the last stable version.

Bow OpenAPI depends on Java 8+ and swagger-codegen; both will be installed from Makefile. After the installation, you can type bow-openapi -h in a new termintal to check it.

⚙️ Usage

You can invoke the tool with the following parameters:

bow-openapi --name <NAME> --schema <YAML | JSON> --output <FOLDER>
  • 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>.
  • schema is the path to the OpenAPI / Swagger specification file. It accepts both YAML or JSON formats.
  • output is the folder where the result will be saved.

❤️ Contributing to the project

We welcome your contributions! Help us make Bow OpenAPI better:

🐛 File an issue if you find a bug.

🆕 Suggest a new feature for Bow OpenAPI.

➡️ Open a Pull Request fixing a problem or adding new functionality.

💬 Discuss with us in our Gitter channel to help us shape the future of Bow OpenAPI.

⚖️ License

Copyright (C) 2020 The Bow 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

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.


  • Swift Tools
View More Packages from this Author


  • None
Last updated: Mon Mar 11 2024 03:20:32 GMT-0900 (Hawaii-Aleutian Daylight Time)