update as per the PR comment

This commit is contained in:
Manendra Pal Singh
2025-12-02 21:14:02 +05:30
parent 4f2a137482
commit 8fd7afb54a
6 changed files with 544 additions and 41 deletions

View File

@@ -277,15 +277,11 @@ func (s *addRouteStep) Run(ctx *model.StepContext) error {
func extractSchemaVersion(body []byte) string {
type contextEnvelope struct {
Context struct {
Version string `json:"version"`
CoreVersion string `json:"core_version"`
Version string `json:"version"`
} `json:"context"`
}
var payload contextEnvelope
if err := json.Unmarshal(body, &payload); err == nil {
if payload.Context.CoreVersion != "" {
return payload.Context.CoreVersion
}
if payload.Context.Version != "" {
return payload.Context.Version
}