f-f / gogolica

Auto-generated Google APIs for Clojure
Eclipse Public License 1.0
2 stars 0 forks source link

Fetch the API models directly from API explorer #25

Open zudov opened 6 years ago

zudov commented 6 years ago

We currently get the models by submoduling the go repo and then having a bash script that copies things from there, but instead one could just get them from API explorer via HTTP:

http https://www.googleapis.com/discovery/v1/apis/storage/v1/rest | jq '.resources | keys'                                                             
[                                                                                                                                                                                 
  "bucketAccessControls",
  "buckets",
  "channels",
  "defaultObjectAccessControls",
  "notifications",
  "objectAccessControls",
  "objects",
  "projects"
]

I think we should get rid of irrelevant submodule and either rewrite the script to fetch all things via curl and jq, or just have code that can fetch them inside gogolica.gen.model.