Rediff patches

Add 0002-disable-new-azure-sdk.patch: <REASON>
Drop 0002-Disable-new-azure-sdk.patch: <REASON>
This commit is contained in:
Sébastien Delafond
2024-12-11 18:00:42 +01:00
parent 7fcac4ed49
commit 237f43f8ba
3 changed files with 47 additions and 28 deletions
+33 -14
View File
@@ -2,29 +2,28 @@ From: =?utf-8?q?Andr=C3=A9_Roth?= <neolynx@gmail.com>
Date: Tue, 15 Oct 2024 12:09:33 +0200
Subject: Disable swagger
This can be enabled once the following modules make it into Debian:
- github.com/swaggo/files v1.0.1
- github.com/swaggo/gin-swagger v1.6.0
- github.com/swaggo/swag v1.16.3
---
api/router.go | 16 ++++++++--------
docs/index.go | 3 ---
docs/index.go.disabled | 3 +++
3 files changed, 11 insertions(+), 11 deletions(-)
api/router.go | 22 +++++++++++-----------
docs/index.go | 10 ----------
docs/index.go.disabled | 10 ++++++++++
3 files changed, 21 insertions(+), 21 deletions(-)
delete mode 100644 docs/index.go
create mode 100644 docs/index.go.disabled
diff --git a/api/router.go b/api/router.go
index ada14b8..835abb1 100644
index 3536ab0..7dbf16e 100644
--- a/api/router.go
+++ b/api/router.go
@@ -12,9 +12,9 @@
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/rs/zerolog/log"
- _ "github.com/aptly-dev/aptly/docs" // import docs
- "github.com/aptly-dev/aptly/docs"
- swaggerFiles "github.com/swaggo/files"
- ginSwagger "github.com/swaggo/gin-swagger"
+ // _ "github.com/aptly-dev/aptly/docs" // import docs
@@ -33,16 +32,22 @@ index ada14b8..835abb1 100644
)
var context *ctx.AptlyContext
@@ -72,11 +72,11 @@ func Router(c *ctx.AptlyContext) http.Handler {
@@ -68,14 +68,14 @@ func Router(c *ctx.AptlyContext) http.Handler {
router.Use(gin.Recovery(), gin.ErrorLogger())
- if c.Config().EnableSwaggerEndpoint {
- router.GET("docs.html", func(c *gin.Context) {
- c.Data(http.StatusOK, "text/html; charset=utf-8", docs.DocsHTML)
- })
- router.Use(redirectSwagger)
- url := ginSwagger.URL("/docs/doc.json")
- router.GET("/docs/*any", ginSwagger.WrapHandler(swaggerFiles.Handler, url))
- }
+ // if c.Config().EnableSwaggerEndpoint {
+ // router.GET("docs.html", func(c *gin.Context) {
+ // c.Data(http.StatusOK, "text/html; charset=utf-8", docs.DocsHTML)
+ // })
+ // router.Use(redirectSwagger)
+ // url := ginSwagger.URL("/docs/doc.json")
+ // router.GET("/docs/*any", ginSwagger.WrapHandler(swaggerFiles.Handler, url))
@@ -52,19 +57,33 @@ index ada14b8..835abb1 100644
MetricsCollectorRegistrar.Register(router)
diff --git a/docs/index.go b/docs/index.go
deleted file mode 100644
index da325d0..0000000
index ca4c914..0000000
--- a/docs/index.go
+++ /dev/null
@@ -1,3 +0,0 @@
@@ -1,10 +0,0 @@
-package docs
-
-import _ "github.com/swaggo/swag" // make sure swag is in go.mod
-import (
- _ "embed" // embed html below
-
- _ "github.com/swaggo/swag" // make sure swag is in go.mod
-)
-
-//go:embed docs.html
-var DocsHTML []byte
diff --git a/docs/index.go.disabled b/docs/index.go.disabled
new file mode 100644
index 0000000..da325d0
index 0000000..ca4c914
--- /dev/null
+++ b/docs/index.go.disabled
@@ -0,0 +1,3 @@
@@ -0,0 +1,10 @@
+package docs
+
+import _ "github.com/swaggo/swag" // make sure swag is in go.mod
+import (
+ _ "embed" // embed html below
+
+ _ "github.com/swaggo/swag" // make sure swag is in go.mod
+)
+
+//go:embed docs.html
+var DocsHTML []byte