Skip to content

Implement inline object schema validator#282

Merged
dblock merged 2 commits into
opensearch-project:mainfrom
Xtansia:feat/inline-object-schema-validator
May 6, 2024
Merged

Implement inline object schema validator#282
dblock merged 2 commits into
opensearch-project:mainfrom
Xtansia:feat/inline-object-schema-validator

Conversation

@Xtansia
Copy link
Copy Markdown
Collaborator

@Xtansia Xtansia commented May 6, 2024

Description

Implement a validator for inline object schemas aiming to ensure critical pathways use $refs so that we can determine a class name for the object schema when generating statically typed languages such as Java.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@Xtansia Xtansia force-pushed the feat/inline-object-schema-validator branch from 79ac284 to 12997ec Compare May 6, 2024 04:50
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2024

API specs implemented for 266/649 (40%) APIs.

Xtansia added 2 commits May 6, 2024 16:58
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
@Xtansia Xtansia force-pushed the feat/inline-object-schema-validator branch from 12997ec to 1336941 Compare May 6, 2024 04:59
@Xtansia Xtansia marked this pull request as ready for review May 6, 2024 05:00
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2024

API specs implemented for 266/649 (40%) APIs.

Copy link
Copy Markdown
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like SpecificationVisitor :)

@dblock dblock merged commit 909b02d into opensearch-project:main May 6, 2024
@nhtruong
Copy link
Copy Markdown
Contributor

nhtruong commented May 6, 2024

We should add tests for this.
I'll add them along with my next PR

@Xtansia Xtansia deleted the feat/inline-object-schema-validator branch May 6, 2024 21:45
@dblock
Copy link
Copy Markdown
Member

dblock commented May 7, 2024

We should add tests for this. I'll add them along with my next PR

Yes. I should have held back merging, sorry.

@Xtansia
Copy link
Copy Markdown
Collaborator Author

Xtansia commented May 7, 2024

Oversight on my part, I can add the tests @nhtruong

sinterstice added a commit to sinterstice/opensearch-api-specification that referenced this pull request May 7, 2024
additional paths

Fixed spec (opensearch-project#246)

Signed-off-by: saimedhi <saimedhi@amazon.com>

Fixed search_pipeline spec (opensearch-project#253)

Signed-off-by: saimedhi <saimedhi@amazon.com>

Updated API name: search_pipeline.create to search_pipeline.put (opensearch-project#254)

Signed-off-by: saimedhi <saimedhi@amazon.com>

Fixed search_pipeline.get spec (opensearch-project#255)

Signed-off-by: saimedhi <saimedhi@amazon.com>

Filled in Missing Defaults (opensearch-project#249)

* Filled in Missing Defaults

Signed-off-by: Theo Truong <theotr@amazon.com>

* # Wordings

Signed-off-by: Theo Truong <theotr@amazon.com>

---------

Signed-off-by: Theo Truong <theotr@amazon.com>

Replace pull_request_target workflow with two workflows that upload/download an artifact. (opensearch-project#251)

* Fix: replace pull_request_target with a download/upload artifact.

Signed-off-by: dblock <dblock@amazon.com>

* Use upload/download-artifact@v4.

Signed-off-by: dblock <dblock@amazon.com>

---------

Signed-off-by: dblock <dblock@amazon.com>

Fix: var -> const. (opensearch-project#258)

Signed-off-by: dblock <dblock@amazon.com>

Adds tools linter. (opensearch-project#260)

Signed-off-by: dblock <dblock@amazon.com>

Fix: '@typescript-eslint/indent': 'warn'. (opensearch-project#262)

Signed-off-by: dblock <dblock@amazon.com>

Removed default values from param description (opensearch-project#264)

Signed-off-by: saimedhi <saimedhi@amazon.com>

Generate _opendistro endpoints through merger tool (opensearch-project#257)

* Generate _opendistro endpoints through merger tool

Signed-off-by: Theo Truong <theotr@amazon.com>

* # Renamed `replaced` with `superseded`

Signed-off-by: Theo Truong <theotr@amazon.com>

* # Rebased DEVELOPER_GUIDE.md

Signed-off-by: Theo Truong <theotr@amazon.com>

* # Set Tabsize from 4 to 2

Signed-off-by: Theo Truong <theotr@amazon.com>

---------

Signed-off-by: Theo Truong <theotr@amazon.com>

Add _plugins/_notifications/channels API spec (opensearch-project#256)

* Add _plugins/_notifications/channels API

Signed-off-by: Sokratis Papadopoulos <sokratis.papadopoulos@cern.ch>

Fix obvious lints. (opensearch-project#265)

* Fix cosmetic autoformat lints.
* Fixed @typescript-eslint/no-unused-vars.
* Fixed eqeqeq.
* Fixed @typescript-eslint/consistent-type-imports.
* Fixed no-useless-return.
* Fixed @typescript-eslint/array-type.
* Rebased with changes on main.

Signed-off-by: dblock <dblock@amazon.com>

Update list notification channels url for externalDocs (opensearch-project#267)

Signed-off-by: Sokratis Papadopoulos <sokratis.papadopoulos@cern.ch>
Co-authored-by: Sokratis Papadopoulos <sokratis.papadopoulos@cern.ch>

Updated/Corrected Docs (opensearch-project#270)

* Updated/Corrected Docs

- README.md
- CLIENT_GENERATOR_GUIDE.md
- DEVELOPER_GUIDE.md
- ./tools/README.md

Signed-off-by: Theo Truong <theotr@amazon.com>

* # minor corrections

Signed-off-by: Theo Truong <theotr@amazon.com>

* # minor corrections

Signed-off-by: Theo Truong <theotr@amazon.com>

---------

Signed-off-by: Theo Truong <theotr@amazon.com>

Add lychee github action  for links checking (opensearch-project#269)

Corrected content type for bulk operations (opensearch-project#275)

* Corrected content type for bulk operations

Signed-off-by: Theo Truong <theotr@amazon.com>

* # linting

Signed-off-by: Theo Truong <theotr@amazon.com>

---------

Signed-off-by: Theo Truong <theotr@amazon.com>

Validate _superseded_operations.yaml against its JSON schema (opensearch-project#276)

* Validate _superseded_operations.yaml against its JSON schema

Signed-off-by: Theo Truong <theotr@amazon.com>

* # lint

Signed-off-by: Theo Truong <theotr@amazon.com>

* # lint

Signed-off-by: Theo Truong <theotr@amazon.com>

---------

Signed-off-by: Theo Truong <theotr@amazon.com>

Fixed Linting for Tools (opensearch-project#278)

Signed-off-by: Theo Truong <theotr@amazon.com>

Removed Root file since it's not needed anymore (opensearch-project#279)

Signed-off-by: Theo Truong <theotr@amazon.com>

Fixed missing global params (opensearch-project#280)

Signed-off-by: Theo Truong <theotr@amazon.com>

Added validation for _info.yaml (opensearch-project#281)

DRY'ed JSON schema validation logic

Signed-off-by: Theo Truong <theotr@amazon.com>

Implement inline object schema validator (opensearch-project#282)

* Implement inline object schema validator and underlying visitor pattern

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Fix spec lint error

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

---------

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

oops

fix lint
@nhtruong
Copy link
Copy Markdown
Contributor

nhtruong commented May 7, 2024

Sounds good :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants