improved api docs styling (#2085)

This commit is contained in:
Kevin Papst
2020-11-02 10:58:38 +01:00
committed by GitHub
parent 2d3c46957f
commit 1757ffd8ee
2 changed files with 5 additions and 7 deletions

View File

@@ -41,16 +41,10 @@ nelmio_api_doc:
path_patterns: path_patterns:
- ^/api(?!/doc) - ^/api(?!/doc)
documentation: documentation:
#host: '{{hostname}}'
host: '%router.request_context.host%'
basePath: '%router.request_context.base_url%'
schemes: ['%router.request_context.scheme%']
info: info:
title: Kimai 2 - API Docs title: Kimai 2 - API Docs
description: | description: |
JSON API for the Kimai 2 time-tracking software. Read more about its usage in the [API documentation](https://www.kimai.org/documentation/rest-api.html) and then download a [Swagger file](doc.json) for import e.g. in Postman. JSON API for the Kimai 2 time-tracking software: [API documentation](https://www.kimai.org/documentation/rest-api.html), [Swagger definition file](doc.json)
Be aware: it is not yet considered stable and BC breaks might happen, especially when using code generation.
The order of JSON attributes is not guaranteed.
version: '0.6' version: '0.6'
securityDefinitions: securityDefinitions:
apiUser: apiUser:

View File

@@ -5,5 +5,9 @@
<style type="text/css"> <style type="text/css">
body { margin-top: 0; } body { margin-top: 0; }
header { display:none; } header { display:none; }
#swagger-ui .information-container pre.base-url { display:none; }
#swagger-ui .scheme-container { margin-top: -120px; box-shadow: none; height: 120px; }
#swagger-ui .information-container .info { padding-top: 5px; padding-bottom: 5px; }
#swagger-ui.api-platform .information-container.wrapper { margin-bottom: -65px; border-bottom: none; }
</style> </style>
{% endblock %} {% endblock %}