update schemas and create a validateHandler function

This commit is contained in:
AshwiniK-protean
2025-03-02 18:44:16 +05:30
parent 4b940d9e51
commit 4559ac3e5f
28 changed files with 3053 additions and 3552 deletions

View File

@@ -21,7 +21,7 @@ type Message struct{}
func TestInitializeValidDirectory(t *testing.T) {
provider := &tekuriValidatorProvider{}
schemaDir := "../schema_valid/ondc_trv10_2.0.0/"
schemaDir := "../schemas/"
_, err := provider.Initialize(schemaDir)
if err != nil {
t.Fatalf("expected no error, got %v", err)
@@ -68,7 +68,7 @@ func TestInvalidCompileSchema(t *testing.T) {
}
func TestValidateData(t *testing.T) {
schemaDir := "../schema_valid/ondc_trv10_2.0.0/"
schemaDir := "../schemas/"
if _, err := os.Stat(schemaDir); os.IsNotExist(err) {
t.Fatalf("Schema directory does not exist: %v", schemaDir)
}