f-f / gogolica

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

Support nested resources #28

Open zudov opened 6 years ago

zudov commented 6 years ago

Currently when mapping over :resources we treat it as a flat list, but SUDDENLY, resources can be nested, so we end up only grabbing the top level routes at the moment.

> (-> storage-model :resources :projects :resources :serviceAccount :methods :get)
{:id "storage.projects.serviceAccount.get",
 :path "projects/{projectId}/serviceAccount",
 :httpMethod "GET",
 :description
 "Get the email address of this project's Google Cloud Storage service account.",
 :parameters
 {:projectId
  {:type "string",
   :description "Project ID",
   :required true,
   :location "path"},
  :userProject
  {:type "string",
   :description
   "The project to be billed for this request, for Requester Pays buckets.",
   :location "query"}},
 :parameterOrder ["projectId"],
 :response {:$ref "ServiceAccount"},
 :scopes
 ["https://www.googleapis.com/auth/cloud-platform"
  "https://www.googleapis.com/auth/cloud-platform.read-only"
  "https://www.googleapis.com/auth/devstorage.full_control"
  "https://www.googleapis.com/auth/devstorage.read_only"
  "https://www.googleapis.com/auth/devstorage.read_write"]}
zudov commented 6 years ago

I'm handling this alongside with #4