diff --git a/openapi3/internalize_refs_test.go b/openapi3/internalize_refs_test.go index 1f3055ed6..ab91ff12c 100644 --- a/openapi3/internalize_refs_test.go +++ b/openapi3/internalize_refs_test.go @@ -42,7 +42,7 @@ func TestInternalizeRefs(t *testing.T) { require.NoError(t, err, "validating internalized spec") actual, err := doc.MarshalJSON() - require.NoError(t, err, "marshalling internalized spec") + require.NoError(t, err, "marshaling internalized spec") // run a static check over the file, making sure each occurrence of a // reference is followed by a # diff --git a/openapi3/loader.go b/openapi3/loader.go index de0a8132a..63dc0185b 100644 --- a/openapi3/loader.go +++ b/openapi3/loader.go @@ -182,7 +182,7 @@ func unmarshal(data []byte, v interface{}) error { return nil } -// ResolveRefsIn expands references if for instance spec was just unmarshalled +// ResolveRefsIn expands references if for instance spec was just unmarshaled func (loader *Loader) ResolveRefsIn(doc *T, location *url.URL) (err error) { if loader.Context == nil { loader.Context = context.Background() diff --git a/openapi3/openapi3_test.go b/openapi3/openapi3_test.go index e01af82ba..9a2714a1d 100644 --- a/openapi3/openapi3_test.go +++ b/openapi3/openapi3_test.go @@ -24,10 +24,10 @@ func TestRefsJSON(t *testing.T) { require.NoError(t, err) require.NotEmpty(t, data) - t.Log("Resolve refs in unmarshalled *T") + t.Log("Resolve refs in unmarshaled *T") err = loader.ResolveRefsIn(docA, nil) require.NoError(t, err) - t.Log("Resolve refs in marshalled *T") + t.Log("Resolve refs in marshaled *T") docB, err := loader.LoadFromData(data) require.NoError(t, err) require.NotEmpty(t, docB) @@ -62,10 +62,10 @@ func TestRefsYAML(t *testing.T) { require.NoError(t, err) require.NotEmpty(t, data) - t.Log("Resolve refs in unmarshalled *T") + t.Log("Resolve refs in unmarshaled *T") err = loader.ResolveRefsIn(docA, nil) require.NoError(t, err) - t.Log("Resolve refs in marshalled *T") + t.Log("Resolve refs in marshaled *T") docB, err := loader.LoadFromData(data) require.NoError(t, err) require.NotEmpty(t, docB) diff --git a/openapi3gen/field_info.go b/openapi3gen/field_info.go index 8c03edbf2..e630a61c0 100644 --- a/openapi3gen/field_info.go +++ b/openapi3gen/field_info.go @@ -9,14 +9,14 @@ import ( // theFieldInfo contains information about JSON serialization of a field. type theFieldInfo struct { - HasJSONTag bool - TypeIsMarshaller bool - TypeIsUnmarshaller bool - JSONOmitEmpty bool - JSONString bool - Index []int - Type reflect.Type - JSONName string + HasJSONTag bool + TypeIsMarshaler bool + TypeIsUnmarshaler bool + JSONOmitEmpty bool + JSONString bool + Index []int + Type reflect.Type + JSONName string } func appendFields(fields []theFieldInfo, parentIndex []int, t reflect.Type) []theFieldInfo { @@ -94,8 +94,8 @@ iteration: } } - _, field.TypeIsMarshaller = field.Type.MethodByName("MarshalJSON") - _, field.TypeIsUnmarshaller = field.Type.MethodByName("UnmarshalJSON") + _, field.TypeIsMarshaler = field.Type.MethodByName("MarshalJSON") + _, field.TypeIsUnmarshaler = field.Type.MethodByName("UnmarshalJSON") // Field is done fields = append(fields, field)