forked from loafle/openapi-generator-original
* Update codegen config * Add templates for Go Echo openapi-codegen * Add the yaml config file! * Add GoEchoServerCodegen.java. This is the first iteration, it works but probably needs a lot of improvements. * Update codegen, adds some comments. * Update GoEchoServerCodegen.java * Update GoEchoServerCodegen.java * Update GoEchoServerCodegen.java and related yaml file * Add the result of generate-samples.sh for CI purposes. * Add the result of bin/utils/ensure-up-to-date for CI purposes. * Update go-echo-server-petstore-new.yaml Fix the outputdir * Update in regard to result of ./bin/generate-samples.sh * Update in regard to result of ./bin/generate-samples.sh * Remove wrongly generated files * Add correct generated files. * Add changes regarding /bin/utils/ensure-up-to-date * Update templates to include comments. * Update/add result of ./bin/generate-samples.sh and ./bin/utils/export_docs_generators.sh
70 lines
1.7 KiB
Go
70 lines
1.7 KiB
Go
package handlers
|
|
import (
|
|
"github.com/GIT_USER_ID/GIT_REPO_ID/models"
|
|
"github.com/labstack/echo/v4"
|
|
"net/http"
|
|
)
|
|
|
|
// AddPet - Add a new pet to the store
|
|
func (c *Container) AddPet(ctx echo.Context) error {
|
|
return ctx.JSON(http.StatusOK, models.HelloWorld {
|
|
Message: "Hello World",
|
|
})
|
|
}
|
|
|
|
|
|
// DeletePet - Deletes a pet
|
|
func (c *Container) DeletePet(ctx echo.Context) error {
|
|
return ctx.JSON(http.StatusOK, models.HelloWorld {
|
|
Message: "Hello World",
|
|
})
|
|
}
|
|
|
|
|
|
// FindPetsByStatus - Finds Pets by status
|
|
func (c *Container) FindPetsByStatus(ctx echo.Context) error {
|
|
return ctx.JSON(http.StatusOK, models.HelloWorld {
|
|
Message: "Hello World",
|
|
})
|
|
}
|
|
|
|
|
|
// FindPetsByTags - Finds Pets by tags
|
|
func (c *Container) FindPetsByTags(ctx echo.Context) error {
|
|
return ctx.JSON(http.StatusOK, models.HelloWorld {
|
|
Message: "Hello World",
|
|
})
|
|
}
|
|
|
|
|
|
// GetPetById - Find pet by ID
|
|
func (c *Container) GetPetById(ctx echo.Context) error {
|
|
return ctx.JSON(http.StatusOK, models.HelloWorld {
|
|
Message: "Hello World",
|
|
})
|
|
}
|
|
|
|
|
|
// UpdatePet - Update an existing pet
|
|
func (c *Container) UpdatePet(ctx echo.Context) error {
|
|
return ctx.JSON(http.StatusOK, models.HelloWorld {
|
|
Message: "Hello World",
|
|
})
|
|
}
|
|
|
|
|
|
// UpdatePetWithForm - Updates a pet in the store with form data
|
|
func (c *Container) UpdatePetWithForm(ctx echo.Context) error {
|
|
return ctx.JSON(http.StatusOK, models.HelloWorld {
|
|
Message: "Hello World",
|
|
})
|
|
}
|
|
|
|
|
|
// UploadFile - uploads an image
|
|
func (c *Container) UploadFile(ctx echo.Context) error {
|
|
return ctx.JSON(http.StatusOK, models.HelloWorld {
|
|
Message: "Hello World",
|
|
})
|
|
}
|