-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure correct OpenAPI 3.1.0 spec. (#646)
* Added Python and Ruby spec validators. Signed-off-by: dblock <[email protected]> * Add empty descriptions where missing and remove descriptions next to refs. Signed-off-by: dblock <[email protected]> * Replaced the validator compatible with OpenAPI 3.1. Signed-off-by: dblock <[email protected]> * Fixed incorrect style. Signed-off-by: dblock <[email protected]> * Added missing require. Signed-off-by: dblock <[email protected]> * Fix: schema null is not supported. Signed-off-by: dblock <[email protected]> * Removed unused required property. Signed-off-by: dblock <[email protected]> * Fix: added missing schema. Signed-off-by: dblock <[email protected]> * Fix: removed incorrect defaults. Signed-off-by: dblock <[email protected]> * Fix: added missing required. Signed-off-by: dblock <[email protected]> * Fix: removed incorrect required. Signed-off-by: dblock <[email protected]> * Removed incorrect externalDocs. Signed-off-by: dblock <[email protected]> * Document the ruby spec validator. Signed-off-by: dblock <[email protected]> * Fix: removed redundant content types. Signed-off-by: dblock <[email protected]> * Improve displaying of errors. Signed-off-by: dblock <[email protected]> * Normalize keys to be compatible with OpenAPI 3.1. Signed-off-by: dblock <[email protected]> * Removed superseeded operations that have unresolved parameters. Signed-off-by: dblock <[email protected]> * Fix: don't reduce error payload, allows to verify schema. Signed-off-by: dblock <[email protected]> * Fix: flow framework schema tests. Signed-off-by: dblock <[email protected]> * Fix: if no decision is made there's no weight ranking. Signed-off-by: dblock <[email protected]> * Fix: wrap indexing errors. Signed-off-by: dblock <[email protected]> * Added verbose logging of the story being evaluated. Signed-off-by: dblock <[email protected]> * Fix: security API test error responses. Signed-off-by: dblock <[email protected]> * Fix: duration ref. Signed-off-by: dblock <[email protected]> * Fix typo in property. Signed-off-by: dblock <[email protected]> * Fix superseeded operation parameters. Signed-off-by: dblock <[email protected]> * Fix: neural search error response. Signed-off-by: dblock <[email protected]> * Normalize fields. .replaceAll('::', '___') .replaceAll('@', '__') .replaceAll(':', '_') Signed-off-by: dblock <[email protected]> * Re-added default values into the schema. Signed-off-by: dblock <[email protected]> * Disallowed characters are replaced with ___. Signed-off-by: dblock <[email protected]> --------- Signed-off-by: dblock <[email protected]>
- Loading branch information
Showing
47 changed files
with
1,295 additions
and
501 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Validate Spec (Python) | ||
|
||
on: [pull_request,push] | ||
|
||
jobs: | ||
validate-spec-py: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Build | ||
run: npm ci && npm run merge | ||
|
||
- name: Set Up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install Dependencies | ||
working-directory: tools/src/validate-spec-py | ||
run: | | ||
pip install --user pipenv | ||
pipenv install | ||
- name: Validate Spec | ||
working-directory: tools/src/validate-spec-py | ||
run: | | ||
pipenv run python validate.py ../../../build/opensearch-openapi.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Validate Spec (Ruby) | ||
|
||
on: [pull_request, push] | ||
|
||
jobs: | ||
validate-spec-ruby: | ||
runs-on: ubuntu-latest | ||
env: | ||
BUNDLE_GEMFILE: ${{ github.workspace }}/tools/src/validate-spec-ruby/Gemfile | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Build | ||
run: npm ci && npm run merge | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.3' | ||
bundler-cache: true | ||
|
||
- name: Validate Spec | ||
working-directory: tools/src/validate-spec-ruby | ||
run: | | ||
bundle exec ruby validate.rb ../../../build/opensearch-openapi.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.