-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
imp #13: Addig swagger default endpoint
- Loading branch information
Showing
10 changed files
with
752 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,198 @@ | ||
// Package docs Code generated by swaggo/swag. DO NOT EDIT | ||
package docs | ||
|
||
import "github.com/swaggo/swag" | ||
|
||
const docTemplate = `{ | ||
"schemes": {{ marshal .Schemes }}, | ||
"swagger": "2.0", | ||
"info": { | ||
"description": "{{escape .Description}}", | ||
"title": "{{.Title}}", | ||
"contact": {}, | ||
"version": "{{.Version}}" | ||
}, | ||
"host": "{{.Host}}", | ||
"basePath": "{{.BasePath}}", | ||
"paths": { | ||
"/debug": { | ||
"get": { | ||
"description": "Get lots of info from running container headers/ips", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"summary": "Debug", | ||
"operationId": "debug", | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/env": { | ||
"get": { | ||
"security": [ | ||
{ | ||
"BearerAuth": [] | ||
} | ||
], | ||
"description": "Get the env variables available to the api. This is behind auth", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"summary": "Get environment variables", | ||
"operationId": "env", | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"401": { | ||
"description": "Unauthorized", | ||
"schema": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/headers": { | ||
"get": { | ||
"description": "Get the headers recieved by the api", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"summary": "Get headers", | ||
"operationId": "headers", | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/health": { | ||
"get": { | ||
"description": "Get the health of the api", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"summary": "Get health", | ||
"operationId": "health", | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/healthz": { | ||
"get": { | ||
"description": "Get the health of the api", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"summary": "Get healthz", | ||
"operationId": "healthz", | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/ping": { | ||
"get": { | ||
"description": "Get the readyness of the api", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"summary": "Get ping", | ||
"operationId": "ping", | ||
"responses": { | ||
"200": { | ||
"description": "PONG", | ||
"schema": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/ready": { | ||
"get": { | ||
"description": "Get the readyness of the api", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"summary": "Get ready", | ||
"operationId": "ready", | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/readyz": { | ||
"get": { | ||
"description": "Get the readyness of the api", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"summary": "Get readyz", | ||
"operationId": "readyz", | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}` | ||
|
||
// SwaggerInfo holds exported Swagger Info so clients can modify it | ||
var SwaggerInfo = &swag.Spec{ | ||
Version: "2.0", | ||
Host: "localhost:8080", | ||
BasePath: "/", | ||
Schemes: []string{}, | ||
Title: "Cluster Util API", | ||
Description: "This is a util api which lots of endpoints making it easy to test routing/ingress/egress", | ||
InfoInstanceName: "swagger", | ||
SwaggerTemplate: docTemplate, | ||
LeftDelim: "{{", | ||
RightDelim: "}}", | ||
} | ||
|
||
func init() { | ||
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) | ||
} |
Oops, something went wrong.