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
+14-12
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,13 @@
1
1
# Generate Code Snippets from an OpenAPI specification
2
2
3
-
This Github Action takes an OpenAPI spec, generates code samples for each operation and adds them to the spec using [the `x-code-samples` extension](https://redocly.com/docs/api-reference-docs/specification-extensions/x-code-samples).
4
-
If you [specified `examples` in your endpoint](https://swagger.io/docs/specification/adding-examples/), it takes the first example as the payload when generating snippets. If there is no example, the payload will be empty/`null`.
3
+
This GitHub Action takes an OpenAPI spec, generates code samples for each
[specified `examples` in your endpoint](https://swagger.io/docs/specification/adding-examples/),
9
+
it takes the first example as the payload when generating snippets. If there is
10
+
no example, the payload will be empty/`null`.
5
11
6
12
The following languages are supported:
7
13
@@ -28,16 +34,11 @@ The following languages are supported:
28
34
29
35
The results look like this.
30
36
31
-

32
-
_readme.com_
33
-
34
-

35
-
_RapiDoc_
36
-
37
-

38
-
_Redoc_
37
+
_readme.com_
39
38
39
+
_RapiDoc_
40
40
41
+
_Redoc_
41
42
42
43
## Prerequisites / Inputs
43
44
@@ -48,10 +49,11 @@ _Redoc_
48
49
49
50
## Instructions
50
51
51
-
Add a Github Action in your workflow, passing the input spec file (json or yaml), the desired output file location (json) and, optionally, the list of languages to generate snippets for.
52
+
Add a GitHub Action in your workflow, passing the input spec file (json or
53
+
yaml), the desired output file location (json) and, optionally, the list of
0 commit comments