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

patchDocumentOnRequest is only called the first time the document is requested #2547

Closed
3 of 4 tasks
adtennant opened this issue Aug 1, 2023 · 3 comments
Closed
3 of 4 tasks

Comments

@adtennant
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

The patchDocumentOnRequest is only called the first time the document is requested. Subsequent requests do not call patchDocumentOnRequest.

Minimum reproduction code

https://gist.github.com/adtennant/f36bcaa491068abcd47bd735b22c051b

Steps to reproduce

  1. Add a patchDocumentOnRequest function.
  2. Load the documentation - patchDocumentOnRequest function is run.
  3. Reload the documentation - patchDocumentOnRequest function is not run.

Expected behavior

The patchDocumentOnRequest function to be called on every request.

Package version

7.1.2

NestJS version

10.1.0

Node.js version

18.16.0

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

@kamilmysliwiec
Copy link
Member

Fixed in 7.1.7

@adtennant
Copy link
Author

adtennant commented Aug 9, 2023

@kamilmysliwiec As the patch assigns to document each time won’t the fix result in the document being recursively patched on every request?

@kamilmysliwiec
Copy link
Member

Fixed in 7.1.8

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

No branches or pull requests

2 participants