Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "includeDefault" option to rtkq-codegen-openapi #4591

Merged
merged 1 commit into from
Aug 31, 2024

Conversation

bayasdev
Copy link
Contributor

@bayasdev bayasdev commented Aug 31, 2024

Overview

This PR adds a new includeDefault option to the Redux Toolkit Query (RTKQ) OpenAPI code generator. When enabled, this option includes the default response type in the generated code for all endpoints, as defined in the OpenAPI schema.

The includeDefault option is disabled by default because the default response type typically represents an error response (see OpenAPI documentation on default responses). Enabling it by default could break existing code if types are not narrowed correctly.

Copy link

codesandbox bot commented Aug 31, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

netlify bot commented Aug 31, 2024

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

Name Link
🔨 Latest commit fa5b012
🔍 Latest deploy log https://app.netlify.com/sites/redux-starter-kit-docs/deploys/66d2649ab1e42d00087b4211
😎 Deploy Preview https://deploy-preview-4591--redux-starter-kit-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

Copy link

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 fa5b012:

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

@markerikson markerikson merged commit 4ccd524 into reduxjs:master Aug 31, 2024
17 checks passed
@markerikson
Copy link
Collaborator

Okay, published as https://github.com/reduxjs/redux-toolkit/releases/tag/%40rtk-query%2Fcodegen-openapi%402.0.0-alpha.1

@bayasdev
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants