Skip to content

Slides presentations.get fails: flatPath placeholder mismatch with parameter name #118

@jpoehnelt

Description

@jpoehnelt

Bug

The slides presentations get smoketest fails because the Google Discovery Document for presentations.get has a mismatch between flatPath placeholder names and actual parameter names:

  • path: v1/presentations/{+presentationId} ✅ matches parameter name
  • flatPath: v1/presentations/{presentationsId} ❌ uses plural presentationsId

build_url() unconditionally prefers flatPath over path, so the placeholder {presentationsId} never matches the user-supplied presentationId parameter, resulting in:

Path parameter 'presentationId' was provided but is not present in URL template 'v1/presentations/{presentationsId}'

Repro

gws slides presentations get \
  --params '{"presentationId": "1knOKD_87JWE4qsEbO4r5O91IxTER5ybBBhOJgZ1yLFI", "fields": "presentationId,slides(objectId)"}' \
  | jq -e '.presentationId'
# Returns null / exit code 1

Fix

Add a fallback in build_url(): if flatPath placeholders don't match any path parameters, fall back to path (which uses RFC 6570 {+var} operators that the code already handles).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions