Add ApiSpecFetcher for Fetching and Comparing API Specifications#900
Merged
owaiskazi19 merged 7 commits intoopensearch-project:mainfrom Oct 8, 2024
Merged
Conversation
Signed-off-by: Junwei Dai <junweid@amazon.com>
Signed-off-by: Junwei Dai <junweid@amazon.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #900 +/- ##
============================================
+ Coverage 78.04% 78.10% +0.06%
- Complexity 977 990 +13
============================================
Files 97 99 +2
Lines 4554 4599 +45
Branches 423 428 +5
============================================
+ Hits 3554 3592 +38
- Misses 823 827 +4
- Partials 177 180 +3 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Junwei Dai <junweid@amazon.com>
dbwiddis
reviewed
Oct 5, 2024
src/main/java/org/opensearch/flowframework/exception/ApiSpecParseException.java
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/util/ApiSpecFetcher.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/util/ApiSpecFetcher.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/util/ApiSpecFetcher.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opensearch/flowframework/util/ApiSpecFetcherTests.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/util/ApiSpecFetcher.java
Outdated
Show resolved
Hide resolved
owaiskazi19
reviewed
Oct 7, 2024
src/main/java/org/opensearch/flowframework/exception/ApiSpecParseException.java
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/util/ApiSpecFetcher.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opensearch/flowframework/workflow/RegisterAgentTests.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opensearch/flowframework/workflow/RegisterAgentTests.java
Show resolved
Hide resolved
Signed-off-by: Junwei Dai <junweid@amazon.com>
dbwiddis
reviewed
Oct 7, 2024
src/main/java/org/opensearch/flowframework/common/CommonValue.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/util/ApiSpecFetcher.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/util/ApiSpecFetcher.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opensearch/flowframework/exception/ApiSpecParseExceptionTests.java
Outdated
Show resolved
Hide resolved
owaiskazi19
reviewed
Oct 7, 2024
Signed-off-by: Junwei Dai <junweid@amazon.com>
dbwiddis
approved these changes
Oct 8, 2024
Member
dbwiddis
left a comment
There was a problem hiding this comment.
Approving with a few last items to clean up
src/test/java/org/opensearch/flowframework/util/ApiSpecFetcherTests.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opensearch/flowframework/util/ApiSpecFetcherTests.java
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/util/ApiSpecFetcher.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Junwei Dai <junweid@amazon.com>
owaiskazi19
reviewed
Oct 8, 2024
owaiskazi19
approved these changes
Oct 8, 2024
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Oct 8, 2024
* Added ApiSpecFetcher with test Signed-off-by: Junwei Dai <junweid@amazon.com> * remove duplication license Signed-off-by: Junwei Dai <junweid@amazon.com> * Add more test to pass test coverage check Signed-off-by: Junwei Dai <junweid@amazon.com> * new commit address all comments Signed-off-by: Junwei Dai <junweid@amazon.com> * new commit address all comments Signed-off-by: Junwei Dai <junweid@amazon.com> * Addressed all comments Signed-off-by: Junwei Dai <junweid@amazon.com> --------- Signed-off-by: Junwei Dai <junweid@amazon.com> Co-authored-by: Junwei Dai <junweid@amazon.com> (cherry picked from commit 57b8b59) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
7 tasks
dbwiddis
added a commit
that referenced
this pull request
Oct 9, 2024
…ifications (#906) * Add ApiSpecFetcher for Fetching and Comparing API Specifications (#900) * Added ApiSpecFetcher with test Signed-off-by: Junwei Dai <junweid@amazon.com> * remove duplication license Signed-off-by: Junwei Dai <junweid@amazon.com> * Add more test to pass test coverage check Signed-off-by: Junwei Dai <junweid@amazon.com> * new commit address all comments Signed-off-by: Junwei Dai <junweid@amazon.com> * new commit address all comments Signed-off-by: Junwei Dai <junweid@amazon.com> * Addressed all comments Signed-off-by: Junwei Dai <junweid@amazon.com> --------- Signed-off-by: Junwei Dai <junweid@amazon.com> Co-authored-by: Junwei Dai <junweid@amazon.com> (cherry picked from commit 57b8b59) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Add slf4j-api and jackson-core dependencies Signed-off-by: Daniel Widdis <widdis@gmail.com> --------- Signed-off-by: Junwei Dai <junweid@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Signed-off-by: Daniel Widdis <widdis@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Junwei Dai <junweid@amazon.com> Co-authored-by: Daniel Widdis <widdis@gmail.com>
5 tasks
1 task
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Introduced a new
ApiSpecFetcherutility to programmatically fetch and compare OpenAPI specifications.Supports comparing required input fields between an OpenAPI spec and predefined enum values.
The current implementation serves as a foundational mechanism, with the comparison logic successfully integrated into the
Register Agentworkflow.Future PRs will extend this mechanism to other workflow steps, ensuring consistent validation across the API specification.
Related Issues
Part of #651
Check List
--signoff.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.