Home / Function/ TestValidationDisabled() — gin Function Reference

TestValidationDisabled() — gin Function Reference

Architecture documentation for the TestValidationDisabled() function in binding_test.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  95fe53e2_7ab3_2d39_c614_3d6e619b0064["TestValidationDisabled()"]
  314c6481_2bd0_e5a7_282c_94e41df6062a["binding_test.go"]
  95fe53e2_7ab3_2d39_c614_3d6e619b0064 -->|defined in| 314c6481_2bd0_e5a7_282c_94e41df6062a
  aebd0564_565b_ba1b_7f92_4baaca0e7b7e["requestWithBody()"]
  95fe53e2_7ab3_2d39_c614_3d6e619b0064 -->|calls| aebd0564_565b_ba1b_7f92_4baaca0e7b7e
  style 95fe53e2_7ab3_2d39_c614_3d6e619b0064 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

binding/binding_test.go lines 757–766

func TestValidationDisabled(t *testing.T) {
	backup := Validator
	Validator = nil
	defer func() { Validator = backup }()

	var obj FooStruct
	req := requestWithBody(http.MethodPost, "/", `{"bar": "foo"}`)
	err := JSON.Bind(req, &obj)
	require.NoError(t, err)
}

Subdomains

Frequently Asked Questions

What does TestValidationDisabled() do?
TestValidationDisabled() is a function in the gin codebase, defined in binding/binding_test.go.
Where is TestValidationDisabled() defined?
TestValidationDisabled() is defined in binding/binding_test.go at line 757.
What does TestValidationDisabled() call?
TestValidationDisabled() calls 1 function(s): requestWithBody.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free