{"swagger":"2.0","info":{"version":"1.0.0","title":"Api Media"},"basePath":"/api-service","paths":{"/medias":{"get":{"description":"Get an s3 media by s3 url, eventually resized on fly","tags":["resize"],"parameters":[{"name":"url","in":"query","description":"media's s3 url","required":true,"type":"string"},{"name":"preset","in":"query","description":"predefined preset name","required":false,"type":"string","default":"default"}],"responses":{"200":{"description":"Media file content (binary)","schema":{"type":"string","format":"binary"}}}},"post":{"description":"Upload a media to s3 (as multipart-encoded body)- eventually resize on fly & return s3 url","tags":["upload"],"consumes":["multipart/form-data"],"produces":["application/json"],"parameters":[{"name":"body","in":"body","required":true,"description":"File to upload","schema":{"type":"object","properties":{"brand":{"type":"string","required":true},"file":{"type":"string","format":"binary","required":true},"preset":{"type":"string","required":false}}}}],"responses":{"200":{"description":"s3 url of newly uploaded media","schema":{"type":"object","properties":{"upload":{"type":"string","description":"S3 URL of the uploaded media"}}}},"500":{"description":"lambda error translates to API GW 500 error","schema":{"type":"object","properties":{"code":{"type":"integer","description":"error code"},"message":{"type":"string","description":"error description"}}}}}}}}}