Is it possible to remove the logo header shown in the web-based output of NelmioApiDocBundle? And if so, how?
I would like to include the output of this endpoint (/api/doc
if you're using the default settings) in an existing website. However, that site already has a header, and adding a second header would be a poor user experience IMHO. But I can't find any place in the
CodePudding user response:
Yes, you can do it.
You should override bundle template, say steps bellow :
1 - Create template file in 'templates/bundles/NelmioApiDocBundle/SwaggerUi/index.html.twig'
2 - Put the content bellow :
{% extends '@!NelmioApiDoc/SwaggerUi/index.html.twig' %}
{% block header %}
<a style="text-decoration: none;" id="logo" href="#" target="_blank">
<h1 style="color: black">You personal title</h1>
</a>
{% endblock %}
That's it , we done