Skip to content

feat: Add option to generate all available schemas#5304

Open
KasimAhmic wants to merge 3 commits into
reduxjs:masterfrom
KasimAhmic:feature/enhanced-codegen
Open

feat: Add option to generate all available schemas#5304
KasimAhmic wants to merge 3 commits into
reduxjs:masterfrom
KasimAhmic:feature/enhanced-codegen

Conversation

@KasimAhmic

Copy link
Copy Markdown

I often run into situations where my server will emit objects over WebSocket but not via any HTTP endpoint. I can add said objects to my OpenAPI schema just fine, but RTK codegen only exports the types that are referenced in endpoint definitions. This PR fixes that by allowing the developer to opt-in to exporting all available schemas from the OpenAPI spec.

Any comments are appreciated!

Closes #5010

@codesandbox

codesandbox Bot commented May 27, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@netlify

netlify Bot commented May 27, 2026

Copy link
Copy Markdown

Deploy Preview for redux-starter-kit-docs ready!

Name Link
🔨 Latest commit 8e61ec5
🔍 Latest deploy log https://app.netlify.com/projects/redux-starter-kit-docs/deploys/6a1f88497eb5db0008773b6e
😎 Deploy Preview https://deploy-preview-5304--redux-starter-kit-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@codesandbox-ci

codesandbox-ci Bot commented May 27, 2026

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 8e61ec5:

Sandbox Source
@examples-query-react/basic Configuration
@examples-query-react/advanced Configuration
@examples-action-listener/counter Configuration
rtk-esm-cra Configuration

@KasimAhmic

Copy link
Copy Markdown
Author

Looks like the "are-the-types-wrong" check is failing, something about reading a filename property of undefined. Not sure I can do anything about that one myself.

@aryaemami59 aryaemami59 added the RTKQ-Codegen Issues related to the @rtk-query/codegen-openapi package. label May 30, 2026
@aryaemami59

Copy link
Copy Markdown
Member

Looks like the "are-the-types-wrong" check is failing, something about reading a filename property of undefined. Not sure I can do anything about that one myself.

This is related to arethetypeswrong/arethetypeswrong.github.io#258 and 101arrowz/fflate#258. It was recently resolved by arethetypeswrong/arethetypeswrong.github.io#261, and the fix was released in @arethetypeswrong/core@0.18.3. I'll put up a PR to update it shortly.

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

Labels

RTKQ-Codegen Issues related to the @rtk-query/codegen-openapi package.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rtk-query-codegen-openapi - allow to include all defined models in code generation

2 participants