-
Notifications
You must be signed in to change notification settings - Fork 85
Fix proxy option type #300
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
Conversation
✅ Deploy Preview for docusaurus-openapi ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hello 👋 I'm happy to try and review this. Superficially it looks good in the sense that the tests pass and the preview site works. But I do have some thoughts and questions:
|
|
Hello chris :D
I've not tried reproducing the original error independently of Shields. Indeed, I believe the upgrade to
All the upgrades and unrelated changes are the side effect of simply running |
OK. Quick answer to this bit: that will just change that one thing (well 2 things) without updating everything else in the lockfile. That will also give you a lockfile that is still on |
a4b3b31 to
876f8db
Compare
|
Thanks for the pro-tips! I've updated the PR accordingly, the changes are much more focused now, with Docusaurus still on 3.8.0. |
|
OK, so I tried to test this locally. First lets check out the diff --git a/demo/examples/petstore.yaml b/demo/examples/petstore.yaml
index e5c84f6..811888f 100644
--- a/demo/examples/petstore.yaml
+++ b/demo/examples/petstore.yaml
@@ -1,9 +1,4 @@
openapi: 3.0.0
-servers:
- - url: //petstore.swagger.io/v2
- description: Default server
- - url: //petstore.swagger.io/sandbox
- description: Sandbox server
info:
description: |
This is a sample server Petstore server.
@@ -176,7 +171,7 @@ paths:
}
requestBody:
$ref: "#/components/requestBodies/Pet"
- "/pet/{petId}":
+ "/proxy/pet/{petId}":
get:
tags:
- pet(proxying won't work if we have servers set and Side note: We should probably add an example to the demo site that allows testing the proxy. We can come back to that.. this will do for now. Now, if you:
You'll get errors:
(at least, assuming you don't have anything running on port Now if I check out this branch and try the same thing with the same changes to Using that information on how to test can you see if you can get the proxy behaviour working as expected? |
876f8db to
1e24a8e
Compare
|
Thanks for the pointers! This should now work as expected. |
|
OK cool. This latest iteration looks good. Thanks We will need to call out the new syntax to specify a proxy when we write the changelog for the next release. In terms of next steps, @jNullj has highlighted another compatibility issue with react v19 and @reduxjs/toolkit in #297 (comment) I suggest we wait to get a patch in for that first and then do a release containing both fixes. |
We are getting starting up the Shields.io service locally: badges/shields#11421
Only arrays are supported nowadays for the proxy configuration, see webpack/webpack-dev-server#4694 and others.
@types/webpack-dev-server is deprecated:
Let's use the up-to-date types from webpack-dev-server instead.