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: Documentation.app/Contents/MacOS/Generation examples.playground/Pages/Documentation.xcplaygroundpage/Contents.swift
+31Lines changed: 31 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -7,4 +7,35 @@
7
7
/*:
8
8
# Documentation
9
9
10
+
Bow OpenAPI leverages the documentation added in the specification so that you have it available as inline docs in Xcode. For instance, consider the following example:
11
+
12
+
```yaml
13
+
openapi: "3.0.0"
14
+
info:
15
+
title: My Store
16
+
version: "1.0.0"
17
+
paths:
18
+
/products:
19
+
get:
20
+
tags:
21
+
- Product
22
+
operationId: getProducts
23
+
description: Obtains all products sold by the store.
24
+
parameters:
25
+
- name: sortBy
26
+
in: query
27
+
required: true
28
+
description: Sorting criteria.
29
+
schema:
30
+
$ref: '#/components/schemas/SortBy'
31
+
responses:
32
+
'200':
33
+
description: All products in the store.
34
+
content:
35
+
application/json:
36
+
schema:
37
+
$ref: '#/components/schemas/Products'
38
+
```
39
+
40
+
The generator will take all the metadata in the fields named `description` and will use that information for documentation of the corresponding artifacts.
0 commit comments