aws

http://status.aws.amazon.com/ https://www.expeditedssl.com/aws-in-plain-english
mj_langford 2019-05-16T15:40:56.082300Z

AWS JSON files are swagger2.0 right?

ghadi 2019-05-16T15:43:17.082600Z

I don't think so

mj_langford 2019-05-16T15:45:52.082800Z

Just checked, yup, swagger:

mj_langford 2019-05-16T15:45:54.083Z

--- swagger: "2.0"

mj_langford 2019-05-16T15:46:39.083800Z

So OpenAPI is basically the 3.0 version of swagger...so, no, aws doesn't take open api because swagger is version 2.0 of that

mj_langford 2019-05-16T15:48:20.084600Z

You can generate the large body of swagger 2.0 spec for import if you spend time getting all your URIs setup, and you also take time to get your transformations working.

mj_langford 2019-05-16T15:48:44.085200Z

(We have done this on a clojure project that used a swagger-codegen generated test client)

kenny 2019-05-16T15:49:36.085800Z

@mj_langford Where are you seeing the swagger: "2.0"?

mj_langford 2019-05-16T15:50:44.086400Z

I went to an api I made last year about this time, went to "Stages" then picked export.

mj_langford 2019-05-16T15:50:47.086600Z

Oh look!

mj_langford 2019-05-16T15:50:54.086900Z

They have an OpenApi3 there too

mj_langford 2019-05-16T15:51:07.087100Z

openapi: "3.0.1"

mj_langford 2019-05-16T15:52:03.087900Z

go to the export tab

mj_langford 2019-05-16T15:52:15.088100Z

You can redploy from these files too

ghadi 2019-05-16T15:52:32.088400Z

which files are you looking at @mj_langford?

ghadi 2019-05-16T15:53:50.088800Z

https://github.com/aws/aws-sdk-js/blob/master/apis/cloudhsm-2014-05-30.normal.json these are the files that cognitect-labs/aws-api come from

mj_langford 2019-05-16T15:55:24.089300Z

I don't know what that file is

mj_langford 2019-05-16T15:55:35.089600Z

I use yaml, so am used to seeing comments, etc.

mj_langford 2019-05-16T15:55:49.089800Z

Is that a swagger file?

ghadi 2019-05-16T15:56:14.090100Z

it is not a swagger file

ghadi 2019-05-16T15:56:24.090400Z

i think you are talking about something different

ghadi 2019-05-16T15:57:04.091200Z

yesterday someone brought up mechanically generating clients from the metadata that AWS / GCP / Azure provide

ghadi 2019-05-16T15:57:15.091600Z

AWS's aren't swagger/openapi

mj_langford 2019-05-16T15:57:30.092300Z

AWS provides API files from another place, which was the JSON I believed you were speaking of

mj_langford 2019-05-16T15:57:33.092500Z

Apologies.

mj_langford 2019-05-16T15:57:55.093200Z

https://console.aws.amazon.com/apigateway/ literally exports OpenAPI/Swagger files for apis we write

ghadi 2019-05-16T15:57:55.093300Z

it's cool that APIGateway appears to export openapi/swagger though

mj_langford 2019-05-16T16:01:36.093500Z

https://apigility.org/documentation/api-doc/swagger looks promising for your goals

mj_langford 2019-05-16T16:02:17.093900Z

They seem to use HAL, which appears it may be way that json spec you're pointing at could be

zlrth 2019-05-16T18:39:28.096Z

this might be an easy amazonica question for y'all: i'd like to enable bucket-versioning. Here it is "Off":

c.s3> (amazonica.aws.s3/get-bucket-versioning-configuration {:bucket-name "my-bucket"})
{:status "Off"}
I try to enable it, but it wants an object, not a string:
c.s3>  (amazonica.aws.s3/set-bucket-versioning-configuration {:bucket-name "my-bucket" :versioning-configuration "Enabled"} )
IllegalArgumentException No coercion is available to turn Enabled into an object of type class com.amazonaws.services.s3.model.BucketVersioningConfiguration  amazonica.core/coerce-value (core.clj:399)

zlrth 2019-05-16T18:43:41.098900Z

BucketVersioningConfiguration isn't mentioned in Amazonica, so i'm unsure how to set-bucket-versioning-configuration without cloning Amazonica, adding the importing of BucketVersioningConfiguration myself, and doing it inside a repl under Amazonica, instead of in my project. i suspect i'm missing something

Jakub HolĂ˝ 2019-05-17T10:19:56.000100Z

doesn't Amazonica use magic and reflection to turn Clj data into the expected AWS classes? What if you pass in a clojure map with keys corresponding to the bean's properties?

zlrth 2019-05-16T19:30:37.099300Z

i did all those things, and they worked fwiw.