@@ -45,12 +45,12 @@ type Server struct {
4545 Variables map [string ]* ServerVariable `json:"variables,omitempty" yaml:"variables,omitempty"`
4646}
4747
48- func (value * Server ) MarshalJSON () ([]byte , error ) {
49- return jsoninfo .MarshalStrictStruct (value )
48+ func (server * Server ) MarshalJSON () ([]byte , error ) {
49+ return jsoninfo .MarshalStrictStruct (server )
5050}
5151
52- func (value * Server ) UnmarshalJSON (data []byte ) error {
53- return jsoninfo .UnmarshalStrictStruct (data , value )
52+ func (server * Server ) UnmarshalJSON (data []byte ) error {
53+ return jsoninfo .UnmarshalStrictStruct (data , server )
5454}
5555
5656func (server Server ) ParameterNames () ([]string , error ) {
@@ -138,11 +138,20 @@ func (server *Server) Validate(c context.Context) (err error) {
138138
139139// ServerVariable is specified by OpenAPI/Swagger standard version 3.0.
140140type ServerVariable struct {
141+ ExtensionProps
141142 Enum []interface {} `json:"enum,omitempty" yaml:"enum,omitempty"`
142143 Default interface {} `json:"default,omitempty" yaml:"default,omitempty"`
143144 Description string `json:"description,omitempty" yaml:"description,omitempty"`
144145}
145146
147+ func (serverVariable * ServerVariable ) MarshalJSON () ([]byte , error ) {
148+ return jsoninfo .MarshalStrictStruct (serverVariable )
149+ }
150+
151+ func (serverVariable * ServerVariable ) UnmarshalJSON (data []byte ) error {
152+ return jsoninfo .UnmarshalStrictStruct (data , serverVariable )
153+ }
154+
146155func (serverVariable * ServerVariable ) Validate (c context.Context ) error {
147156 switch serverVariable .Default .(type ) {
148157 case float64 , string :
0 commit comments