Skip to content

Commit

Permalink
Merge tag 'main' of github.com:opensearch-project/opensearch-api-spec…
Browse files Browse the repository at this point in the history
…ification into transforms
  • Loading branch information
djmadeira committed May 13, 2024
2 parents 0c8c85e + 6b36951 commit 5a9d284
Show file tree
Hide file tree
Showing 102 changed files with 2,022 additions and 797 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @abhivka7 @dblock @harshavamsi @pgtgrly @sachetalva @nhtruong @Xtansia @VachaShah
* @dblock @harshavamsi @sachetalva @nhtruong @Xtansia @VachaShah @Tokesh @aabeshov
7 changes: 2 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,10 @@ jobs:
node-version: '20'

- name: Build
working-directory: ./tools
run: |-
mkdir -p ../build
mkdir -p ./build
npm install
export ROOT_PATH=../spec
export OUTPUT_PATH=../build/opensearch-openapi.yaml
npm run merge -- $ROOT_PATH $OUTPUT_PATH
npm run merge -- --source ./spec --output ./build/opensearch-openapi.yaml
- name: Extract Branch Name
id: branch
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/coverage-gather.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Build Spec
working-directory: ./tools
run: |-
mkdir -p ../build
mkdir -p ./build
npm install
export ROOT_PATH=../spec
export OUTPUT_PATH=../build/opensearch-openapi.yaml
npm run merge -- $ROOT_PATH $OUTPUT_PATH
npm run merge -- --source ./spec --output ./build/opensearch-openapi.yaml
- name: Build and Run Docker Container
run: |
docker build coverage --tag opensearch-with-api-plugin
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
uses: lycheeverse/lychee-action@v1
with:
fail: true
args: --base . --verbose --no-progress './**/*.yaml' './**/*.yml' './**/*.md' './**/*.json' './**/*.ts' --exclude-path ./tools/package-lock.json
args: --base . --verbose --no-progress './**/*.yaml' './**/*.yml' './**/*.md' './**/*.json' './**/*.ts' --exclude-path ./package-lock.json
9 changes: 3 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,21 @@ on:
branches: ['**']
paths:
- 'spec/**'
- 'tools/linter/**'
- 'tools/src/linter/**'
pull_request:
branches: ['**']
paths:
- 'spec/**'
- 'tools/linter/**'
- 'tools/src/linter/**'

jobs:
lint-spec:
runs-on: ubuntu-latest
defaults:
run:
working-directory: tools
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20.10.0
- run: npm install
- run: |
npm run lint:spec -- ../spec
npm run lint:spec -- --source ./spec
3 changes: 0 additions & 3 deletions .github/workflows/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ on:
jobs:
tools-tests:
runs-on: ubuntu-latest
defaults:
run:
working-directory: tools
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ This repository includes several OpenAPI Specification Extensions to fill in any

## Tools

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`).
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`).

### Merger

