11package schema_test
22
33import (
4+ "context"
45 "fmt"
56 "strings"
67
@@ -39,7 +40,7 @@ func ExampleSchemaBuilder() {
3940 Build ()
4041
4142 defs , caveats , _ := s .ToDefinitions ()
42- schemaText , _ , _ := generator .GenerateSchema (append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
43+ schemaText , _ , _ := generator .GenerateSchema (context . Background (), append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
4344 fmt .Println (strings .TrimSpace (schemaText ))
4445}
4546
@@ -67,7 +68,7 @@ func ExampleSchemaBuilder_incrementalUnion() {
6768 Build ()
6869
6970 defs , caveats , _ := s .ToDefinitions ()
70- schemaText , _ , _ := generator .GenerateSchema (append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
71+ schemaText , _ , _ := generator .GenerateSchema (context . Background (), append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
7172 fmt .Println (strings .TrimSpace (schemaText ))
7273}
7374
@@ -99,7 +100,7 @@ func ExampleSchemaBuilder_withArrow() {
99100 Build ()
100101
101102 defs , caveats , _ := s .ToDefinitions ()
102- schemaText , _ , _ := generator .GenerateSchema (append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
103+ schemaText , _ , _ := generator .GenerateSchema (context . Background (), append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
103104 fmt .Println (strings .TrimSpace (schemaText ))
104105}
105106
@@ -119,7 +120,7 @@ func ExampleSchemaBuilder_withCaveat() {
119120 Build ()
120121
121122 defs , caveats , _ := s .ToDefinitions ()
122- schemaText , _ , _ := generator .GenerateSchema (append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
123+ schemaText , _ , _ := generator .GenerateSchema (context . Background (), append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
123124 fmt .Println (strings .TrimSpace (schemaText ))
124125}
125126
@@ -148,7 +149,7 @@ func ExampleSchemaBuilder_withCaveatTypes() {
148149 Build ()
149150
150151 defs , caveats , _ := s .ToDefinitions ()
151- schemaText , _ , _ := generator .GenerateSchema (append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
152+ schemaText , _ , _ := generator .GenerateSchema (context . Background (), append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
152153 fmt .Println (strings .TrimSpace (schemaText ))
153154}
154155
@@ -172,7 +173,7 @@ func ExampleSchemaBuilder_withExclusion() {
172173 Build ()
173174
174175 defs , caveats , _ := s .ToDefinitions ()
175- schemaText , _ , _ := generator .GenerateSchema (append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
176+ schemaText , _ , _ := generator .GenerateSchema (context . Background (), append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
176177 fmt .Println (strings .TrimSpace (schemaText ))
177178}
178179
@@ -196,7 +197,7 @@ func ExampleSchemaBuilder_withIntersection() {
196197 Build ()
197198
198199 defs , caveats , _ := s .ToDefinitions ()
199- schemaText , _ , _ := generator .GenerateSchema (append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
200+ schemaText , _ , _ := generator .GenerateSchema (context . Background (), append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
200201 fmt .Println (strings .TrimSpace (schemaText ))
201202}
202203
@@ -211,7 +212,7 @@ func ExampleSchemaBuilder_withWildcard() {
211212 Build ()
212213
213214 defs , caveats , _ := s .ToDefinitions ()
214- schemaText , _ , _ := generator .GenerateSchema (append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
215+ schemaText , _ , _ := generator .GenerateSchema (context . Background (), append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
215216 fmt .Println (strings .TrimSpace (schemaText ))
216217}
217218
@@ -280,7 +281,7 @@ func ExampleSchemaBuilder_complex() {
280281 Build ()
281282
282283 defs , caveats , _ := s .ToDefinitions ()
283- schemaText , _ , _ := generator .GenerateSchema (append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
284+ schemaText , _ , _ := generator .GenerateSchema (context . Background (), append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
284285 fmt .Println (strings .TrimSpace (schemaText ))
285286}
286287
@@ -306,7 +307,7 @@ func ExampleSchemaBuilder_constructorPattern() {
306307 Build ()
307308
308309 defs , caveats , _ := s .ToDefinitions ()
309- schemaText , _ , _ := generator .GenerateSchema (append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
310+ schemaText , _ , _ := generator .GenerateSchema (context . Background (), append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
310311 fmt .Println (strings .TrimSpace (schemaText ))
311312}
312313
@@ -327,7 +328,7 @@ func ExampleSchemaBuilder_constructorWithIntersection() {
327328 Build ()
328329
329330 defs , caveats , _ := s .ToDefinitions ()
330- schemaText , _ , _ := generator .GenerateSchema (append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
331+ schemaText , _ , _ := generator .GenerateSchema (context . Background (), append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
331332 fmt .Println (strings .TrimSpace (schemaText ))
332333}
333334
@@ -348,7 +349,7 @@ func ExampleSchemaBuilder_constructorWithExclusion() {
348349 Build ()
349350
350351 defs , caveats , _ := s .ToDefinitions ()
351- schemaText , _ , _ := generator .GenerateSchema (append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
352+ schemaText , _ , _ := generator .GenerateSchema (context . Background (), append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
352353 fmt .Println (strings .TrimSpace (schemaText ))
353354}
354355
@@ -374,7 +375,7 @@ func ExampleSchemaBuilder_constructorWithArrow() {
374375 Build ()
375376
376377 defs , caveats , _ := s .ToDefinitions ()
377- schemaText , _ , _ := generator .GenerateSchema (append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
378+ schemaText , _ , _ := generator .GenerateSchema (context . Background (), append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
378379 fmt .Println (strings .TrimSpace (schemaText ))
379380}
380381
@@ -395,7 +396,7 @@ func ExampleSchemaBuilder_constructorWithIntersectionArrow() {
395396 Build ()
396397
397398 defs , caveats , _ := s .ToDefinitions ()
398- schemaText , _ , _ := generator .GenerateSchema (append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
399+ schemaText , _ , _ := generator .GenerateSchema (context . Background (), append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
399400 fmt .Println (strings .TrimSpace (schemaText ))
400401}
401402
@@ -418,7 +419,7 @@ func ExampleSchemaBuilder_constructorWithCaveat() {
418419 Build ()
419420
420421 defs , caveats , _ := s .ToDefinitions ()
421- schemaText , _ , _ := generator .GenerateSchema (append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
422+ schemaText , _ , _ := generator .GenerateSchema (context . Background (), append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
422423 fmt .Println (strings .TrimSpace (schemaText ))
423424}
424425
@@ -475,7 +476,7 @@ func ExampleSchemaBuilder_constructorComplexNested() {
475476 Build ()
476477
477478 defs , caveats , _ := s .ToDefinitions ()
478- schemaText , _ , _ := generator .GenerateSchema (append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
479+ schemaText , _ , _ := generator .GenerateSchema (context . Background (), append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
479480 fmt .Println (strings .TrimSpace (schemaText ))
480481}
481482
@@ -498,6 +499,6 @@ func ExampleSchemaBuilder_withIntersectionArrow() {
498499 Build ()
499500
500501 defs , caveats , _ := s .ToDefinitions ()
501- schemaText , _ , _ := generator .GenerateSchema (append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
502+ schemaText , _ , _ := generator .GenerateSchema (context . Background (), append (toSchemaDefinitions (defs ), toSchemaDefinitions (caveats )... ))
502503 fmt .Println (strings .TrimSpace (schemaText ))
503504}
0 commit comments