Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate all schemas defined in the spec as valid JSON schemas #294

Merged
merged 1 commit into from
May 17, 2024

Conversation

nhtruong
Copy link
Collaborator

  • Updated default arg values for merge.ts
  • Added silencing feature for merger tool
  • Added SchemasValidator

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.

Copy link

github-actions bot commented May 13, 2024

API specs implemented for 307/649 (47%) APIs.
Commit c6fbbc2.

tools/src/merger/OpenApiMerger.ts Outdated Show resolved Hide resolved
tools/src/merger/SupersededOpsGenerator.ts Outdated Show resolved Hide resolved
@nhtruong nhtruong marked this pull request as draft May 14, 2024 14:53
@nhtruong
Copy link
Collaborator Author

nhtruong commented May 14, 2024

Converting this to draft because I've just discovered that I can turn strict mode on and it's catching a lot more infractions in our current spec. Look into that now

Copy link

API specs implemented for 307/649 (47%) APIs.

5 similar comments
Copy link

API specs implemented for 307/649 (47%) APIs.

Copy link

API specs implemented for 307/649 (47%) APIs.

Copy link

API specs implemented for 307/649 (47%) APIs.

Copy link

API specs implemented for 307/649 (47%) APIs.

Copy link

API specs implemented for 307/649 (47%) APIs.

@nhtruong
Copy link
Collaborator Author

nhtruong commented May 14, 2024

API specs implemented for 307/649 (47%) APIs.

@dblock These comments are getting out of hand 😅 There should be a cool down period, or maybe it should only be triggered when the PR is first created and/or ONLY run it constantly like this when a certain tag is attached to the PR?

@dblock
Copy link
Member

dblock commented May 14, 2024

API specs implemented for 307/649 (47%) APIs.

@dblock These comments are getting out of hand 😅 There should be a cool down period, or maybe it should only be triggered when the PR is first created and/or ONLY run it constantly like this when a certain tag is attached to the PR?

For sure. It could delete the previous comment/update the existing one, etc. Feel free to open an issue.

@nhtruong nhtruong marked this pull request as ready for review May 14, 2024 17:09
Copy link

API specs implemented for 307/649 (47%) APIs.

@nhtruong
Copy link
Collaborator Author

@dblock @Xtansia This is ready for review again

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

It's not a lot of changes, but you might want to split up logger changes.

tools/src/logger.ts Outdated Show resolved Hide resolved
tools/src/logger.ts Outdated Show resolved Hide resolved
Copy link

API specs implemented for 307/649 (47%) APIs.

1 similar comment
Copy link

API specs implemented for 307/649 (47%) APIs.

Copy link

API specs implemented for 307/649 (47%) APIs.

dblock
dblock previously approved these changes May 17, 2024
Copy link
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.

Write tests for logger, flip order. Sorry to be annoying ;) Otherwise this PR LGTM.

export enum LogLevel {
info = 1,
warn = 2,
error = 3
Copy link
Member

Choose a reason for hiding this comment

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

In all the loggers the order is usually the other way around, you should flip these.

https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ahhh Today I learned. Thanks

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's been updated now. I've squashed all commits too. Feel free to merge it after approving.

- Updated default arg values for merge.ts
- Added Logger to silence merger tool's warnings
- Added SchemasValidator

Signed-off-by: Theo Truong <[email protected]>
@dblock dblock merged commit b253667 into opensearch-project:main May 17, 2024
6 checks passed
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