-
Notifications
You must be signed in to change notification settings - Fork 36
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
Allow YAML Templates #296
Allow YAML Templates #296
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious if we should persist the template format when retrieving it via the Get Workflow API. IE returning the template in YAML if that's how the template was indexed. Looking at this section, I think it's possible to pass the desired media type when invoking channel.newBuilder()
.
Just an idea though for a potential improvement, this looks good to me overall :)
Signed-off-by: Daniel Widdis <widdis@gmail.com>
adfcc4f
to
54c0818
Compare
Hmm, interesting. When I created the template with
I'm not sure we store that info anywhere, it's internally just stored as XContent. Also it'll lose the comments (if any) and possibly change the ordering.
We should probably not force a specific content type for the return content type, but instead always use the content type the user specified (easily retrievable from |
c7128a0
into
opensearch-project:feature/agent_framework
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
@joshpalis Just did a test and if you use the Get Workflow API specifying
Reviewed our codebase and our only explicit use of JSON is:
So I don't think we need to do anything code-wise. We do have a lot of Javadocs that say "raw json" that really should just mean "raw XContent". |
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Description
Allows users to submit YAML templates. And CBOR or SMILE if they really want to.
Because comments.
Issues Resolved
Fixes #181 in code (still need to add to documentation).
Sample REST Query:
Output:
REST Query:
Output
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.