[Docs]: Missing text/markdown import support in Google Drive API static docs
[Docs]: Missing text/markdown import support in Google Drive API static docs
Documentation Location
- Context7 Library ID:
/websites/developers_google_workspace_drive - Upstream URLs:
Issue Category
Library-specific docs / API documentation
Description of the Gap
There is an asymmetry in the upstream Google Drive API documentation regarding Markdown support:
- The
ref-export-formatspage explicitly documentstext/markdownfor Google Docs exports. - The
manage-uploadspage, however, delegates import conversion formats to the dynamicabout.get(fields="importFormats")endpoint and does not explicitly listtext/markdownin the static text.
Because Context7 indexes the static documentation, queries to Context7 regarding supported import MIME types do not return text/markdown as a supported conversion type for Google Docs (application/vnd.google-apps.document). This leads developers (and AI agents) to incorrectly assume that Markdown imports are not natively supported, even though they are.
Suggested Fix / Enhancement
To enrich the /websites/developers_google_workspace_drive index, we propose:
- Hardcoding/injecting a known mapping of
importFormats(specificallytext/markdown->application/vnd.google-apps.document) into the indexed documentation for Google Drive uploads. - Adding explicit annotations to the indexed
manage-uploadspage to highlight that Markdown (text/markdown) is a supported source format when converting to Google Docs. - Potentially querying the
about.get(fields="importFormats")endpoint during the indexing phase to capture all dynamically supported formats and appending them to the static documentation index.
Reproducible Evidence / Payload
Live testing against the Google Drive API v3 confirms that uploading files with text/markdown content and specifying conversion to application/vnd.google-apps.document works seamlessly.
Here is a sample curl payload demonstrating live support:
# Upload a markdown file and convert it to a native Google Doc
curl -X POST -L \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-F "metadata={ \
'name': 'My Markdown Document', \
'mimeType': 'application/vnd.google-apps.document' \
};type=application/json;charset=UTF-8" \
-F "[email protected];type=text/markdown" \
"https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart"
# Sample using the Python Google API Client
from googleapiclient.http import MediaFileUpload
file_metadata = {
'name': 'My Markdown Document',
'mimeType': 'application/vnd.google-apps.document'
}
media = MediaFileUpload('document.md', mimetype='text/markdown', resumable=True)
file = drive_service.files().create(body=file_metadata, media_body=media, fields='id').execute()
print(f"File ID: {file.get('id')}")
Source: upstash/context7