Revert all models at once to use default template

All of our models currently use the same template which is a custom template which we've added as the default template in smartdocs configuration.

Occassionally we make improvements to the template. But then we have to go into each model, go to "settings" and "revert to default template." Too bad when the default template changes it isn't applied to all models that were using the default.

I'm not averse to working directly with the database, but I can't find where this information is stored.

Is there any way that we can get multiple models to bulk revert to default?

Thank you.

0 1 109
1 REPLY 1

rmishra
Participant V
@Shai Gluskin

I am not aware of a native dev portal way of doing it but there is alteast one possible way to do it.

The management server exposes API's to create/update API Models, Create/update API Templates for those models and Register Swagger specification with the model and template.

You could write a simple script leveraging these API's - extract existing stuff using the GET API's and begin to make changes using the update API's.

I believe there is a maven plugin to register an api model, template, swagger spec to the dev portal. You could get creative with that as well.