AWS JSON files are swagger2.0 right?
I don't think so
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?
it is not a swagger file
i think you are talking about something different
yesterday someone brought up mechanically generating clients from the metadata that AWS / GCP / Azure provide
AWS's aren't swagger/openapi
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
it's cool that APIGateway appears to export openapi/swagger though
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?
i did all those things, and they worked fwiw.