diff --git a/events/s3_batch_job.go b/events/s3_batch_job.go index d7ed142a..c84f45a2 100644 --- a/events/s3_batch_job.go +++ b/events/s3_batch_job.go @@ -13,7 +13,7 @@ type S3BatchJobEvent struct { // S3BatchJob whichs have the job id type S3BatchJob struct { ID string `json:"id"` - UserArguments map[string]string `json:"userArguments"` + UserArguments map[string]string `json:"userArguments,omitempty"` } // S3BatchJobTask represents one task in the s3 batch job and have all task details @@ -21,8 +21,8 @@ type S3BatchJobTask struct { TaskID string `json:"taskId"` S3Key string `json:"s3Key"` S3VersionID string `json:"s3VersionId"` - S3Bucket string `json:"s3Bucket"` - S3BucketARN string `json:"s3BucketArn"` + S3Bucket string `json:"s3Bucket,omitempty"` + S3BucketARN string `json:"s3BucketArn,omitempty"` } // S3BatchJobResponse is the response of a iven s3 batch job with the results diff --git a/events/testdata/s3-batch-job-event-request-2.0.json b/events/testdata/s3-batch-job-event-request-2.0.json index 014c4da6..3e2c3d7a 100644 --- a/events/testdata/s3-batch-job-event-request-2.0.json +++ b/events/testdata/s3-batch-job-event-request-2.0.json @@ -12,7 +12,7 @@ { "taskId": "dGFza2lkZ29lc2hlcmUK", "s3Key": "prefix/dataset/dataset.20231222.json.gz", - "s3VersionId": null, + "s3VersionId": "1", "s3Bucket": "powertools-dataset" } ]