Skip to content

Commit 9fece7c

Browse files
committed
Add Transforms API Schema
Signed-off-by: djmadeira <djmadeira@me.com>
1 parent 909b02d commit 9fece7c

File tree

104 files changed

+2494
-800
lines changed

Some content is hidden

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

104 files changed

+2494
-800
lines changed

.github/CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @abhivka7 @dblock @harshavamsi @pgtgrly @sachetalva @nhtruong @Xtansia @VachaShah
1+
* @dblock @harshavamsi @sachetalva @nhtruong @Xtansia @VachaShah @Tokesh @aabeshov

.github/workflows/build.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,10 @@ jobs:
2121
node-version: '20'
2222

2323
- name: Build
24-
working-directory: ./tools
2524
run: |-
26-
mkdir -p ../build
25+
mkdir -p ./build
2726
npm install
28-
export ROOT_PATH=../spec
29-
export OUTPUT_PATH=../build/opensearch-openapi.yaml
30-
npm run merge -- $ROOT_PATH $OUTPUT_PATH
27+
npm run merge -- --source ./spec --output ./build/opensearch-openapi.yaml
3128
3229
- name: Extract Branch Name
3330
id: branch

.github/workflows/coverage-gather.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,10 @@ jobs:
1515
- name: Checkout Repo
1616
uses: actions/checkout@v2
1717
- name: Build Spec
18-
working-directory: ./tools
1918
run: |-
20-
mkdir -p ../build
19+
mkdir -p ./build
2120
npm install
22-
export ROOT_PATH=../spec
23-
export OUTPUT_PATH=../build/opensearch-openapi.yaml
24-
npm run merge -- $ROOT_PATH $OUTPUT_PATH
21+
npm run merge -- --source ./spec --output ./build/opensearch-openapi.yaml
2522
- name: Build and Run Docker Container
2623
run: |
2724
docker build coverage --tag opensearch-with-api-plugin

.github/workflows/links.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ jobs:
1414
uses: lycheeverse/lychee-action@v1
1515
with:
1616
fail: true
17-
args: --base . --verbose --no-progress './**/*.yaml' './**/*.yml' './**/*.md' './**/*.json' './**/*.ts' --exclude-path ./tools/package-lock.json
17+
args: --base . --verbose --no-progress './**/*.yaml' './**/*.yml' './**/*.md' './**/*.json' './**/*.ts' --exclude-path ./package-lock.json

.github/workflows/lint.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,21 @@ on:
55
branches: ['**']
66
paths:
77
- 'spec/**'
8-
- 'tools/linter/**'
8+
- 'tools/src/linter/**'
99
pull_request:
1010
branches: ['**']
1111
paths:
1212
- 'spec/**'
13-
- 'tools/linter/**'
13+
- 'tools/src/linter/**'
1414

1515
jobs:
1616
lint-spec:
1717
runs-on: ubuntu-latest
18-
defaults:
19-
run:
20-
working-directory: tools
2118
steps:
2219
- uses: actions/checkout@v3
2320
- uses: actions/setup-node@v3
2421
with:
2522
node-version: 20.10.0
2623
- run: npm install
2724
- run: |
28-
npm run lint:spec -- ../spec
25+
npm run lint:spec -- --source ./spec

.github/workflows/tools.yml

-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ on:
1313
jobs:
1414
tools-tests:
1515
runs-on: ubuntu-latest
16-
defaults:
17-
run:
18-
working-directory: tools
1916
steps:
2017
- uses: actions/checkout@v3
2118
- uses: actions/setup-node@v3

DEVELOPER_GUIDE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ This repository includes several OpenAPI Specification Extensions to fill in any
118118

119119
## Tools
120120

121-
We authored a number of tools to merge and lint specs that live in [tools](tools). All tools have tests (run with `npm run test`) and a linter (run with `npm run lint`).
121+
We authored a number of tools to merge and lint specs that live in [tools](./tools/src/). All tools have tests (run with `npm run test`) and a linter (run with `npm run lint`).
122122

123123
### Merger
124124

