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

support default return schemas in openapi codegen #4152

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

barp
Copy link

@barp barp commented Feb 3, 2024

Accidently closed PR, reopening it here.

Copy link

codesandbox bot commented Feb 3, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

netlify bot commented Feb 3, 2024

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

Name Link
🔨 Latest commit 7d5fa42
🔍 Latest deploy log https://app.netlify.com/sites/redux-starter-kit-docs/deploys/65be3ede92e7840007fa9e11
😎 Deploy Preview https://deploy-preview-4152--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

codesandbox-ci bot commented Feb 3, 2024

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

Sandbox Source
Vanilla Typescript Configuration
rsk-github-issues-example Configuration
@examples-query-react/basic Configuration
@examples-query-react/advanced Configuration
@examples-action-listener/counter Configuration
rtk-esm-cra Configuration

@barp
Copy link
Author

barp commented Feb 10, 2024

Can someone look at this?

@barp
Copy link
Author

barp commented Feb 14, 2024

Bump

@barp
Copy link
Author

barp commented Feb 21, 2024

@phryneas Hi, you looked at this before can you continue the review?

@barp
Copy link
Author

barp commented Feb 25, 2024

@EskiMojo14 you also looked at this, can you continue the review?

@iliapnmrv
Copy link

I also need this feature, it would be great if someone release it

@sqkrv
Copy link

sqkrv commented Feb 26, 2024

bump for this feature to be implemented

@barp
Copy link
Author

barp commented Mar 2, 2024

Bumping again to try and get some attention...

@phryneas
Copy link
Member

phryneas commented Mar 3, 2024

It will take as long as it will take.

We all work on this voluntarily, and none of us uses the codegen, or anything using OpenAPI at all.
Every few months, someone will sit down, go through the OpenAPI PR, tries to understand what features they are for, if they make sense and if they might be breaking the experience for other users, and gets to merging (if applicable).

Honestly, it's not really a "fun" activity, it's one we do because we don't want to leave people hanging. Regular pings don't make it a more attractive task, though.

In the meantime, CodeSandbox has created an npm package you can use without a local patch:
grafik
grafik

@barp
Copy link
Author

barp commented Mar 5, 2024

Thanks for giving a details explanation on how to use the temporary packages, appreciate it.

@markerikson markerikson merged commit c6371df into reduxjs:master Aug 30, 2024
5 checks passed
@markerikson
Copy link
Collaborator

Should be live in https://github.com/reduxjs/redux-toolkit/releases/tag/%40rtk-query%2Fcodegen-openapi%402.0.0-alpha.0 ! Please try it out and let us know if it works.

@bayasdev
Copy link
Contributor

bayasdev commented Aug 30, 2024

Could we make this an opt-in or opt-out setting? This change broke my project because our code generator relies on the default responses in the OpenAPI schema to define the error responses that could be returned by an endpoint. For example:

/api/v2/users:
    get:
      operationId: ListUsers
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/usersList'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/errorResponse'

@markerikson
Copy link
Collaborator

@bayasdev yeah, makes sense. File a PR to make that configurable?

@bayasdev
Copy link
Contributor

@markerikson PTAL #4591

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

Successfully merging this pull request may close these issues.

6 participants