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
+36-4Lines changed: 36 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
This project aims to create a tool that automatically converts OpenAPI specifications into Swift-DocC compatible documentation. By bridging OpenAPI and Swift-DocC through SymbolGraph files, we'll enable seamless documentation generation for REST APIs within the Swift ecosystem.
4
4
5
-
The project is still in its very early stage, and I’m actively working on improving it.
5
+
The project is still in its very early stage, and I'm actively working on improving it.
6
6
7
7
Google Summer of Code @Swift project to integrate OpenAPI Integration with Swift-DocC: Automated API Documentation Generation.
8
8
@@ -13,9 +13,9 @@ Google Summer of Code @Swift project to integrate OpenAPI Integration with Swift
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
15
## Proposed Solution
16
-
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.
16
+
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
17
18
-
`swift run openapi-to-symbolgraph <path-to-openapi.json>`: Runs your tool to parse and generate “symbolgraph.json.”
18
+
`swift run openapi-to-symbolgraph <path-to-openapi.json>`: Runs your tool to parse and generate "symbolgraph.json."
19
19
20
20
21
21
`docc convert symbolgraph.json --output-path docs`: Converts the SymbolGraph into HTML documentation.
@@ -85,7 +85,7 @@ swift run openapi-to-symbolgraph api.json --output ./symbols
85
85
```
86
86
87
87
88
-

88
+

89
89
90
90
91
91
## Project Structure
@@ -104,6 +104,38 @@ swift run openapi-to-symbolgraph api.json --output ./symbols
The project documentation is hosted on GitHub Pages at [https://ayushshrivastv.github.io/OpenAPI-integration-with-DocC/](https://ayushshrivastv.github.io/OpenAPI-integration-with-DocC/).
110
+
111
+
### Documentation Components
112
+
113
+
1.**Landing Page**: A simple entry point that introduces the project and provides links to the API documentation.
114
+
115
+
2.**API Documentation**: The DocC-generated documentation from the OpenAPI specification, providing:
116
+
- API endpoint details
117
+
- Request/response schemas
118
+
- Interactive examples
119
+
- Searchable interface
120
+
121
+
### Viewing the Documentation
122
+
123
+
- The main URL redirects to an informational page about the DocC documentation.
124
+
- From there, you can access the full DocC-generated API documentation.
125
+
- The documentation is generated from the OpenAPI specification using the command:
126
+
```bash
127
+
docc convert symbolgraph.json --output-path docs
128
+
```
129
+
130
+
### GitHub Pages Setup
131
+
132
+
The project uses GitHub Actions to automatically deploy documentation to GitHub Pages:
133
+
134
+
1. The workflow converts OpenAPI specs to SymbolGraph files
135
+
2. DocC converts the SymbolGraph to HTML documentation
136
+
3. The documentation is deployed to the `gh-pages` branch
137
+
4. The landing page provides a user-friendly entry point to the technical documentation
138
+
107
139
## License
108
140
109
141
This project is licensed under the MIT License - see the LICENSE file for details.
<p>If you are not redirected automatically, <ahref="https://ayushshrivastv.github.io/OpenAPI-integration-with-DocC/docs/documentation.html">click here</a>.</p>
0 commit comments