Skip to content

Commit

Permalink
Merge pull request #18 from ashbeelghouri/0.5
Browse files Browse the repository at this point in the history
0.4.2.1
  • Loading branch information
ashbeelghouri committed Jul 1, 2024
2 parents 7333ade + fc5912d commit ab50c60
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion data/v0/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func (s *Schematics) ValidateObject(jsonData *map[string]interface{}, id *string
var errorMessages errorHandler.Errors
var baseError errorHandler.Error
flatData := *s.makeFlat(*jsonData)
Logs.DEBUG("hereher after flat data --> ", flatData)
Logs.DEBUG("here after flat data --> ", flatData)
uniqueID := ""

if id != nil {
Expand Down
4 changes: 4 additions & 0 deletions data/v1/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ func transformSchematics(s Schematics) *v0.Schematics {
baseSchematics.Separator = s.Separator
baseSchematics.Validators = s.Validators
baseSchematics.Operators = s.Operators
baseSchematics.Validators.BasicValidators()
baseSchematics.Operators.LoadBasicOperations()
baseSchematics.Schema = *transformSchema(s.Schema)

return &baseSchematics
}

Expand All @@ -127,6 +130,7 @@ func transformSchema(schema Schema) *v0.Schema {
AdditionalInformation: field.AdditionalInformation,
}
}

return &baseSchema
}

Expand Down
4 changes: 2 additions & 2 deletions data/v2/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ func (s *Schematics) Configs() {
}
s.Validators.Logger = Logs
s.Operators.Logger = Logs
s.Validators.BasicValidators()
s.Operators.LoadBasicOperations()
}

func LoadJsonSchemaFile(path string) (*v0.Schematics, error) {
Expand Down Expand Up @@ -107,6 +105,8 @@ func transformSchematics(s Schematics) *v0.Schematics {
baseSchematics.Separator = s.Separator
baseSchematics.Validators = s.Validators
baseSchematics.Operators = s.Operators
baseSchematics.Validators.BasicValidators()
baseSchematics.Operators.LoadBasicOperations()
baseSchematics.Schema = *transformSchema(s.Schema)
return &baseSchematics
}
Expand Down

0 comments on commit ab50c60

Please sign in to comment.