-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Add a view only mode? #719
Comments
many like it more. many hate it. right now, it's a separate project, and I believe you can disable the editor portion. |
That would be great, but I can't find a setting for that in the config file: https://github.com/swagger-api/swagger-editor/blob/master/app/config/defaults.json What might it be? Should I just dig through the code to figure it out? |
yes, the primary author is on soma holiday right now so if you'd like to dig in yourself that'd be best. |
You can hide the editor pane in CSS, or I have had some success with modifying the router to simply not load the editor or header panes at all. But that was a nasty hack and not something that could be merged in. |
Hi, FYI, I want view-only mode too, so I made a sample project to achieve it: https://github.com/yewton/swagger-top-down-playground This uses Backend as storage and modifies the view to disable editor pain. |
may be #664 is a related issue. |
This is indeed a duplicate. Let's track in the other issue. |
You can customize the .pane.editor, .ui-splitbar{
display: none;
}
.pane.preview{
left: 0 !important;
width: 100% !important;
} With the following javascript you can start with the editor closed, but still have the ability to open it: SwaggerEditor.run(function($timeout){
$timeout(function(){
document.getElementsByClassName('ui-splitbar-icon-left')[0].click();
});
}); |
Its already mentioned there in swagger-editor.css file, so you can get this css code and override within your local html page. /**
.Pane1, |
Isn't the purpose of swagger-ui to only show the API Docs? |
Since Swagger Editor today renders better than Swagger UI, I would like to use Swagger Editor as a rendering engine for our API docs. For example, it renders securityDefinitions and lists all the models at the bottom.
Has this been discussed before? Seems quite simple to add a config flag to make this happen.
The text was updated successfully, but these errors were encountered: