static s3cp sends json schema to an s3 bucket. When you upload objects to S3, there is associated metadata. Since igluctl static s3cp will only ever send json, in this PR we ensure we are setting ContentType to application/json.
To test this code change I compared what happens currently with what happens with the change in this PR.
I set up a run configuration in my IDE to run the scala main method and passed these args
static s3cp /Users/leigh-anne/code/iglu-central/schemas/com.pagerduty/incident/jsonschema/1-0-0 lm-s3cp-test-bucket-deleteme --region us-east-1 --profile sandbox
i.e. sent a different schema to compare
See: https://github.com/snowplow-incubator/igluctl/issues/87
static s3cp
sends json schema to an s3 bucket. When you upload objects to S3, there is associated metadata. Sinceigluctl static s3cp
will only ever send json, in this PR we ensure we are settingContentType
toapplication/json
.To test this code change I compared what happens currently with what happens with the change in this PR.
Currently
I made a bucket called
lm-s3cp-test-bucket-deleteme
via the aws consoleI sent a schema to the bucket using s3cp via the igluctl executable I downloaded here
./igluctl static s3cp /Users/leigh-anne/code/iglu-central/schemas/com.maxmind/anonymous_ip/jsonschema/1-0-0 lm-s3cp-test-bucket-deleteme --region us-east-1 --profile sandbox
I can look at the schema's metadata:
And see that it is set to
text/plain
with the changes in this PR
I set up a run configuration in my IDE to run the scala main method and passed these args
static s3cp /Users/leigh-anne/code/iglu-central/schemas/com.pagerduty/incident/jsonschema/1-0-0 lm-s3cp-test-bucket-deleteme --region us-east-1 --profile sandbox
i.e. sent a different schema to compareand then if I fetch that object's metadata:
I can see that it has
ContentType
asapplication/json; charset=utf-8
as we expect