You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+44-28Lines changed: 44 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,22 @@ Google Summer of Code @Swift project to integrate OpenAPI Integration with Swift
12
12
13
13
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.
14
14
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
+

19
+
20
+
## Live Documentation
21
+
View the generated DocC documentation for a sample User API at:

27
+

28
+

29
+
30
+
15
31
## Proposed Solution
16
32
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.
17
33
@@ -20,25 +36,16 @@ Command line tool to simplify API documentation for Swift developers. It parses
20
36
21
37
`docc convert symbolgraph.json --output-path docs`: Converts the SymbolGraph into HTML documentation.
22
38
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
Consistency: By generating DocC documentation directly from OpenAPI specs, the tool eliminates discrepancies between API definitions and code documentation.
31
42
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.
35
44
36
-
## Installation
37
45
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
42
49
43
50
### Steps
44
51
@@ -75,19 +82,6 @@ swift run docc convert symbols/symbolgraph.json --output-path ./docs
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
+
107
123
## License
108
124
109
125
This project is licensed under the MIT License - see the LICENSE file for details.
0 commit comments