Skip to content

Commit 2029b52

Browse files
Update README.md
1 parent dd10765 commit 2029b52

File tree

1 file changed

+44
-28
lines changed

1 file changed

+44
-28
lines changed

README.md

Lines changed: 44 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,22 @@ Google Summer of Code @Swift project to integrate OpenAPI Integration with Swift
1212

1313
Currently, Swift developers maintaining REST APIs need to manually document their APIs in DocC while separately maintaining OpenAPI specifications. This creates duplicate work and potential inconsistencies between API specifications and documentation.
1414

15+
## Project Status
16+
The project is in active development, with a working Proof of Concept (PoC) generating DocC documentation. Check out the live example below!
17+
18+
![Screenshot 2025-04-05 at 4 55 57 AM](https://github.com/user-attachments/assets/3b5bfca6-7e6f-42a6-981a-039daeee0538)
19+
20+
## Live Documentation
21+
View the generated DocC documentation for a sample User API at:
22+
23+
https://ayushshrivastv.github.io/OpenAPI-integration-with-DocC/docs
24+
25+
26+
![Screenshot 2025-04-05 at 4 57 22 AM](https://github.com/user-attachments/assets/9ee9e418-45da-478e-a15e-80d6605a3d30)
27+
![Screenshot 2025-04-05 at 5 03 39 AM](https://github.com/user-attachments/assets/b590979f-8a44-4a95-a7be-a416166a5305)
28+
![Screenshot 2025-04-05 at 5 07 27 AM](https://github.com/user-attachments/assets/35e1be6d-154e-4ad8-86a0-2724fd742fba)
29+
30+
1531
## Proposed Solution
1632
Command line tool to simplify API documentation for Swift developers. It parses OpenAPI JSON/YAML files using OpenAPIKit Swift Library, transforms schemas and endpoints into DocC ready SymbolGraph files with createSymbolGraph, and outputs “symbolgraph.json.” Users then execute docc convert symbolgraph.json --output-path docs to create HTML docs, enhanced by a static “API.docc/” catalog for custom pages. For GSoC, I’ll extend support for complex schemas like nested objects and arrays, automate DocC conversion, and add live previews, ensuring effortless, consistent API documentation from OpenAPI specs.
1733

@@ -20,25 +36,16 @@ Command line tool to simplify API documentation for Swift developers. It parses
2036

2137
`docc convert symbolgraph.json --output-path docs`: Converts the SymbolGraph into HTML documentation.
2238

23-
Parses OpenAPI specifications (JSON/YAML)
24-
Converts API endpoints and schemas into DocC-compatible SymbolGraph files
25-
Generates comprehensive API documentation using Swift-DocC
26-
27-
## Architecture
28-
OpenAPI Spec → Parser → Intermediate Representation → SymbolGraph Generator → DocC Integration
39+
## Benefits to the Swift Ecosystem

Improved
2940

30-
## Features
41+
Consistency: By generating DocC documentation directly from OpenAPI specs, the tool eliminates discrepancies between API definitions and code documentation.

3142

32-
- Parses OpenAPI JSON/YAML specifications
33-
- Generates DocC-compatible SymbolGraph files
34-
- Creates documentation structure for API endpoints and schemas
43+
Reduced Workload: Developers will save a lot of time that they would have spent manually documenting APIs in DocC. This is a problem that I’ve seen mentioned in industry reports, like Chase’s March 2024 Medium post (Using Apple’s OpenAPI Generator to Make and Mock Network Calls in SwiftUI). This tool directly addresses this issue.

3544

36-
## Installation
3745

38-
### Prerequisites
39-
- Xcode 14.0 or later
40-
- Swift 5.7+
41-
- macOS 11.0+
46+
Parses OpenAPI specifications (JSON/YAML)
47+
Converts API endpoints and schemas into DocC-compatible SymbolGraph files
48+
Generates comprehensive API documentation using Swift-DocC
4249

4350
### Steps
4451

@@ -75,19 +82,6 @@ swift run docc convert symbols/symbolgraph.json --output-path ./docs
7582

7683
![2e8f1a628c69dcaafc08ad6f8bad785ceae2cc02_2_1380x300](https://github.com/user-attachments/assets/5649425f-6b4c-4417-9f3e-342edbabc4ae)
7784

78-
79-
### Examples
80-
81-
#### Basic Usage
82-
```bash
83-
# Convert a simple API specification
84-
swift run openapi-to-symbolgraph api.json --output ./symbols
85-
```
86-
87-
88-
![Screenshot 2025-03-17 at 1 57 27 PM](https://github.com/user-attachments/assets/dbb60011-201a-4b72-bbdb-d9b91e11489f)
89-
90-
9185
## Project Structure
9286

9387
- `Sources/`: Contains the main Swift source code
@@ -99,11 +93,33 @@ swift run openapi-to-symbolgraph api.json --output ./symbols
9993
- Swift 5.7+
10094
- macOS 11.0+
10195

96+
## Architecture
97+
OpenAPI Spec → Parser → Intermediate Representation → SymbolGraph Generator → DocC Integration
98+
99+
## Features
100+
101+
- Parses OpenAPI JSON/YAML specifications
102+
- Generates DocC-compatible SymbolGraph files
103+
- Creates documentation structure for API endpoints and schemas
104+
105+
## Installation
106+
107+
### Prerequisites
108+
- Xcode 14.0 or later
109+
- Swift 5.7+
110+
- macOS 11.0+
111+
102112
## Dependencies
103113

104114
- [OpenAPIKit](https://github.com/mattpolzin/OpenAPIKit.git)
105115
- [Swift DocC SymbolKit](https://github.com/swiftlang/swift-docc-symbolkit.git)
106116

117+
## Contributing
118+
I welcome feedback and contributions! Please open an issue or pull request on GitHub. For GSoC, I’m collaborating with mentors Sofia Rodríguez, Si Beaumont, and Honza Dvorsky.
119+
120+
## Acknowledgements
121+
Special thanks to the Swift.org community and my GSoC mentors for their guidance.
122+
107123
## License
108124

109125
This project is licensed under the MIT License - see the LICENSE file for details.

0 commit comments

Comments
 (0)