Skip to content

Incorrect display name of available "Advanced Service" APIs #512

@tehhowch

Description

@tehhowch

Expected Behavior

When using clasp apis list, the displayed <api name> is what can be passed in clasp apis enable/disable <api name>

Actual Behavior

Services with names that have "-" (e.g. bigquery-json) or specialized "Advanced Services" bindings (AdminDirectory, AdminReports) are not properly reported by apis list:
image

If attempting to then enable the API by displayed name, e.g. clasp apis enable bigquery, HTTP 403 "The caller does not have permission" is raised, and clasp then states:

API bigquery doesn't exist. Try 'clasp apis enable sheets'.

Steps to Reproduce the Problem

  1. clasp apis list
    • shows admin twice (for AdminDirectory & AdminReports)
    • shows bigquery
  2. clasp apis enable bigquery
  3. Receive large error trace re: HTTP 403, and message "API bigquery doesn't exist. Try 'clasp apis enable sheets'."

Specifications

  • Node version (node -v): 8.11.2
  • Version (clasp -v): 2.0.1
  • OS (Mac/Linux/Windows): Win 10

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions