You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unquoted 'OidcScopes' key when using OpenID Connect #836
I found the root cause for this issue. I used -generate gin parameter, so generator does not generate constants, as it is included in models generation: codegen.go:158. The question is whether it should be like that?
Emitting security-scope values into the request context is now off by default (it can't represent AND/OR/anonymous security requirements — validation should happen in request-validation middleware instead). So the offending c.Set(OidcScopes, …) line is no longer generated at all:
Activity
kuzznya commentedon Nov 1, 2022
I found the root cause for this issue. I used -generate gin parameter, so generator does not generate constants, as it is included in models generation: codegen.go:158. The question is whether it should be like that?
jamietanna commentedon Nov 13, 2022
In this case, you'll also need to make sure that the types are generated i.e.
mromaszewicz commentedon Jul 14, 2026
This is a comment from an automated bug scrub, after making a significant number of fixes to the code generation.
We reproduced this against the current
main. The bug is fixed, and in fact the behaviour has changed in two relevant ways.Spec used (
spec.yaml):1. Default config (
config.yaml):Emitting security-scope values into the request context is now off by default (it can't represent AND/OR/anonymous security requirements — validation should happen in request-validation middleware instead). So the offending
c.Set(OidcScopes, …)line is no longer generated at all:2. Legacy opt-in — if you still want the scopes-on-context behaviour, set (top-level key):
The generated code now uses a typed context-key constant and an explicit
string(...)conversion, which compiles correctly (the original bug):Either way the unquoted-key compile error is gone, so we're closing this out.