fix(typo): What's a APY ...
Some checks failed
Gouick/pipeline/head There was a failure building this commit
Some checks failed
Gouick/pipeline/head There was a failure building this commit
This commit is contained in:
parent
fabf8fe1eb
commit
58dba906f4
@ -19,11 +19,11 @@ func GetApiType(in models.ApiTypeName) (ApiTypeInterface, error) {
|
||||
}
|
||||
|
||||
switch in {
|
||||
case models.ApyTypeName_GIN_GONIC:
|
||||
case models.ApiTypeName_GIN_GONIC:
|
||||
return gin_gonic.ApiType{}, nil
|
||||
case models.ApyTypeName_GO_SWAGGER:
|
||||
case models.ApiTypeName_GO_SWAGGER:
|
||||
return go_swagger.ApiType{}, nil
|
||||
case models.ApyTypeName_MOJOLICIOUS:
|
||||
case models.ApiTypeName_MOJOLICIOUS:
|
||||
return mojolicious.ApiType{}, nil
|
||||
}
|
||||
|
||||
|
@ -5,5 +5,5 @@ import (
|
||||
)
|
||||
|
||||
func (a ApiType) GetName() models.ApiTypeName {
|
||||
return models.ApyTypeName_NULL
|
||||
return models.ApiTypeName_NULL
|
||||
}
|
||||
|
@ -5,5 +5,5 @@ import (
|
||||
)
|
||||
|
||||
func (a ApiType) GetName() models.ApiTypeName {
|
||||
return models.ApyTypeName_GIN_GONIC
|
||||
return models.ApiTypeName_GIN_GONIC
|
||||
}
|
||||
|
@ -5,5 +5,5 @@ import (
|
||||
)
|
||||
|
||||
func (a ApiType) GetName() models.ApiTypeName {
|
||||
return models.ApyTypeName_GO_SWAGGER
|
||||
return models.ApiTypeName_GO_SWAGGER
|
||||
}
|
||||
|
@ -5,5 +5,5 @@ import (
|
||||
)
|
||||
|
||||
func (a ApiType) GetName() models.ApiTypeName {
|
||||
return models.ApyTypeName_MOJOLICIOUS
|
||||
return models.ApiTypeName_MOJOLICIOUS
|
||||
}
|
||||
|
@ -10,18 +10,18 @@ import (
|
||||
type ApiTypeName string
|
||||
|
||||
const (
|
||||
ApyTypeName_GIN_GONIC ApiTypeName = "Gin Gonic"
|
||||
ApyTypeName_GO_SWAGGER ApiTypeName = "Go Swagger"
|
||||
ApyTypeName_MOJOLICIOUS ApiTypeName = "Mojolicious"
|
||||
ApyTypeName_NULL ApiTypeName = ""
|
||||
ApiTypeName_GIN_GONIC ApiTypeName = "Gin Gonic"
|
||||
ApiTypeName_GO_SWAGGER ApiTypeName = "Go Swagger"
|
||||
ApiTypeName_MOJOLICIOUS ApiTypeName = "Mojolicious"
|
||||
ApiTypeName_NULL ApiTypeName = ""
|
||||
)
|
||||
|
||||
// GetListOfApiTypeName returns a list of ApiTypeName
|
||||
func GetListOfApiTypeName() []ApiTypeName {
|
||||
return []ApiTypeName{
|
||||
ApyTypeName_GIN_GONIC,
|
||||
ApyTypeName_GO_SWAGGER,
|
||||
ApyTypeName_MOJOLICIOUS,
|
||||
ApiTypeName_GIN_GONIC,
|
||||
ApiTypeName_GO_SWAGGER,
|
||||
ApiTypeName_MOJOLICIOUS,
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,11 +37,11 @@ func (e ApiTypeName) IsValid() bool {
|
||||
}
|
||||
|
||||
func NewApiTypeName(in string) (ApiTypeName, error) {
|
||||
out := ApyTypeName_NULL
|
||||
out := ApiTypeName_NULL
|
||||
if in != "" {
|
||||
out = ApiTypeName(in)
|
||||
if !out.IsValid() {
|
||||
return ApyTypeName_NULL, errors.BadRequestf("Value %s invalid for enum ApiTypeName", in)
|
||||
return ApiTypeName_NULL, errors.BadRequestf("Value %s invalid for enum ApiTypeName", in)
|
||||
}
|
||||
}
|
||||
return out, nil
|
||||
@ -54,7 +54,7 @@ func NewApiTypeNameFromInput(in string) (ApiTypeName, error) {
|
||||
in = strings.ReplaceAll(in, " ", "-")
|
||||
in = strings.ReplaceAll(in, "_", "-")
|
||||
|
||||
out := ApyTypeName_NULL
|
||||
out := ApiTypeName_NULL
|
||||
if in != "" {
|
||||
for _, apiTypeName := range GetListOfApiTypeName() {
|
||||
apiTypeStr := strings.ToLower(string(apiTypeName))
|
||||
@ -64,7 +64,7 @@ func NewApiTypeNameFromInput(in string) (ApiTypeName, error) {
|
||||
return apiTypeName, nil
|
||||
}
|
||||
}
|
||||
return ApyTypeName_NULL, errors.BadRequestf("Value %s invalid for enum ApiTypeName", in)
|
||||
return ApiTypeName_NULL, errors.BadRequestf("Value %s invalid for enum ApiTypeName", in)
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user