MAINTAINERS.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,20 @@ This document contains a list of maintainers in this repo. See [opensearch-proje
88
## Current Maintainers
99

1010
| Maintainer | GitHub ID | Affiliation |
11-
| -------------------- | --------------------------------------------- | ----------- |
12-
| Abhi Kalra | [abhivka7](https://github.com/abhivka7) | Amazon |
11+
|----------------------|-----------------------------------------------|-------------|
12+
| Alen Abeshov | [aabeshov](https://github.com/aabeshov) | |
1313
| Daniel Doubrovkine | [dblock](https://github.com/dblock) | Amazon |
1414
| Harsha Vamsi Kalluri | [harshavamsi](https://github.com/harshavamsi) | Amazon |
15-
| Pranav Garg | [pgtgrly](https://github.com/pgtgrly) | Amazon |
1615
| Sachet Alva | [sachetalva](https://github.com/sachetalva) | Amazon |
1716
| Theo Truong | [nhtruong](https://github.com/nhtruong) | Amazon |
1817
| Thomas Farr | [Xtansia](https://github.com/Xtansia) | Amazon |
18+
| Torekeldi Niyazbek | [Tokesh](https://github.com/Tokesh) | |
1919
| Vacha Shah | [VachaShah](https://github.com/VachaShah) | Amazon |
20+
21+
22+
## Emeritus
23+
24+
| Maintainer | GitHub ID | Affiliation |
25+
|-------------|-----------------------------------------|-------------|
26+
| Abhi Kalra | [abhivka7](https://github.com/abhivka7) | Amazon |
27+
| Pranav Garg | [pgtgrly](https://github.com/pgtgrly) | Amazon |

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Click [here](https://github.com/opensearch-project/opensearch-api-specification/
5252

5353
## Security
5454

55-
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/) or directly via email to aws-security@amazon.com. Please do **not** create a public GitHub issue.
55+
If you discover a potential security issue in this project we ask that you notify OpenSearch Security directly via email to security@opensearch.org. Please do **not** create a public GitHub issue.
5656

5757
## License
5858

SECURITY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
## Reporting a Vulnerability
22

3-
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/) or directly via email to aws-security@amazon.com. Please do **not** create a public GitHub issue.
3+
If you discover a potential security issue in this project we ask that you notify OpenSearch Security directly via email to security@opensearch.org. Please do **not** create a public GitHub issue.

_plugins/openapi.rb

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ module OpenAPI
22
def self.generate(_site, _payload)
33
return if @generated
44

5-
Dir.chdir('tools') do
6-
system 'npm install'
7-
system 'npm run merge -- ../spec ../_site/opensearch-openapi.yaml'
8-
end
5+
system 'npm install'
6+
system 'npm run merge -- --source ./spec --output ./_site/opensearch-openapi.yaml'
97

108
@generated = true
119
end
File renamed without changes.
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/** @type {import('ts-jest').JestConfigWithTsJest} */
22
module.exports = {
33
preset: 'ts-jest',
4-
testEnvironment: 'node'
4+
testEnvironment: 'node',
5+
moduleDirectories: ['node_modules', './tools/src']
56
}

tools/package-lock.json package-lock.json

+18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/package.json package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,19 @@
55
"author": "opensearch-project",
66
"license": "Apache-2.0",
77
"scripts": {
8-
"merge": "ts-node merger/merge.ts",
9-
"lint:spec": "ts-node linter/lint.ts",
8+
"merge": "ts-node tools/src/merger/merge.ts",
9+
"lint:spec": "ts-node tools/src/linter/lint.ts",
1010
"lint": "eslint .",
1111
"test": "jest"
1212
},
1313
"dependencies": {
1414
"@apidevtools/swagger-parser": "^10.1.0",
15+
"@commander-js/extra-typings": "^12.0.1",
1516
"@types/lodash": "^4.14.202",
1617
"@types/node": "^20.10.3",
1718
"ajv": "^8.13.0",
1819
"ajv-formats": "^3.0.1",
20+
"commander": "^12.0.0",
1921
"lodash": "^4.17.21",
2022
"ts-node": "^10.9.1",
2123
"typescript": "^5.4.5",

spec/_info.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$schema: ../json_schemas/_info.schema.yaml
1+
$schema: ./json_schemas/_info.schema.yaml
22

33
title: OpenSearch API Specification
44
version: 1.0.0

spec/_superseded_operations.yaml

+39-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$schema: ../json_schemas/_superseded_operations.schema.yaml
1+
$schema: ./json_schemas/_superseded_operations.schema.yaml
22

33
/_opendistro/_alerting/destinations:
44
superseded_by: /_plugins/_alerting/destinations
@@ -368,6 +368,14 @@ $schema: ../json_schemas/_superseded_operations.schema.yaml
368368
superseded_by: /_plugins/_rollup/jobs/{rollupID}/_stop
369369
operations:
370370
- POST
371+
/_opendistro/_security/api/_upgrade_check/:
372+
superseded_by: /_plugins/_security/api/_upgrade_check/
373+
operations:
374+
- GET
375+
/_opendistro/_security/api/_upgrade_perform/:
376+
superseded_by: /_plugins/_security/api/_upgrade_perform/
377+
operations:
378+
- POST
371379
/_opendistro/_security/api/account:
372380
superseded_by: /_plugins/_security/api/account
373381
operations:
@@ -393,8 +401,8 @@ $schema: ../json_schemas/_superseded_operations.schema.yaml
393401
operations:
394402
- GET
395403
- PUT
396-
- DELETE
397404
- PATCH
405+
- DELETE
398406
/_opendistro/_security/api/audit/:
399407
superseded_by: /_plugins/_security/api/audit/
400408
operations:
@@ -476,17 +484,33 @@ $schema: ../json_schemas/_superseded_operations.schema.yaml
476484
superseded_by: /_plugins/_security/api/ssl/certs
477485
operations:
478486
- GET
479-
/_opendistro/_security/api/ssl/{certType}/reloadcerts/:
480-
superseded_by: /_plugins/_security/api/ssl/{certType}/reloadcerts/
487+
/_opendistro/_security/api/ssl/transport/reloadcerts:
488+
superseded_by: /_plugins/_security/api/ssl/transport/reloadcerts
489+
operations:
490+
- PUT
491+
/_opendistro/_security/api/ssl/http/reloadcerts:
492+
superseded_by: /_plugins/_security/api/ssl/http/reloadcerts
493+
operations:
494+
- PUT
495+
/_opendistro/_security/api/nodesdn:
496+
superseded_by: /_plugins/_security/api/nodesdn/
497+
operations:
498+
- GET
499+
- PATCH
500+
/_opendistro/_security/api/nodesdn/{cluster_name}:
501+
superseded_by: /_plugins/_security/api/nodesdn/{cluster_name}
481502
operations:
503+
- GET
482504
- PUT
505+
- PATCH
506+
- DELETE
483507
/_opendistro/_security/api/tenancy/config:
484508
superseded_by: /_plugins/_security/api/tenancy/config
485509
operations:
486510
- GET
487511
- PUT
488-
/_opendistro/_security/api/tenants/:
489-
superseded_by: /_plugins/_security/api/tenants/
512+
/_opendistro/_security/api/tenants:
513+
superseded_by: /_plugins/_security/api/tenants
490514
operations:
491515
- GET
492516
- PATCH
@@ -497,8 +521,8 @@ $schema: ../json_schemas/_superseded_operations.schema.yaml
497521
- PUT
498522
- DELETE
499523
- PATCH
500-
/_opendistro/_security/api/user/:
501-
superseded_by: /_plugins/_security/api/user/
524+
/_opendistro/_security/api/user:
525+
superseded_by: /_plugins/_security/api/user
502526
operations:
503527
- GET
504528
/_opendistro/_security/api/user/{name}:
@@ -521,6 +545,12 @@ $schema: ../json_schemas/_superseded_operations.schema.yaml
521545
- GET
522546
- PUT
523547
- PATCH
548+
/_opendistro/_security/api/allowlist:
549+
superseded_by: /_plugins/_security/api/allowlist
550+
operations:
551+
- GET
552+
- PUT
553+
- PATCH
524554
/_opendistro/_security/authinfo:
525555
superseded_by: /_plugins/_security/authinfo
526556
operations:
@@ -532,14 +562,10 @@ $schema: ../json_schemas/_superseded_operations.schema.yaml
532562
- GET
533563
- POST
534564
/_opendistro/_security/kibanainfo:
535-
superseded_by: /_plugins/_security/kibanainfo
565+
superseded_by: /_plugins/_security/dashboardsinfo
536566
operations:
537567
- GET
538568
- POST
539-
/_opendistro/_security/sslinfo:
540-
superseded_by: /_plugins/_security/sslinfo
541-
operations:
542-
- GET
543569
/_opendistro/_security/tenantinfo:
544570
superseded_by: /_plugins/_security/tenantinfo
545571
operations:

0 commit comments

Comments
 (0)