Skip to content

Commit eba662e

Browse files
authored
Merge branch 'main' into refresh_ubi_docs_part_deux
2 parents 638ba70 + ac2b3a5 commit eba662e

File tree

284 files changed

+6996
-1041
lines changed

Some content is hidden

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

284 files changed

+6996
-1041
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
_Describe what this change achieves._
33

44
### Issues Resolved
5-
Closes #[_insert issue number_]
5+
Closes #[_delete this text, including the brackets, and replace with the issue number_]
66

77
### Version
88
_List the OpenSearch version to which this PR applies, e.g. 2.14, 2.12--2.14, or all._
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: existence
2+
message: "In links, use '{{site.url}}{{site.baseurl}}' instead of 'https://www.opensearch.org/docs/latest'."
3+
level: error
4+
nonword: true
5+
scope: raw
6+
tokens:
7+
- '\]\(https:\/\/www.opensearch.org\/docs\/latest'
8+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: substitution
2+
message: "Use '%s' instead of '%s'. Note the correct capitalization."
3+
ignorecase: false
4+
level: error
5+
action:
6+
name: replace
7+
swap:
8+
'Retrieval-Augmented Generation': retrieval-augmented generation

.github/vale/styles/OpenSearch/SubstitutionsError.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ swap:
3737
'pre-trained': pretrained
3838
'premigration': pre-migration
3939
're-enable': reenable
40+
'retrieval augmented generation': retrieval-augmented generation
4041
'screen shot': screenshot
4142
'sample request': example request
4243
'sample response': example response

.github/vale/styles/Vocab/OpenSearch/Products/accept.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ OpenSearch Assistant
6868
OpenSearch Assistant Toolkit
6969
OpenSearch Benchmark
7070
OpenSearch Dashboards
71+
OpenSearch Flow
7172
OpenSearch Playground
7273
OpenSearch Project
7374
OpenSearch Service
@@ -99,4 +100,5 @@ Tribuo
99100
VisBuilder
100101
Winlogbeat
101102
XGBoost
103+
Zipf
102104
Zstandard
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1+
[Aa]ss

.github/vale/tests/test-style-pos.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ This sentence tests [links end slash]({{site.url}}{{site.baseurl}}/opensearch).
3838

3939
This sentence tests [links mid slash]({{site.url}}{{site.baseurl}}opensearch).
4040

41+
This sentence tests [links explicit](https://www.opensearch.org/docs/latest/double-slash/).
42+
4143
This sentence tests log-in as a noun. To login, we test this as a verb.
4244

4345
To test merge conflicts, remove tick marks in `<<<<<<< HEAD`.
@@ -74,6 +76,8 @@ This sentence tests splling.
7476

7577
This sentence tests substitution error by using the word indices.
7678

79+
This sentence tests substitution case-sensitive error by using the word Retrieval-Augmented Generation.
80+
7781
This sentence tests substitution suggestion due to its nature.
7882

7983
This Table | tests capitalization

.github/workflows/update-api-components.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- run: bundle install
2525

2626
- name: Download spec and insert into documentation
27-
run: bundle exec jekyll spec-insert
27+
run: bundle exec jekyll spec-insert -F -R
2828

2929
- name: Get current date
3030
id: date

.vale.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ OpenSearch.LatinismsSubstitution = YES
3838
OpenSearch.LinksDoubleParentheses = YES
3939
OpenSearch.LinksDoubleSlash = YES
4040
OpenSearch.LinksEndSlash = YES
41+
OpenSearch.LinksExplicit = YES
4142
OpenSearch.LinksMidSlash = YES
4243
OpenSearch.LoginNoun = YES
4344
OpenSearch.LoginVerb = YES
@@ -60,6 +61,7 @@ OpenSearch.SpacingSlash = YES
6061
OpenSearch.SpacingWords = YES
6162
OpenSearch.Spelling = YES
6263
OpenSearch.StackedHeadings = YES
64+
OpenSearch.SubstitutionsErrorCaseSensitive = YES
6365
OpenSearch.SubstitutionsError = YES
6466
OpenSearch.SubstitutionsSuggestion = YES
6567
OpenSearch.TableHeadings = YES

DEVELOPER_GUIDE.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- [Spec insert components](#spec-insert-components)
88
- [Query parameters](#query-parameters)
99
- [Path parameters](#path-parameters)
10-
- [Paths and HTTP methods](#paths-and-http-methods)
10+
- [Endpoints](#endpoints)
1111

1212
## Introduction
1313

@@ -49,7 +49,13 @@ bundle exec jekyll spec-insert
4949
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:
5050

5151
```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
5359
```
5460

5561
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.
@@ -63,21 +69,26 @@ bundle exec jekyll spec-insert --refresh-spec
6369
### Ignoring files and folders
6470
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.
6571

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+
6677
## CI/CD
6778
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.
6879

6980
## Spec insert components
7081
All spec insert components accept the following arguments:
7182
- `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`.
7384
- `omit_header` (Boolean; Default is `false`): If set to `true`, the markdown header of the component will not be rendered.
7485

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:
7788
```markdown
7889
<!-- spec_insert_start
7990
api: search
80-
component: paths_and_http_methods
91+
component: endpoints
8192
-->
8293
<!-- spec_insert_end -->
8394
```

0 commit comments

Comments
 (0)