Skip to content

fix(spec): use application/json content type in Section 6 examples#1640

Open
matanweks wants to merge 1 commit intoa2aproject:mainfrom
matanweks:fix/spec-examples-content-type
Open

fix(spec): use application/json content type in Section 6 examples#1640
matanweks wants to merge 1 commit intoa2aproject:mainfrom
matanweks:fix/spec-examples-content-type

Conversation

@matanweks
Copy link

Summary

  • Fixes all 18 HTTP examples in Section 6 that incorrectly use application/a2a+json as the Content-Type header
  • Changes them to application/json, consistent with:
    • Section 9.1 (JSON-RPC Protocol Requirements): Content-Type: application/json for requests and responses
    • Section 11.1 (HTTP+JSON/REST Protocol Requirements): Content-Type: application/json for requests and responses
    • All official SDKs (Python, Java) and the TCK, which all use application/json
  • The IANA media type registration in Section 14.1.1 is intentionally left unchanged

Fixes #1639

Test plan

  • All Content-Type headers in Section 6 examples now read application/json
  • Section 14.1.1 IANA registration still references application/a2a+json
  • Consistent with Section 9.1 and 11.1 protocol requirements
  • Consistent with all official SDK implementations and TCK tests

The HTTP examples in Section 6 incorrectly use `application/a2a+json`
as the Content-Type, which contradicts the protocol requirements defined
in Section 9.1 (JSON-RPC) and Section 11.1 (HTTP+JSON/REST) that both
specify `application/json` for requests and responses.

Fixes a2aproject#1639
@matanweks matanweks requested a review from a team as a code owner March 16, 2026 15:10
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves an inconsistency within the specification documentation by standardizing the Content-Type header in HTTP examples. The change ensures that all illustrative examples in Section 6 accurately reflect the application/json media type, aligning them with the protocol requirements outlined in other sections and existing implementations, while preserving the distinct IANA media type registration.

Highlights

  • Documentation Correction: Corrected 18 HTTP examples in Section 6 of the specification to use application/json as the Content-Type header instead of application/a2a+json.
  • Consistency Improvement: Ensured consistency with Section 9.1 (JSON-RPC Protocol Requirements), Section 11.1 (HTTP+JSON/REST Protocol Requirements), official SDKs (Python, Java), and the TCK, all of which use application/json.
  • IANA Registration Unchanged: Maintained the application/a2a+json reference in Section 14.1.1 (IANA media type registration) as intentionally unchanged.
Changelog
  • docs/specification.md
    • Updated 18 HTTP examples in Section 6 to use application/json for the Content-Type header.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Content-Type header in 18 examples in Section 6 to application/json, aligning them with the protocol requirements in Sections 9.1 and 11.1. The changes improve the consistency of the specification. While reviewing the surrounding documentation, I noticed a separate inconsistency in the 'Validation Error Example' within Section 6.5. The example error message on line 1587 for an invalid status parameter lists values ('pending', 'working', etc.) that are inconsistent with the SCREAMING_SNAKE_CASE format required for TaskState enum values and includes a 'pending' state which is not defined. This is outside the scope of the current changes but would be a valuable correction for a future pull request to ensure the specification is fully consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: v1.0.0 spec examples use the application/a2a+json content type

1 participant