Skip to content

OpenAPI

Handle OpenAPI operation naming, path selection, scopes, and readOnly/writeOnly behavior.

Options are grouped from shared CLI metadata and link back to their generated reference sections.

Groups

Group Options Description
OpenAPI Naming 2 Operation and response model naming.
OpenAPI Paths 6 Path selection and path parameter output.
OpenAPI Scopes 2 OpenAPI generation scopes.
Read Only Write Only 4 readOnly/writeOnly model behavior.

OpenAPI Naming

Operation and response model naming.

Option Description
--use-operation-id-as-name Use OpenAPI operationId as the generated function/class name.
--use-status-code-in-response-name Include HTTP status code in response model names.

OpenAPI Paths

Path selection and path parameter output.

Option Description
--include-path-parameters Include OpenAPI path parameters in generated parameter models.
--keep-content-parameter-refs Type a parameter whose content media schema is a $ref by the model the $ref ...
--keep-first-character-of-path-keys Strip only a leading slash from a paths key when naming its operation models.
--openapi-include-paths Filter OpenAPI paths to include in model generation.
--skip-path-extension-keys Skip the x- keys of paths in the paths scope, as the api scope does.
--use-enum-field-as-literal-in-operations Write an operation body or response enum as a Literal root model as a definition...

OpenAPI Scopes

OpenAPI generation scopes.

Option Description
--openapi-as-definitions Give OpenAPI paths bodies or ref components the models their definitions get.
--openapi-scopes Specify OpenAPI scopes to generate (schemas, paths, parameters).

Read Only Write Only

readOnly/writeOnly model behavior.

Option Description
--dedupe-numbered-request-response-variants Deduplicate a Request or Response variant of a numbered model like the model.
--dedupe-request-response-variants Decide Request/Response variants from the schema graph and build each inline mod...
--read-only-write-only-model-type Generate separate request and response models for readOnly/writeOnly fields.
--use-frozen-field Generate frozen (immutable) field definitions for readOnly properties.