-
Notifications
You must be signed in to change notification settings - Fork 499
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
asyncapi: adding tags on operation and operation trait is broken #2752
Comments
Hi @EricWittmann, Since wdyt? |
I see - so looking at the specifications, the issue is that in OpenAPI an operation has a So I think the right thing to do is to either clone or adapt the existing Tags section for the main form for use in other locations. The code in the OpenAPI editor is this:
So we just need to change that component so it takes something else besides the document. Or alternatively just clone that component and have it take an asyncapi Operation. Don't be too afraid to just brute-force this, since we're going to be rewriting the entire editor in React at some point anyway. |
Hi @EricWittmann, I created Apicurio/apicurio-data-models#824 to add required commands to handle tags on asyncapi OperationBase and MessageBase commands. When it's ok, you could publish version 1.1.28 like we discussed. I almost finished the PR for apicurio-studio to adapt the tags-section for operation and message based nodes. |
Hi @ben-lc thanks for the work. Unfortunately we have a problem in this repository right now. The JSweet project seems to be in a bit of a bad state. The infrastructure it uses is all down (including a repository that is required because it contains dependencies not available in maven central). Check this out: Without JSweet we cannot build or release apicurio-data-models. You'll notice that CI is failing for all the pending PRs. I have not yet tried to address this, as I have other priorities. I would have been happy to merge your changes and release, but cannot do so without figuring out a workaround. If you have any time to explore options, I'd be happy for the help. If not I'll need to find time to work on this sometime in the future. |
As a workaround to fix this offline repo issue, I created PR Apicurio/apicurio-data-models#826, to use a local maven repo to get artifacts |
Hi @EricWittmann, do you have any feedback on my solution ? |
Sorry for the delay (as always). I like this as a temporary solution. I've merged it, and will try porting it to FYI we are considering forking JSweet into the Apicurio org as a longer term solution. |
Release |
Great thanks. |
Expected Behavior
When an asyncapi document is edited, setting a tag on operation or operation traits should save the tag and allow to continue editing.
Actual Behavior
When tag is set,
TypeError: e.accept is not a function
will be thrown at any further ui action and broke the ui.Steps to Reproduce the Problem
Specifications
Cause
In
info-section.component.ts
whenchangeTags
method is called after a tag is added,createChangePropertyCommand
is used to update thetags
property with a string array as new property. But expected type for tags property isList<Tag>
in apicurio-data-models as required by asyncapi spec, so theAaiTraverser#traverseOperationBase
will get a string instead of Tag node and throw the exception when trying to visit.The text was updated successfully, but these errors were encountered: