MCPcopy Index your code
hub / github.com/NdoleStudio/httpsms / RegisterSwaggerRoutes

Method RegisterSwaggerRoutes

api/pkg/di/container.go:1714–1727  ·  view source on GitHub ↗

RegisterSwaggerRoutes registers routes for swagger

()

Source from the content-addressed store, hash-verified

1712
1713// RegisterSwaggerRoutes registers routes for swagger
1714func (container *Container) RegisterSwaggerRoutes() {
1715 container.logger.Debug(fmt.Sprintf("registering %T routes", swagger.HandlerDefault))
1716 container.App().Get("/*", swagger.New(swagger.Config{
1717 Title: docs.SwaggerInfo.Title,
1718 CustomScript: `
1719 document.addEventListener("DOMContentLoaded", function(event) {
1720 document.body.style.margin = '0';
1721 var links = document.querySelectorAll("link[rel~='icon']");
1722 links.forEach(function (link) {
1723 link.href = 'https://httpsms.com/favicon.ico';
1724 });
1725 });`,
1726 }))
1727}
1728
1729// HeartbeatRepository registers a new instance of repositories.HeartbeatRepository
1730func (container *Container) HeartbeatRepository() repositories.HeartbeatRepository {

Callers 1

NewContainerFunction · 0.80

Calls 3

AppMethod · 0.95
DebugMethod · 0.65
GetMethod · 0.65

Tested by

no test coverage detected