Expand Down
14 changes: 11 additions & 3 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,20 @@ This document contains a list of maintainers in this repo. See [opensearch-proje
## Current Maintainers

| Maintainer | GitHub ID | Affiliation |
| -------------------- | --------------------------------------------- | ----------- |
| Abhi Kalra | [abhivka7](https://github.com/abhivka7) | Amazon |
|----------------------|-----------------------------------------------|-------------|
| Alen Abeshov | [aabeshov](https://github.com/aabeshov) | |
| Daniel Doubrovkine | [dblock](https://github.com/dblock) | Amazon |
| Harsha Vamsi Kalluri | [harshavamsi](https://github.com/harshavamsi) | Amazon |
| Pranav Garg | [pgtgrly](https://github.com/pgtgrly) | Amazon |
| Sachet Alva | [sachetalva](https://github.com/sachetalva) | Amazon |
| Theo Truong | [nhtruong](https://github.com/nhtruong) | Amazon |
| Thomas Farr | [Xtansia](https://github.com/Xtansia) | Amazon |
| Torekeldi Niyazbek | [Tokesh](https://github.com/Tokesh) | |
| Vacha Shah | [VachaShah](https://github.com/VachaShah) | Amazon |


## Emeritus

| Maintainer | GitHub ID | Affiliation |
|-------------|-----------------------------------------|-------------|
| Abhi Kalra | [abhivka7](https://github.com/abhivka7) | Amazon |
| Pranav Garg | [pgtgrly](https://github.com/pgtgrly) | Amazon |
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Click [here](https://github.com/opensearch-project/opensearch-api-specification/

## Security

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.
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.

## License

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## Reporting a Vulnerability

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.
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.
6 changes: 2 additions & 4 deletions _plugins/openapi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ module OpenAPI
def self.generate(_site, _payload)
return if @generated

Dir.chdir('tools') do
system 'npm install'
system 'npm run merge -- ../spec ../_site/opensearch-openapi.yaml'
end
system 'npm install'
system 'npm run merge -- --source ./spec --output ./_site/opensearch-openapi.yaml'

@generated = true
end
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion tools/jest.config.js → jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node'
testEnvironment: 'node',
moduleDirectories: ['node_modules', './tools/src']
}
18 changes: 18 additions & 0 deletions tools/package-lock.json → package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions tools/package.json → package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@
"author": "opensearch-project",
"license": "Apache-2.0",
"scripts": {
"merge": "ts-node merger/merge.ts",
"lint:spec": "ts-node linter/lint.ts",
"merge": "ts-node tools/src/merger/merge.ts",
"lint:spec": "ts-node tools/src/linter/lint.ts",
"lint": "eslint .",
"test": "jest"
},
"dependencies": {
"@apidevtools/swagger-parser": "^10.1.0",
"@commander-js/extra-typings": "^12.0.1",
"@types/lodash": "^4.14.202",
"@types/node": "^20.10.3",
"ajv": "^8.13.0",
"ajv-formats": "^3.0.1",
"commander": "^12.0.0",
"lodash": "^4.17.21",
"ts-node": "^10.9.1",
"typescript": "^5.4.5",
Expand Down
2 changes: 1 addition & 1 deletion spec/_info.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$schema: ../json_schemas/_info.schema.yaml
$schema: ./json_schemas/_info.schema.yaml

title: OpenSearch API Specification
version: 1.0.0
52 changes: 39 additions & 13 deletions spec/_superseded_operations.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$schema: ../json_schemas/_superseded_operations.schema.yaml
$schema: ./json_schemas/_superseded_operations.schema.yaml

/_opendistro/_alerting/destinations:
superseded_by: /_plugins/_alerting/destinations
Expand Down Expand Up @@ -368,6 +368,14 @@ $schema: ../json_schemas/_superseded_operations.schema.yaml
superseded_by: /_plugins/_rollup/jobs/{rollupID}/_stop
operations:
- POST
/_opendistro/_security/api/_upgrade_check/:
superseded_by: /_plugins/_security/api/_upgrade_check/
operations:
- GET
/_opendistro/_security/api/_upgrade_perform/:
superseded_by: /_plugins/_security/api/_upgrade_perform/
operations:
- POST
/_opendistro/_security/api/account:
superseded_by: /_plugins/_security/api/account
operations:
Expand All @@ -393,8 +401,8 @@ $schema: ../json_schemas/_superseded_operations.schema.yaml
operations:
- GET
- PUT
- DELETE
- PATCH
- DELETE
/_opendistro/_security/api/audit/:
superseded_by: /_plugins/_security/api/audit/
operations:
Expand Down Expand Up @@ -476,17 +484,33 @@ $schema: ../json_schemas/_superseded_operations.schema.yaml
superseded_by: /_plugins/_security/api/ssl/certs
operations:
- GET
/_opendistro/_security/api/ssl/{certType}/reloadcerts/:
superseded_by: /_plugins/_security/api/ssl/{certType}/reloadcerts/
/_opendistro/_security/api/ssl/transport/reloadcerts:
superseded_by: /_plugins/_security/api/ssl/transport/reloadcerts
operations:
- PUT
/_opendistro/_security/api/ssl/http/reloadcerts:
superseded_by: /_plugins/_security/api/ssl/http/reloadcerts
operations:
- PUT
/_opendistro/_security/api/nodesdn:
superseded_by: /_plugins/_security/api/nodesdn/
operations:
- GET
- PATCH
/_opendistro/_security/api/nodesdn/{cluster_name}:
superseded_by: /_plugins/_security/api/nodesdn/{cluster_name}
operations:
- GET
- PUT
- PATCH
- DELETE
/_opendistro/_security/api/tenancy/config:
superseded_by: /_plugins/_security/api/tenancy/config
operations:
- GET
- PUT
/_opendistro/_security/api/tenants/:
superseded_by: /_plugins/_security/api/tenants/
/_opendistro/_security/api/tenants:
superseded_by: /_plugins/_security/api/tenants
operations:
- GET
- PATCH
Expand All @@ -497,8 +521,8 @@ $schema: ../json_schemas/_superseded_operations.schema.yaml
- PUT
- DELETE
- PATCH
/_opendistro/_security/api/user/:
superseded_by: /_plugins/_security/api/user/
/_opendistro/_security/api/user:
superseded_by: /_plugins/_security/api/user
operations:
- GET
/_opendistro/_security/api/user/{name}:
Expand All @@ -521,6 +545,12 @@ $schema: ../json_schemas/_superseded_operations.schema.yaml
- GET
- PUT
- PATCH
/_opendistro/_security/api/allowlist:
superseded_by: /_plugins/_security/api/allowlist
operations:
- GET
- PUT
- PATCH
/_opendistro/_security/authinfo:
superseded_by: /_plugins/_security/authinfo
operations:
Expand All @@ -532,14 +562,10 @@ $schema: ../json_schemas/_superseded_operations.schema.yaml
- GET
- POST
/_opendistro/_security/kibanainfo:
superseded_by: /_plugins/_security/kibanainfo
superseded_by: /_plugins/_security/dashboardsinfo
operations:
- GET
- POST
/_opendistro/_security/sslinfo:
superseded_by: /_plugins/_security/sslinfo
operations:
- GET
/_opendistro/_security/tenantinfo:
superseded_by: /_plugins/_security/tenantinfo
operations:
Expand Down
Loading

0 comments on commit 5a9d284

Please sign in to comment.