diff options
Diffstat (limited to 'src/orchestrator/api/app_intent_handler.go')
-rw-r--r-- | src/orchestrator/api/app_intent_handler.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/orchestrator/api/app_intent_handler.go b/src/orchestrator/api/app_intent_handler.go index 56811d2d..a51b9b92 100644 --- a/src/orchestrator/api/app_intent_handler.go +++ b/src/orchestrator/api/app_intent_handler.go @@ -48,8 +48,11 @@ func (h appIntentHandler) createAppIntentHandler(w http.ResponseWriter, r *http. return } - if a.MetaData.Name == "" { - http.Error(w, "Missing AppIntentName in POST request", http.StatusBadRequest) + jsonFile := "json-schemas/generic-placement-intent-app.json" + // Verify JSON Body + err, httpError := validation.ValidateJsonSchemaData(jsonFile, a) + if err != nil { + http.Error(w, err.Error(), httpError) return } |