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
refactor!: move generated plugin clients to top-level plugins/
Delete the hand-written v4 plugins/{ism,security} clients and promote the
spec-generated tree from opensearchapi/plugins/ to top-level plugins/
(import path .../v5/plugins/<name>). The generated clients cover all 25
plugins and supersede the 2 hand-written ones. Retarget cmd/osgen
(DefaultPluginsImportBase, importPathForGroup) and the Makefile to emit at
plugins/, and add plugins/ to the check-gen diff.
BREAKING CHANGE: plugin import paths move from
github.com/opensearch-project/opensearch-go/v4/plugins/{ism,security} to
github.com/opensearch-project/opensearch-go/v5/plugins/<name>.
Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
Copy file name to clipboardExpand all lines: DEVELOPER_GUIDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -385,7 +385,7 @@ make gh.checks.failed # Only failed checks
385
385
386
386
## Code Generation
387
387
388
-
The `cmd/osgen` tool generates typed path builder structs (`internal/path/`) and API consumer files (`opensearchapi/`, `opensearchapi/plugins/`) from the published [OpenSearch API specification](https://github.com/opensearch-project/opensearch-api-specification). It reads `x-operation-group`, `x-version-added`, `x-version-deprecated`, `x-version-removed`, and `x-error-responses` extensions from the spec to produce version-aware Go source.
388
+
The `cmd/osgen` tool generates typed path builder structs (`internal/path/`) and API consumer files (`opensearchapi/`, `plugins/`) from the published [OpenSearch API specification](https://github.com/opensearch-project/opensearch-api-specification). It reads `x-operation-group`, `x-version-added`, `x-version-deprecated`, `x-version-removed`, and `x-error-responses` extensions from the spec to produce version-aware Go source.
389
389
390
390
The `opensearchapi/` package is the code-generated v5 API surface, produced by `cmd/osgen` from the spec. See `opensearchapi/README.md` for usage and `UPGRADING.md` for migration guidance.
- Optional `Params` are `*Params` pointer fields (nil-safe; pass `&opensearchapi.IndexParams{...}` to set).
206
206
- Optional boolean query parameters are `*bool` so a deliberate `false` can be sent over the wire.
207
207
- Multi-index `Req` types use `Index []string` (the spec spelling); v4's hand-written `Indices` is renamed.
208
-
- Plugin APIs (k-NN, ML, Security, ISM, etc.) live in `opensearchapi/plugins/`.
208
+
- Plugin APIs (k-NN, ML, Security, ISM, etc.) live in top-level `plugins/<name>` packages, imported as `github.com/opensearch-project/opensearch-go/v5/plugins/<name>`. v4's hand-written plugin clients (`opensearch-go/v4/plugins/{ism,security}`) are replaced by generated, spec-driven clients covering all 25 plugins; the package qualifier (e.g. `ism.X`) is unchanged.
209
209
210
210
For the full v4 -> v5 surface delta and the optional forward-compatible `replace` directive, see [`opensearchapi/MIGRATING.md`](opensearchapi/MIGRATING.md). For everyday usage (errors, routing, response handling) see [`opensearchapi/README.md`](opensearchapi/README.md).
0 commit comments