@@ -188,6 +188,25 @@ type AcceptOAuth2ConsentRequest struct {
188188 SessionAccessToken sqlxx.MapStringInterface `json:"-" faker:"-"`
189189}
190190
191+ func (r * AcceptOAuth2ConsentRequest ) MarshalJSON () ([]byte , error ) {
192+ type Alias AcceptOAuth2ConsentRequest
193+ alias := Alias (* r )
194+
195+ if alias .Context == nil {
196+ alias .Context = []byte ("{}" )
197+ }
198+
199+ if alias .GrantedScope == nil {
200+ alias .GrantedScope = []string {}
201+ }
202+
203+ if alias .GrantedAudience == nil {
204+ alias .GrantedAudience = []string {}
205+ }
206+
207+ return json .Marshal (alias )
208+ }
209+
191210func (r * AcceptOAuth2ConsentRequest ) HasError () bool {
192211 return r .Error .IsError ()
193212}
@@ -263,6 +282,25 @@ type OAuth2ConsentSession struct {
263282 SessionAccessToken sqlxx.MapStringInterface `db:"session_access_token" json:"-"`
264283}
265284
285+ func (r * OAuth2ConsentSession ) MarshalJSON () ([]byte , error ) {
286+ type Alias OAuth2ConsentSession
287+ alias := Alias (* r )
288+
289+ if alias .Context == nil {
290+ alias .Context = []byte ("{}" )
291+ }
292+
293+ if alias .GrantedScope == nil {
294+ alias .GrantedScope = []string {}
295+ }
296+
297+ if alias .GrantedAudience == nil {
298+ alias .GrantedAudience = []string {}
299+ }
300+
301+ return json .Marshal (alias )
302+ }
303+
266304// HandledLoginRequest is the request payload used to accept a login request.
267305//
268306// swagger:model acceptOAuth2LoginRequest
@@ -345,6 +383,20 @@ type HandledLoginRequest struct {
345383 AuthenticatedAt sqlxx.NullTime `json:"-"`
346384}
347385
386+ func (r * HandledLoginRequest ) MarshalJSON () ([]byte , error ) {
387+ type Alias HandledLoginRequest
388+ alias := Alias (* r )
389+ if alias .Context == nil {
390+ alias .Context = []byte ("{}" )
391+ }
392+
393+ if alias .AMR == nil {
394+ alias .AMR = []string {}
395+ }
396+
397+ return json .Marshal (alias )
398+ }
399+
348400func (r * HandledLoginRequest ) HasError () bool {
349401 return r .Error .IsError ()
350402}
@@ -392,6 +444,24 @@ type OAuth2ConsentRequestOpenIDConnectContext struct {
392444 LoginHint string `json:"login_hint,omitempty"`
393445}
394446
447+ func (n * OAuth2ConsentRequestOpenIDConnectContext ) MarshalJSON () ([]byte , error ) {
448+ type Alias OAuth2ConsentRequestOpenIDConnectContext
449+ alias := Alias (* n )
450+ if alias .IDTokenHintClaims == nil {
451+ alias .IDTokenHintClaims = map [string ]interface {}{}
452+ }
453+
454+ if alias .ACRValues == nil {
455+ alias .ACRValues = []string {}
456+ }
457+
458+ if alias .UILocales == nil {
459+ alias .UILocales = []string {}
460+ }
461+
462+ return json .Marshal (alias )
463+ }
464+
395465func (n * OAuth2ConsentRequestOpenIDConnectContext ) Scan (value interface {}) error {
396466 v := fmt .Sprintf ("%s" , value )
397467 if len (v ) == 0 {
@@ -539,6 +609,20 @@ type LoginRequest struct {
539609 RequestedAt time.Time `json:"-"`
540610}
541611
612+ func (r * LoginRequest ) MarshalJSON () ([]byte , error ) {
613+ type Alias LoginRequest
614+ alias := Alias (* r )
615+ if alias .RequestedScope == nil {
616+ alias .RequestedScope = []string {}
617+ }
618+
619+ if alias .RequestedAudience == nil {
620+ alias .RequestedAudience = []string {}
621+ }
622+
623+ return json .Marshal (alias )
624+ }
625+
542626// Contains information on an ongoing consent request.
543627//
544628// swagger:model oAuth2ConsentRequest
@@ -614,6 +698,24 @@ type OAuth2ConsentRequest struct {
614698 RequestedAt time.Time `json:"-"`
615699}
616700
701+ func (r * OAuth2ConsentRequest ) MarshalJSON () ([]byte , error ) {
702+ type Alias OAuth2ConsentRequest
703+ alias := Alias (* r )
704+ if alias .RequestedScope == nil {
705+ alias .RequestedScope = []string {}
706+ }
707+
708+ if alias .RequestedAudience == nil {
709+ alias .RequestedAudience = []string {}
710+ }
711+
712+ if alias .AMR == nil {
713+ alias .AMR = []string {}
714+ }
715+
716+ return json .Marshal (alias )
717+ }
718+
617719// Pass session data to a consent request.
618720//
619721// swagger:model acceptOAuth2ConsentRequestSession
@@ -636,3 +738,16 @@ func NewConsentRequestSessionData() *AcceptOAuth2ConsentRequestSession {
636738 IDToken : map [string ]interface {}{},
637739 }
638740}
741+
742+ func (r * AcceptOAuth2ConsentRequestSession ) MarshalJSON () ([]byte , error ) {
743+ type Alias AcceptOAuth2ConsentRequestSession
744+ alias := Alias (* r )
745+ if alias .AccessToken == nil {
746+ alias .AccessToken = map [string ]interface {}{}
747+ }
748+
749+ if alias .IDToken == nil {
750+ alias .IDToken = map [string ]interface {}{}
751+ }
752+ return json .Marshal (alias )
753+ }
0 commit comments