mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-11 05:59:08 +00:00
* [typescript-fetch] Add withRequestOptsInInterface option to hide RequestOpts from API interfaces
The *RequestOpts methods are implementation details that build request
options before sending the fetch call. Most consumers using the API
interfaces don't need these methods exposed in the contract.
Add a new `withRequestOptsInInterface` boolean option (default: true
for backward compatibility) that controls whether *RequestOpts methods
appear in the generated API interface declarations. When set to false,
the methods remain as public methods on the class but are excluded from
the interface.
* Fix test: scope RequestOpts assertion to interface section
The previous test used indexOf("}") to find the interface end, which
matched the } inside @throws {RequiredError} JSDoc instead of the
actual closing brace. Use the class declaration position as the
boundary instead.
* Fix forbiddenapis violation: use explicit UTF-8 charset
Replace new String(byte[]) with new String(byte[], StandardCharsets.UTF_8)
to satisfy the forbiddenapis Maven plugin check.
* Add withRequestOptsInInterface to options test and regenerate docs