Skip to content

Commit

Permalink
Small readme update
Browse files Browse the repository at this point in the history
Also removed unnecessary TODO.
  • Loading branch information
marcinromaszewicz committed May 18, 2022
1 parent b4ccc36 commit cfb1d65
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 9 additions & 3 deletions README.md
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions pkg/codegen/utils.go
Expand Up @@ -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))
Expand Down

0 comments on commit cfb1d65

Please sign in to comment.