removed the example routes

This commit is contained in:
James Tombleson 2023-01-21 17:56:25 -08:00
parent c6cdec8e66
commit 4fce1da63c
4 changed files with 0 additions and 170 deletions

View File

@ -304,51 +304,6 @@ const docTemplate = `{
"responses": {} "responses": {}
} }
}, },
"/hello/{who}": {
"get": {
"produces": [
"text/plain"
],
"tags": [
"Debug"
],
"summary": "Responds back with \"Hello x\" depending on param passed in.",
"parameters": [
{
"type": "string",
"description": "Who",
"name": "who",
"in": "path",
"required": true
}
],
"responses": {}
}
},
"/helloworld": {
"get": {
"produces": [
"text/plain"
],
"tags": [
"Debug"
],
"summary": "Responds back with \"Hello world!\"",
"responses": {}
}
},
"/ping": {
"get": {
"produces": [
"text/plain"
],
"tags": [
"Debug"
],
"summary": "Sends back \"pong\". Good to test with.",
"responses": {}
}
},
"/queue/discord/webhooks": { "/queue/discord/webhooks": {
"get": { "get": {
"produces": [ "produces": [

View File

@ -295,51 +295,6 @@
"responses": {} "responses": {}
} }
}, },
"/hello/{who}": {
"get": {
"produces": [
"text/plain"
],
"tags": [
"Debug"
],
"summary": "Responds back with \"Hello x\" depending on param passed in.",
"parameters": [
{
"type": "string",
"description": "Who",
"name": "who",
"in": "path",
"required": true
}
],
"responses": {}
}
},
"/helloworld": {
"get": {
"produces": [
"text/plain"
],
"tags": [
"Debug"
],
"summary": "Responds back with \"Hello world!\"",
"responses": {}
}
},
"/ping": {
"get": {
"produces": [
"text/plain"
],
"tags": [
"Debug"
],
"summary": "Sends back \"pong\". Good to test with.",
"responses": {}
}
},
"/queue/discord/webhooks": { "/queue/discord/webhooks": {
"get": { "get": {
"produces": [ "produces": [

View File

@ -432,36 +432,6 @@ paths:
tags: tags:
- Discord - Discord
- Webhook - Webhook
/hello/{who}:
get:
parameters:
- description: Who
in: path
name: who
required: true
type: string
produces:
- text/plain
responses: {}
summary: Responds back with "Hello x" depending on param passed in.
tags:
- Debug
/helloworld:
get:
produces:
- text/plain
responses: {}
summary: Responds back with "Hello world!"
tags:
- Debug
/ping:
get:
produces:
- text/plain
responses: {}
summary: Sends back "pong". Good to test with.
tags:
- Debug
/queue/discord/webhooks: /queue/discord/webhooks:
get: get:
produces: produces:

View File

@ -1,50 +0,0 @@
package routes
import (
"fmt"
"net/http"
"github.com/go-chi/chi/v5"
)
func RootRoutes() chi.Router {
app := chi.NewRouter()
app.Route("/", func(r chi.Router) {
r.Get("/helloworld", helloWorld)
r.Get("/ping", ping)
r.Route("/hello/{who}", func(r chi.Router) {
r.Get("/", helloWho)
})
})
return app
}
// HelloWorld
// @Summary Responds back with "Hello world!"
// @Produce plain
// @Tags Debug
// @Router /helloworld [get]
func helloWorld(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("Hello World!"))
}
// Ping
// @Summary Sends back "pong". Good to test with.
// @Produce plain
// @Tags Debug
// @Router /ping [get]
func ping(w http.ResponseWriter, r *http.Request) {
msg := "pong"
w.Write([]byte(msg))
}
// HelloWho
// @Summary Responds back with "Hello x" depending on param passed in.
// @Param who path string true "Who"
// @Produce plain
// @Tags Debug
// @Router /hello/{who} [get]
func helloWho(w http.ResponseWriter, r *http.Request) {
msg := fmt.Sprintf("Hello %v", chi.URLParam(r, "who"))
w.Write([]byte(msg))
}