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

fix: allow json primitives as valid json objects #1411

Closed
wants to merge 3 commits into from

Conversation

hwkr
Copy link
Contributor

@hwkr hwkr commented Apr 9, 2024

Fixes #1396

@hwkr hwkr requested a review from geoffgscott April 9, 2024 20:20
@hwkr hwkr requested a review from marclave as a code owner April 9, 2024 20:20
Copy link

changeset-bot bot commented Apr 9, 2024

🦋 Changeset detected

Latest commit: 8542698

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
@scalar/oas-utils Patch
@scalar/api-client Patch
@scalar/api-reference Patch
@scalar/cli Patch
@scalar/mock-server Patch
@scalar/api-client-react Patch
@scalar/api-reference-react Patch
@scalar/express-api-reference Patch
@scalar/hono-api-reference Patch
@scalar/nestjs-api-reference Patch
@scalar/nextjs-api-reference Patch
@scalar/docusaurus Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

relativeci bot commented Apr 9, 2024

#1100 Bundle Size — 1.92MiB (~+0.01%).

8542698(current) vs cc834ce main#1098(baseline)

Warning

Bundle contains 4 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
#1100
     Baseline
#1098
Regression  Initial JS 1.92MiB(~+0.01%) 1.92MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 100% 0%
No change  Chunks 1 1
No change  Assets 1 1
No change  Modules 1049 1049
No change  Duplicate Modules 0 0
No change  Duplicate Code 0% 0%
No change  Packages 158 158
No change  Duplicate Packages 4 4
Bundle size by type  Change 1 change Regression 1 regression
                 Current
#1100
     Baseline
#1098
Regression  JS 1.92MiB (~+0.01%) 1.92MiB

Bundle analysis reportBranch brynn/doc-1675-allow-json-primit...Project dashboard

@geoffgscott
Copy link
Contributor

@marclave we may want to consider this but it will have significant downstream impacts as "AnyObject" is not the true valid return type of Content-Type: 'application/json'

I am also a little confused about the original issue as it looks like their request was using Content-Type: 'text/plain' in which case no parsing should be going on.

@hwkr hwkr force-pushed the brynn/doc-1675-allow-json-primitives-as-valid branch from 85941b1 to 8542698 Compare April 9, 2024 20:53
@hwkr hwkr requested a review from hanspagel April 23, 2024 21:50
@hwkr
Copy link
Contributor Author

hwkr commented Apr 24, 2024

Going to close this for now until @geoffgscott gets a chance to chat with @marclave @hanspagel about how we want to proceed

@hwkr hwkr closed this Apr 24, 2024
@geoffgscott geoffgscott reopened this Apr 24, 2024
@geoffgscott
Copy link
Contributor

@hanspagel We should take a look at how to get this in safely

@hanspagel hanspagel marked this pull request as draft May 8, 2024 09:22
@hanspagel
Copy link
Member

I think we should focus on the shift to the new proxy first (because it affects basically all users) and get this PR here in after we’ve migrated to the new proxy.

@hanspagel
Copy link
Member

I think I fixed this here today: #1090

I saw a few duplicate lines that looked like the result of a merge conflict.

@hanspagel hanspagel closed this May 15, 2024
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.

Response message get processed by JSON.stringify() multiple times.
3 participants