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
-[Paths and HTTP methods](#paths-and-http-methods)
10
+
-[Endpoints](#endpoints)
11
11
12
12
## Introduction
13
13
@@ -49,7 +49,13 @@ bundle exec jekyll spec-insert
49
49
If you are working on multiple Markdown files and do not want to keep running the `jekyll spec-insert` command, you can add the `--watch` (or `-W`) flag to the command to watch for changes in the Markdown files and automatically render the API components:
50
50
51
51
```shell
52
-
bundle exec jekyll spec-insert --watch
52
+
bundle exec jekyll spec-insert -W
53
+
```
54
+
55
+
By default, when the plugin encounters an error when processing a file, the plugin prints out the error than moves on to the next file. If you want it to short-circuit when an error occurs, add the `--fail-on-error` (or `-F`) flag to the command:
56
+
57
+
```shell
58
+
bundle exec jekyll spec-insert -F
53
59
```
54
60
55
61
Depending on the text editor you are using, you may need to manually reload the file from disk to see the changes applied by the plugin if the editor does not automatically reload the file periodically.
The `spec-insert` plugin ignores all files and folders listed in the [./_config.yml#exclude](./_config.yml) list, which is also the list of files and folders that Jekyll ignores.
65
71
72
+
### Configuration
73
+
You can update the configuration settings for this plugin through the [config.yml](./spec-insert/config.yml) file.
74
+
75
+
_Note that tests for this plugin use a mock configuration [file](./spec-insert/spec/mock_config.yml) to assure that the tests still pass when the config file is altered. The expected output for the tests is based on the mock configuration file and will look different from the actual output when the plugin is run._
76
+
66
77
## CI/CD
67
78
The `spec-insert` plugin is run as part of the CI/CD pipeline to ensure that the API components are up to date in the documentation. This is performed through the [update-api-components.yml](.github/workflows/update-api-components.yml) GitHub Actions workflow, which creates a pull request containing the updated API components every Sunday.
68
79
69
80
## Spec insert components
70
81
All spec insert components accept the following arguments:
71
82
-`api` (String; required): The name of the API to render the component from. This is equivalent to the `x-operation-group` field in the OpenSearch OpenAPI Spec.
72
-
-`component` (String; required): The name of the component to render, such as `query_parameters`, `path_parameters`, or `paths_and_http_methods`.
83
+
-`component` (String; required): The name of the component to render, such as `query_parameters`, `path_parameters`, or `endpoints`.
73
84
-`omit_header` (Boolean; Default is `false`): If set to `true`, the markdown header of the component will not be rendered.
74
85
75
-
### Paths and HTTP methods
76
-
To insert paths and HTTP methods for the `search` API, use the following snippet:
86
+
### Endpoints
87
+
To insert endpoints for the `search` API, use the following snippet:
0 commit comments