Skip to content

refactor(tools/openapi-gen)!: Wrap server in platform resp envelope#345

Draft
nderjung wants to merge 1 commit into
prod-stagingfrom
nderjung/refactor/tools/openapi-gen/templates/go-server/wrap-response
Draft

refactor(tools/openapi-gen)!: Wrap server in platform resp envelope#345
nderjung wants to merge 1 commit into
prod-stagingfrom
nderjung/refactor/tools/openapi-gen/templates/go-server/wrap-response

Conversation

@nderjung

Copy link
Copy Markdown
Member

Match the go-client template by wrapping the go-server interface
in the platform response envelope.

Signed-off-by: Alexander Jung alex@unikraft.com

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Wraps generated Gin server responses in the platform response envelope.

Changes:

  • Updates service interfaces to return generic platform responses.
  • Generates standardized error envelopes.
  • Records request processing time.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/openapi-gen/templates/go-server/gin.go.tmpl Outdated
Comment thread tools/openapi-gen/templates/go-server/gin.go.tmpl Outdated
Comment thread tools/openapi-gen/templates/go-server/gin.go.tmpl
Comment on lines +292 to +295
Status: platform.ResponseStatusError,
Message: err.Error(),
Errors: []platform.ResponseError{{"{{"}}Status: http.StatusBadRequest{{"}}"}},
OpTimeUs: uint64(time.Since(now).Microseconds()),
@nderjung nderjung force-pushed the nderjung/refactor/tools/openapi-gen/templates/go-server/wrap-response branch from 6642b99 to 6e6f532 Compare July 14, 2026 16:23
@craciunoiuc

Copy link
Copy Markdown
Contributor

should I approve/merge?

@nderjung nderjung marked this pull request as draft July 14, 2026 18:20
@nderjung

Copy link
Copy Markdown
Member Author

should I approve/merge?

Not just yet. Still doing a few little tests and need to open up some adjacent PRs since it's a breaking change still. Also roboto has some points.

Match the go-client template by wrapping the go-server interface
in the platform response envelope.

Signed-off-by: Alexander Jung <alex@unikraft.com>
@nderjung nderjung force-pushed the nderjung/refactor/tools/openapi-gen/templates/go-server/wrap-response branch from 6e6f532 to 544ed69 Compare July 15, 2026 21:51
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 this pull request may close these issues.

3 participants