mstdn/ent.Application
parent
efc6351ccb
commit
04cb2bbcce
|
@ -10,7 +10,7 @@ import (
|
||||||
// See:
|
// See:
|
||||||
// https://docs.joinmastodon.org/entities/Application/
|
// https://docs.joinmastodon.org/entities/Application/
|
||||||
type Application struct {
|
type Application struct {
|
||||||
Name opt.Optional[string] `json:"name"`
|
Name opt.Optional[string] `json:"name,omitempty"`
|
||||||
WebSite nul.Nullable[string] `json:"website,omitempty"` // optional — field has JSON null value in JSON if not set
|
WebSite nul.Nullable[string] `json:"website,omitempty"` // optional — field has JSON null value in JSON if not set
|
||||||
VapidKey opt.Optional[string] `json:"vapid_key,omitempty"` // optional — field not included in JSON if not set
|
VapidKey opt.Optional[string] `json:"vapid_key,omitempty"` // optional — field not included in JSON if not set
|
||||||
ClientID opt.Optional[string] `json:"client_id,omitempty"` // optional — field not included in JSON if not set
|
ClientID opt.Optional[string] `json:"client_id,omitempty"` // optional — field not included in JSON if not set
|
||||||
|
|
|
@ -17,6 +17,13 @@ func TestApplication_MarshalJSON(t *testing.T) {
|
||||||
Application ent.Application
|
Application ent.Application
|
||||||
Expected string
|
Expected string
|
||||||
}{
|
}{
|
||||||
|
{
|
||||||
|
Application: ent.Application{},
|
||||||
|
Expected: "{}",
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
Application: ent.Application{
|
Application: ent.Application{
|
||||||
Name: opt.Something("acme app"),
|
Name: opt.Something("acme app"),
|
||||||
|
|
Loading…
Reference in New Issue