Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iris strict server code without content is broken #1407

Open
ShouheiNishi opened this issue Dec 27, 2023 · 1 comment · May be fixed by #1411
Open

Iris strict server code without content is broken #1407

ShouheiNishi opened this issue Dec 27, 2023 · 1 comment · May be fixed by #1411

Comments

@ShouheiNishi
Copy link
Contributor

In Iris strict server, if content is not exist, but header is exist in response of operation, generated code is broken.

ShouheiNishi added a commit to ShouheiNishi/oapi-codegen that referenced this issue Dec 27, 2023
@ShouheiNishi
Copy link
Contributor Author

Test code is https://github.com/ShouheiNishi/oapi-codegen/tree/4b3f027dd649d0219a441953307d9bdd7a85edaa/internal/test/strict-server-response.

$ git status
HEAD detached at 4b3f027
nothing to commit, working tree clean
$ (cd internal/test ; go generate ./strict-server-response/... && go test ./stri
ct-server-response/...)
?       github.com/deepmap/oapi-codegen/v2/internal/test/strict-server-response [no test files]
ok      github.com/deepmap/oapi-codegen/v2/internal/test/strict-server-response/chi/pkg1        (cached)
?       github.com/deepmap/oapi-codegen/v2/internal/test/strict-server-response/chi/pkg2        [no test files]
?       github.com/deepmap/oapi-codegen/v2/internal/test/strict-server-response/echo/pkg2       [no test files]
ok      github.com/deepmap/oapi-codegen/v2/internal/test/strict-server-response/echo/pkg1       (cached)
?       github.com/deepmap/oapi-codegen/v2/internal/test/strict-server-response/fiber/pkg2      [no test files]
ok      github.com/deepmap/oapi-codegen/v2/internal/test/strict-server-response/fiber/pkg1      (cached)
?       github.com/deepmap/oapi-codegen/v2/internal/test/strict-server-response/generator       [no test files]
?       github.com/deepmap/oapi-codegen/v2/internal/test/strict-server-response/gin/pkg2        [no test files]
ok      github.com/deepmap/oapi-codegen/v2/internal/test/strict-server-response/gin/pkg1        (cached)
?       github.com/deepmap/oapi-codegen/v2/internal/test/strict-server-response/gorilla/pkg2    [no test files]
ok      github.com/deepmap/oapi-codegen/v2/internal/test/strict-server-response/gorilla/pkg1    (cached)
# github.com/deepmap/oapi-codegen/v2/internal/test/strict-server-response/iris/pkg1
strict-server-response/iris/pkg1/pkg1.gen.go:610:6: ctx.Response undefined (type *"github.com/kataras/iris/v12/context".Context has no field or method Response)
strict-server-response/iris/pkg1/pkg1.gen.go:611:6: ctx.Response undefined (type *"github.com/kataras/iris/v12/context".Context has no field or method Response)
strict-server-response/iris/pkg1/pkg1.gen.go:635:6: ctx.Response undefined (type *"github.com/kataras/iris/v12/context".Context has no field or method Response)
strict-server-response/iris/pkg1/pkg1.gen.go:636:6: ctx.Response undefined (type *"github.com/kataras/iris/v12/context".Context has no field or method Response)
strict-server-response/iris/pkg1/pkg1.gen.go:651:6: ctx.Response undefined (type *"github.com/kataras/iris/v12/context".Context has no field or method Response)
strict-server-response/iris/pkg1/pkg1.gen.go:652:6: ctx.Response undefined (type *"github.com/kataras/iris/v12/context".Context has no field or method Response)
strict-server-response/iris/pkg1/pkg1.gen.go:671:6: ctx.Response undefined (type *"github.com/kataras/iris/v12/context".Context has no field or method Response)
strict-server-response/iris/pkg1/pkg1.gen.go:672:6: ctx.Response undefined (type *"github.com/kataras/iris/v12/context".Context has no field or method Response)
FAIL    github.com/deepmap/oapi-codegen/v2/internal/test/strict-server-response/iris/pkg1 [build failed]
?       github.com/deepmap/oapi-codegen/v2/internal/test/strict-server-response/iris/pkg2       [no test files]
FAIL
$

@ShouheiNishi ShouheiNishi linked a pull request Dec 27, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant