package main

import (
	
	
	
	

	

	
)

func main() {
	 := new(jsonschema.Reflector)
	if  := .AddGoComments("github.com/pancsta/asyncmachine-go",
		"./pkg/integrations");  != nil {
		panic()
	}

	// Create docs/jsonschema directory if it doesn't exist
	 := filepath.Join("docs", "jsonschema")
	if  := os.MkdirAll(, 0755);  != nil {
		panic()
	}

	// List of structs to generate schemas for
	 := []struct {
		 string
		  interface{}
	}{
		{"msg_kind_req", &integrations.MsgKindReq{}},
		{"msg_kind_resp", &integrations.MsgKindResp{}},
		{"mutation_req", &integrations.MutationReq{}},
		{"mutation_resp", &integrations.MutationResp{}},
		{"waiting_req", &integrations.WaitingReq{}},
		{"waiting_resp", &integrations.WaitingResp{}},
		{"getter_req", &integrations.GetterReq{}},
		{"getter_resp", &integrations.GetterResp{}},
	}

	for ,  := range  {
		 := .Reflect(.)
		,  := json.MarshalIndent(, "", "  ")
		if  != nil {
			panic(fmt.Errorf("failed to marshal schema for %s: %v", ., ))
		}

		 := filepath.Join(, .+".json")
		if  := os.WriteFile(, , 0644);  != nil {
			panic(fmt.Errorf("failed to write schema for %s: %v", ., ))
		}

		fmt.Printf("Generated /%s\n", )
	}
}