Mezatsong / laravel-swagger-docs

MIT License
20 stars 8 forks source link

CANNOT CUSTOMIZE TO REMOVE THE SCHEMA SECTION BELOW #18

Open Whizboy-Arnold opened 8 months ago

Whizboy-Arnold commented 8 months ago

I have gone through the whole config file, i cant seem to find any config that will make the schema section on the generated ui go away

jtepe-sedna commented 1 month ago

@Whizboy-Arnold in the resources/views/vendor/swager/index.blade.php add defaultModelsExpandDepth: -1, to the SwaggerUIBundle like this

window.onload = function() {
                const ui = SwaggerUIBundle({
                    url: "{!! $urlToDocs !!}",
                    dom_id: '#swagger-ui',
                    deepLinking: true,
                    presets: [
                        SwaggerUIBundle.presets.apis,
                        SwaggerUIStandalonePreset
                    ],
                    plugins: [
                        SwaggerUIBundle.plugins.DownloadUrl
                    ],
                    layout: "BaseLayout",
                    defaultModelsExpandDepth: -1, // hide models
                });

                window.ui = ui;
            }
Mezatsong commented 2 weeks ago

@Whizboy-Arnold is your problem solved ?

Whizboy-Arnold commented 2 weeks ago

Ah thanks, it has been a while since i handled that part, i just got used to editing the json manually, as i also wanted to customize what endpoints to include and which to exclude. This would help and i think i can revisit and see. Thank you for your package and support