diff --git a/README.md b/README.md index d7ba3eabf..0bf46d95b 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,19 @@ incompatibilities. It's tedious to generate Go models which precisely correspond OpenAPI specifications, so let our code generator do that work for you, so that you can focus on implementing the business logic for your service. -We have chosen to use [Echo](https://github.com/labstack/echo) as +We have chosen to focus on [Echo](https://github.com/labstack/echo) as our default HTTP routing engine, due to its speed and simplicity for the generated -stubs, and [Chi](https://github.com/go-chi/chi) is also supported as an alternative. +stubs, and [Chi](https://github.com/go-chi/chi), and [Gin](https://github.com/gin-gonic/gin) +have also been added by contributors as additional routers. We chose Echo because +the `Context` object is a mockable interface, and it allows for some advanced +testing. This package tries to be too simple rather than too generic, so we've made some design decisions in favor of simplicity, knowing that we can't generate strongly -typed Go code for all possible OpenAPI Schemas. +typed Go code for all possible OpenAPI Schemas. If there is a way to accomplish +something via utility code or reflection, it's probably a better approach than +code generation, which is fragile due to the very dynamic nature of OpenAPI and +the very static nature of Go. ## Overview diff --git a/pkg/codegen/utils.go b/pkg/codegen/utils.go index 6698d6d91..a7dc3cf71 100644 --- a/pkg/codegen/utils.go +++ b/pkg/codegen/utils.go @@ -506,8 +506,6 @@ func SanitizeGoIdentity(str string) string { // SanitizeEnumNames fixes illegal chars in the enum names // and removes duplicates -// TODO(marcin): Since this is now done globally, this function can be -// simplified. func SanitizeEnumNames(enumNames []string) map[string]string { dupCheck := make(map[string]int, len(enumNames)) deDup := make([]string, 0, len(enumNames))