AnswerDotAI / AnswerDotAI/fastspec

Support Google Discovery `mediaUpload` endpoints in generated clients

Open
#8 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Jupyter Notebook
Stars
5
Forks
4
Avg merge
2d 47m
Merged PRs (30d)
4

Description

Fastspec currently parses Google Discovery methods as normal JSON operations and ignores `supportsMediaUpload` / `mediaUpload` metadata. For Gemini’s `media.upload` method, this causes the generated client to call `POST /v1beta/files` with JSON like `{"file": "/path/to/file.mp4"}`, which fails because Gemini expects upload bytes via `/upload/v1beta/files` or `/resumable/upload/v1beta/files`. The Discovery spec already includes the required upload protocol paths and metadata, so fastspec should preserve this in `OpSpec` and route media upload operations through multipart/simple or resumable upload handling instead of ordinary JSON request serialization.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing how Google Discovery supportsMediaUpload and mediaUpload metadata is parsed into OpSpec, then follow how generated clients serialize ordinary JSON operations. Verify the existing upload handling entry points for multipart/simple and resumable protocols. Done means Gemini’s media.upload uses the Discovery-provided upload paths and sends file bytes rather than JSON file paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.