Skip to content

Commit 73f9e82

Browse files
authored
Update README.md
1 parent da30de8 commit 73f9e82

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

README.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,32 @@
11
# GitHub's REST API Swift Language Code Generator
22

3-
This Swift code generator is built upon the [Swift OpenAPI Generator](https://github.com/apple/swift-openapi-generator) and leverages the OpenAPI description for GitHub's REST API. The goal is to automate the creation of Swift language bindings, providing developers with a seamless way to interact with GitHub's REST API.
3+
[![Swift](https://img.shields.io/badge/Swift-5.9-orange?style=flat-square)](https://img.shields.io/badge/Swift-5.9-orange?style=flat-square)
4+
[![Platforms](https://img.shields.io/badge/Platforms-macOS-orange?style=flat-square)](https://img.shields.io/badge/Platforms-macOS-orange?style=flat-square)
5+
[![Swift Package Manager](https://img.shields.io/badge/Swift_Package_Manager-compatible-orange?style=flat-square)](https://img.shields.io/badge/Swift_Package_Manager-compatible-orange?style=flat-square)
46

5-
## Example
7+
This Swift code generator is built upon the [Swift OpenAPI Generator](https://github.com/apple/swift-openapi-generator) and leverages the OpenAPI description for GitHub's REST API. The goal is to automate the creation of Swift language bindings, providing developers with a seamless way to interact with GitHub's REST API.
68

7-
### Get Users
9+
## Usage
10+
- Get Users
811
https://github.com/Wei18/github-rest-api-swift-openapi/blob/46bd7a951cd6a2bda9a9d26d843d55bb12f769c3/Tests/UsersTests/UsersTests.swift#L8-L15
912

13+
## Installation
14+
15+
### Swift Package Manager
16+
17+
The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler.
18+
19+
Once you have your Swift package set up, adding github-rest-api-swift-openapi as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.
20+
21+
```swift
22+
// swift-tools-version: 5.9
23+
// The swift-tools-version declares the minimum version of Swift required to build this package.
24+
25+
dependencies: [
26+
.package(url: "https://github.com/Wei18/github-rest-api-swift-openapi.git", from: "1.0.0"),
27+
]
28+
```
29+
1030
## Overview
1131

1232
[OpenAPI](https://www.openapis.org/) serves as a standardized way to document HTTP services. It allows developers to automate workflows, such as generating code for making HTTP requests or implementing API servers. The Swift OpenAPI Generator is a Swift package plugin designed to generate code at build-time, ensuring it remains synchronized with the OpenAPI document.

0 commit comments

Comments
 (0)