This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-16
Channels
- # announcements (5)
- # aws (34)
- # beginners (145)
- # cider (48)
- # circleci (8)
- # clara (7)
- # clj-kondo (28)
- # cljs-dev (75)
- # cljsrn (4)
- # clojure (325)
- # clojure-czech (10)
- # clojure-europe (5)
- # clojure-italy (4)
- # clojure-nl (4)
- # clojure-spec (6)
- # clojure-sweden (3)
- # clojure-uk (70)
- # clojurescript (18)
- # clr (1)
- # community-development (2)
- # cursive (38)
- # data-science (7)
- # datascript (14)
- # datomic (22)
- # emacs (2)
- # figwheel (1)
- # fulcro (6)
- # graalvm (22)
- # graphql (11)
- # hoplon (12)
- # jackdaw (8)
- # jobs-discuss (16)
- # juxt (5)
- # leiningen (19)
- # luminus (5)
- # nrepl (2)
- # nyc (1)
- # off-topic (6)
- # overtone (2)
- # pedestal (10)
- # re-frame (6)
- # reagent (8)
- # reitit (1)
- # rewrite-clj (43)
- # ring (2)
- # shadow-cljs (124)
- # testing (1)
- # vim (22)
- # xtdb (77)
- # yada (4)
AWS JSON files are swagger2.0 right?
Just checked, yup, swagger:
--- swagger: "2.0"
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
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.
(We have done this on a clojure project that used a swagger-codegen generated test client)
@mj_langford Where are you seeing the swagger: "2.0"?
I went to an api I made last year about this time, went to "Stages" then picked export.
Oh look!
They have an OpenApi3 there too
openapi: "3.0.1"
go to the export tab
You can redploy from these files too
which files are you looking at @mj_langford?
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
I don't know what that file is
I use yaml, so am used to seeing comments, etc.
Is that a swagger file?
yesterday someone brought up mechanically generating clients from the metadata that AWS / GCP / Azure provide
AWS provides API files from another place, which was the JSON I believed you were speaking of
Apologies.
https://console.aws.amazon.com/apigateway/ literally exports OpenAPI/Swagger files for apis we write
https://apigility.org/documentation/api-doc/swagger looks promising for your goals
They seem to use HAL, which appears it may be way that json spec you're pointing at could be
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)
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
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?