Skip to content
This repository has been archived by the owner on Feb 7, 2020. It is now read-only.

Swagger import Update Command -deletion of endpoints #19

Open
rathonit1 opened this issue Feb 15, 2018 · 4 comments
Open

Swagger import Update Command -deletion of endpoints #19

rathonit1 opened this issue Feb 15, 2018 · 4 comments

Comments

@rathonit1
Copy link

@schovi

An Updated on swagger import update command.

Looks like we need to modify it little bit, my Observations as follows:

If there is an existing endpoint configured in Mashery. And in swagger file somehow (mistakenly which is already running in production) deleted the endpoint or removed it.

And when we run swagger-import-update command, it deletes the endpoint from mashery which does not matches the names...

I think we should inform user about existing endpoint names and respective endpoint ID as a result that these are existing endpoints that are not available in swagger are present in mashery, if user want to delete them get confirmation else cancel it...

If user confirm to delete then we are good to go else we must not delete the endpoint which are not matching and get confirmation from user in such scenario.

@schovi
Copy link
Contributor

schovi commented Feb 16, 2018

Confirmation already print that it will be deleted nicely. And when you somehow mistakenly remove it from source, then you should fix it and return it there (to keep it consistent).
Maybe I can do something like summary

...
diff json
...

summary:
created: 1
updated: 3
deleted: 2

confirm (y/n):

c5bc9f37-a865-4501-be3c-0d52ff0f4c58

@rathonit1
Copy link
Author

@schovi in Summery

created: 1
updated: 3
deleted: 2

for create and update it is perfectly fine to show the details that will get updated in Mashery.

but specially for delete I think it is better to ask separately for the user confirmation to proceed further.
so flow will be as follows:
for create/update once user says Yes, got ahead and create it.
Finally for deletion of endpoint from mashery take user concern to proceed for delete (provide or display endpoint id/name as reference),
if user says yes then delete them,
otherwise don't delete.

Please let us your views.

@rathonit1
Copy link
Author

Hello @schovi ,
today tested on this part,
as agreed before can we have a summery like below, in next release :) ?

summary:
created: 1
updated: 3
deleted: 2

confirm (y/n):

@schovi
Copy link
Contributor

schovi commented Mar 23, 2018

@rathonit1 Know about it, but have it in queue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants