Skip to content

Commit d1687e4

Browse files
Merge pull request #40 from ayushshrivastv/feature/organize-examples
OpenAPI spec - requiring non mandatory field
2 parents 7faca7d + a5436f4 commit d1687e4

File tree

113 files changed

+6439
-1030
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+6439
-1030
lines changed

.github/workflows/pages.yml

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -27,57 +27,10 @@ jobs:
2727
- name: Setup Pages
2828
uses: actions/configure-pages@v5
2929

30-
- name: Prepare public directory
31-
run: |
32-
# Create public directory
33-
mkdir -p public
34-
35-
# Copy documentation files
36-
cp -r docs/* public/
37-
38-
# Copy sample files into the samples directory
39-
mkdir -p public/samples
40-
cp -r DocsExample public/samples/
41-
cp api.yaml public/samples/
42-
cp -r API.docc public/samples/
43-
44-
# Create README with instructions and note about source
45-
cat > public/samples/README.md << 'EOF'
46-
# The DocsExample directory within the repository (ayushshrivastv/OpenAPI-integration-with-DocC/DocsExample) is the source for this example.
47-
48-
## Building and Viewing Documentation Locally
49-
50-
1. Convert OpenAPI specification to SymbolGraph:
51-
```
52-
swift run openapi-to-symbolgraph api.yaml --output-path api.symbolgraph.json
53-
```
54-
55-
2. Generate DocC documentation:
56-
```
57-
xcrun docc convert API.docc --fallback-display-name API --fallback-bundle-identifier com.example.API --fallback-bundle-version 1.0.0 --additional-symbol-graph-dir ./ --output-path ./docs
58-
```
59-
60-
3. View the documentation locally:
61-
```
62-
python -m http.server 8000 --directory docs
63-
```
64-
65-
4. Open your browser to http://localhost:8000
66-
EOF
67-
68-
# Copy the existing index.html as is, since it already has the correct paths
69-
cp index.html public/
70-
71-
# Copy other necessary files
72-
cp favicon.ico public/ || true
73-
cp favicon.svg public/ || true
74-
cp .nojekyll public/ || true
75-
cp 404.html public/ || true
76-
7730
- name: Upload artifact
7831
uses: actions/upload-pages-artifact@v3
7932
with:
80-
path: './public'
33+
path: './docs'
8134

8235
- name: Deploy to GitHub Pages
8336
id: deployment
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# PetStore
2+
3+
Swagger Pet Store API documentation.
4+
5+
## Overview
6+
7+
This documentation provides details about the Pet Store API endpoints and schemas, generated from the OpenAPI specification.

Examples/PetStoreAPI/PetStore.doccarchive/css/866.2d08a543.css

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/PetStoreAPI/PetStore.doccarchive/css/989.4f123103.css

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/PetStoreAPI/PetStore.doccarchive/css/documentation-topic.da0b1931.css

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/PetStoreAPI/PetStore.doccarchive/css/index.3a335429.css

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/PetStoreAPI/PetStore.doccarchive/css/topic.4be8f56d.css

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/PetStoreAPI/PetStore.doccarchive/css/tutorials-overview.adb17623.css

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"text":"Swagger Pet Store API documentation.","type":"text"}],"primaryContentSections":[{"content":[{"type":"heading","level":2,"anchor":"Overview","text":"Overview"},{"inlineContent":[{"type":"text","text":"This documentation provides details about the Pet Store API endpoints and schemas, generated from the OpenAPI specification."}],"type":"paragraph"}],"kind":"content"}],"sections":[],"identifier":{"url":"doc:\/\/PetStore\/documentation\/PetStore","interfaceLanguage":"swift"},"kind":"article","hierarchy":{"paths":[[]]},"metadata":{"role":"collection","title":"PetStore"}}
12.3 KB
Loading

0 commit comments

Comments
 (0)