@@ -20,7 +20,8 @@ const (
20
20
func main () {
21
21
m := make (yml )
22
22
23
- configFile , err := os .Open ("./openapi.yml" )
23
+ log .Println ("Fetching openapi.yml from typesense api spec" )
24
+ configFile , err := os .Open ("./typesense/api/generator/openapi.yml" )
24
25
if err != nil {
25
26
log .Fatalf ("Unable to open config file: %s" , err .Error ())
26
27
return
@@ -33,16 +34,22 @@ func main() {
33
34
}
34
35
35
36
// Unwrapping the search parameters
37
+ log .Println ("Unwrapping search parameters" )
36
38
unwrapSearchParameters (& m )
37
39
// Unwrapping import and export parameters
40
+ log .Println ("Unwrapping documents import parameters" )
38
41
unwrapImportDocuments (& m )
42
+ log .Println ("Unwrapping documents export parameters" )
39
43
unwrapExportDocuments (& m )
40
44
// Unwrapping delete document parameters
45
+ log .Println ("Unwrapping documents delete parameters" )
41
46
unwrapDeleteDocument (& m )
42
47
// Remove additionalProperties from SearchResultHit -> document
48
+ log .Println ("Removing additionalProperties from SearchResultHit" )
43
49
searchResultHit (& m )
44
50
45
- generatorFile , err := os .Create ("./generator.yml" )
51
+ log .Println ("Writing updated spec to generator.yml" )
52
+ generatorFile , err := os .Create ("./typesense/api/generator/generator.yml" )
46
53
if err != nil {
47
54
log .Fatalf ("Unable to open config file: %s" , err .Error ())
48
55
return
0 commit comments