-
Notifications
You must be signed in to change notification settings - Fork 19
Conversation
… errors in the review step
PR Storybook available here |
PR Storybook available here |
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.
👍
Pull request approved by @gashcrumb - applying approved label |
I think there's an explicit Save button, so the change your mind bit should be clicking on Cancel, when put this way I think this makes sense.
I think in the Angular UI we saved the integration before editing the API definition in Apicurio in that case changes to the flows will be preserved. |
This is an issue, the react ui doesn’t force a save ever, so we can’t guarantee this flow. What would fix this is a version of the api that takes an integration object instead of an integration id, so that we could forward the integration in whatever state it is while the user is working. Does this make sense? |
We could do a multipart |
Think so but why the id? This could happen for new integrations yet to be saved. |
That's because we start with the OpenAPI document and create an Integration from it via |
Right but again, the integration could not be saved. Anyway, if we store the spec in the metadata we don’t need the specification endpoint anymore, don’t we? We just need the generator one, and that’s the one that should accept both an integration and the spec in the body |
Sure we can do that, there's one caveat I'm a bit hesitant to store the OpenAPI specification in metadata as it will be persisted alongside the Integration, and that will be (in general) a large JSON in JSON document which will lead to performance issues. (we're kinda using the word I'm thinking we probably need the specification endpoint, but we can create one without side effects. To refactor this fully we would:
Does that make sense? |
Not sure about 4, doesn't that exist already? It's also a bit problematic to keep hold of the specification for us if it's not stored in the integration itself, the whole editor app is stateless - data gets passed from route to route - and we would have to add the specification string to this passing. It's definitely not ideal. |
I think this discussion just uncovered a bunch of stuff we need discuss and design better, perhaps best done interactively. I suggest that for the time being we can do the simplest thing, does just adding one endpoint, something like |
I think that would patch this, yep! |
I've created syndesisio/syndesis#5719 and I'll work on it right away. |
Partially fixes syndesisio/syndesis#5697
Partially fixes syndesisio/syndesis#5600
Fixes syndesisio/syndesis#5675
Fixes #397
Fixes syndesisio/syndesis#5665
Since the spec is returned by an API, every time you go to the API definition you get the one relative to the last saved version of the integration.
So if edit the definition, change your mind and try to edit it again, you'll lose the previous changes.
Also, this will completely delete whatever was present on the integration before the change in the spec. @zregvart can you confirm this is right?