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). 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.