# Error in API Reference doco re GenerationConfig ResponseJsonSchema structured output.?

**URL:** <https://discuss.ai.google.dev/t/error-in-api-reference-doco-re-generationconfig-responsejsonschema-structured-output/125182>\
**Category:** Documentation\
**Tags:** structure\_output\
**Created:** [February 22, 2026, 2:58am UTC](https://discuss.ai.google.dev/t/error-in-api-reference-doco-re-generationconfig-responsejsonschema-structured-output/125182 "2026-02-22T02:58:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![randomnuggets](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/randomnuggets/32/25084_2.png) [@randomnuggets](https://discuss.ai.google.dev/u/randomnuggets)\
**Post date:** [February 22, 2026, 2:58am UTC](https://discuss.ai.google.dev/t/error-in-api-reference-doco-re-generationconfig-responsejsonschema-structured-output/125182/1 "2026-02-22T02:58:24Z")

</div>

The API Reference doco for the GenerationConfig object describes three fields relating to JSON output. These are `“responseSchema", `"`_responseJsonSchema" `and "`responseJsonSchema".`

The description for `“responseJsonSchema" `is very confusing. It is `"Optional. An internal detail. Use responseJsonSchema rather than this field.”`

Is this not referring to itself? Surely this is wrong, yes?

Furthmore, the API doco contains several examples of how to generate structured JSON output, and these examples all use the `responseJsonSchema `field to provide the relevant JSON schema. (for example see [https://ai.google.dev/gemini-api/docs/structured-output?example=recipe#javascript\_2](https://ai.google.dev/gemini-api/docs/structured-output?example=recipe#javascript_2)). Is this not a contradiction?

Please clarify which field we are supposed to use for structured output?

Does the doco need to be fixed?

Thanks.
