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

New Server: Generate net/http-only code #1068

Closed
jamietanna opened this issue May 29, 2023 · 4 comments
Closed

New Server: Generate net/http-only code #1068

jamietanna opened this issue May 29, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@jamietanna
Copy link
Collaborator

jamietanna commented May 29, 2023

It may be handy for folks to get a purely net/http server implementation, rather than using a router.

This will be made easier by golang/go#60227 but could allow us to boilerplate a lot of the awkwardness that can be had with the standard library when we are doing things like URL path parameters.

(This is a suggestion while I remember, not intent to add it to the codebase unless we get interest!)

Should also include build tags

@jamietanna
Copy link
Collaborator Author

golang/go#61410 is now accepted. We may be able to play around with https://github.com/jba/muxpatterns in the meantime

@jamietanna
Copy link
Collaborator Author

@jxsl13
Copy link

jxsl13 commented Oct 16, 2023

thanks for your work. Don't exploit yourself too much and don't overwork yourself.

@jamietanna
Copy link
Collaborator Author

Thanks very much @jxsl13 💜

jamietanna pushed a commit to thedadams/oapi-codegen that referenced this issue Mar 4, 2024
As part of deepmap#1068, we want to add support for the new Go 1.22+
`net/http`-only router, which will allow using `oapi-codegen` with
reduced external dependencies, which will likely be **??**

This requires we:

- **??**
- **??**

Closes deepmap#1068.
jamietanna pushed a commit to thedadams/oapi-codegen that referenced this issue Mar 4, 2024
As part of deepmap#1068, we want to add support for the new Go 1.22+
`net/http`-only router, which will allow using `oapi-codegen` with
reduced external dependencies, which will likely be **??**

This requires we:

- **??**
- **??**

Closes deepmap#1068.
jamietanna pushed a commit to thedadams/oapi-codegen that referenced this issue Mar 4, 2024
As part of deepmap#1068, we want to add support for the new Go 1.22+
`net/http`-only router, which will allow using `oapi-codegen` with
reduced external dependencies, which will likely be **??**

This requires we:

- **??**
- **??**

Closes deepmap#1068.
jamietanna pushed a commit to thedadams/oapi-codegen that referenced this issue Mar 4, 2024
As part of deepmap#1068, we want to add support for the new Go 1.22+
`net/http`-only router, which will allow using `oapi-codegen` with
reduced external dependencies, which will likely be **??**

This requires we:

- **??**
- **??**

Closes deepmap#1068.
jamietanna pushed a commit to thedadams/oapi-codegen that referenced this issue Mar 4, 2024
As part of deepmap#1068, we want to add support for the new Go 1.22+
`net/http`-only router, which will allow using `oapi-codegen` with
reduced external dependencies, which will likely be **??**

This requires we:

- **??**
- **??**

Closes deepmap#1068.
jamietanna pushed a commit to thedadams/oapi-codegen that referenced this issue Mar 4, 2024
As part of deepmap#1068, we want to add support for the new Go 1.22+
`net/http`-only router, which will allow using `oapi-codegen` with
reduced external dependencies, which will likely be **??**

This requires we:

- **??**
- **??**

Closes deepmap#1068.
jamietanna pushed a commit to thedadams/oapi-codegen that referenced this issue Mar 4, 2024
As part of deepmap#1068, we want to add support for the new Go 1.22+
`net/http`-only router, which will allow using `oapi-codegen` with
reduced external dependencies, which will likely be **??**

This requires we:

- **??**
- **??**

Closes deepmap#1068.
thedadams added a commit to thedadams/oapi-codegen that referenced this issue Mar 4, 2024
As part of deepmap#1068, we want to add support for the new Go 1.22+
`net/http`-only router, which will allow using `oapi-codegen` with
reduced external dependencies, which will likely be **??**

This requires we:

- **??**
- **??**

Closes deepmap#1068.

Signed-off-by: Donnie Adams <donnie@acorn.io>

Co-authored-by: Jamie Tanna <jamie@jamietanna.co.uk>
Signed-off-by: Donnie Adams <donnie@acorn.io>
jamietanna added a commit to thedadams/oapi-codegen that referenced this issue Mar 4, 2024
As part of deepmap#1068, we want to add support for the new Go 1.22+
`net/http`-only router, which will allow using `oapi-codegen` with
reduced external dependencies.

This requires we:

- wire in a new server, `std-http`
- add relevant templates for the router and strict server
- conditionally build/test/lint/etc the code when running on older
  versions of Go, which requires a bit of work in our `Makefile`
- use a separate module for the generated code, as it must set `go 1.22`
  in the `go.mod`
- document the fact that the `go.mod` needs updating, too, as it's
  caused some time to be lost in the past

Closes deepmap#1068.

Co-authored-by: Jamie Tanna <jamie@jamietanna.co.uk>
Signed-off-by: Donnie Adams <donnie@acorn.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants