Aleksandr Razumov

Results 142 comments of Aleksandr Razumov

We have [ogen/middleware](https://pkg.go.dev/github.com/ogen-go/[email protected]/middleware) (that is 1) and (2) looks like #566

Hi, thank you for contribution! Please update tests so I can merge this.

Encoding and decoding with `encoding/json` is not supported for `OptString` because following limitations: https://github.com/golang/go/issues/11939 So it is impossible to represent `OptString` with `encoding/json` (pointers are used instead), that's why we...

What are you trying to do? Using `MarshalJSON` on requests, responses or most generated types should work. Returning `{}` is invalid, probably we should not generate `MarshalJSON` for `OptString` at...

@tdakkota `omitempty` does not work for structures, even if they are zero value.

The only valid solution is (1). Let's remove `MarshalJSON`/`UnmarshalJSON` for Opt* types, it should be only for full components (e.g. requests, responses).

Yes, we avoid pointers for better semantics and removing NPE problem. Will use `omitzero` when released tho. Finally.

I've done something similar in #581 and it worked for me for old-style (non-stars) paid media.