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"
|
|
)
|
|
|
|
// CreateUser - Create user
|
|
func (c *Container) CreateUser(ctx echo.Context) error {
|
|
return ctx.JSON(http.StatusOK, models.HelloWorld {
|
|
Message: "Hello World",
|
|
})
|
|
}
|
|
|
|
|
|
// CreateUsersWithArrayInput - Creates list of users with given input array
|
|
func (c *Container) CreateUsersWithArrayInput(ctx echo.Context) error {
|
|
return ctx.JSON(http.StatusOK, models.HelloWorld {
|
|
Message: "Hello World",
|
|
})
|
|
}
|
|
|
|
|
|
// CreateUsersWithListInput - Creates list of users with given input array
|
|
func (c *Container) CreateUsersWithListInput(ctx echo.Context) error {
|
|
return ctx.JSON(http.StatusOK, models.HelloWorld {
|
|
Message: "Hello World",
|
|
})
|
|
}
|
|
|
|
|
|
// DeleteUser - Delete user
|
|
func (c *Container) DeleteUser(ctx echo.Context) error {
|
|
return ctx.JSON(http.StatusOK, models.HelloWorld {
|
|
Message: "Hello World",
|
|
})
|
|
}
|
|
|
|
|
|
// GetUserByName - Get user by user name
|
|
func (c *Container) GetUserByName(ctx echo.Context) error {
|
|
return ctx.JSON(http.StatusOK, models.HelloWorld {
|
|
Message: "Hello World",
|
|
})
|
|
}
|
|
|
|
|
|
// LoginUser - Logs user into the system
|
|
func (c *Container) LoginUser(ctx echo.Context) error {
|
|
return ctx.JSON(http.StatusOK, models.HelloWorld {
|
|
Message: "Hello World",
|
|
})
|
|
}
|
|
|
|
|
|
// LogoutUser - Logs out current logged in user session
|
|
func (c *Container) LogoutUser(ctx echo.Context) error {
|
|
return ctx.JSON(http.StatusOK, models.HelloWorld {
|
|
Message: "Hello World",
|
|
})
|
|
}
|
|
|
|
|
|
// UpdateUser - Updated user
|
|
func (c *Container) UpdateUser(ctx echo.Context) error {
|
|
return ctx.JSON(http.StatusOK, models.HelloWorld {
|
|
Message: "Hello World",
|
|
})
|
|
}
|