-
Notifications
You must be signed in to change notification settings - Fork 347
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
ERR_INVALID_URL: Regression OpenAPIv3 sources require servers
attribute
#4416
Comments
Snake casing is not imported. In contrast, we no longer apply naming convention like the old version.
All changes can be found in the change logs and the migration guide.
What do you mean by
We don't validate OpenAPI schemas anymore, it is user's responsibility to provide a valid schema in the new approach.
We need a reproduction as described in the issue template as always :) Please help us with that so we can help you and improve Mesh together. |
I am working on that, but it might take a few days to provide this. |
Sorry I am having issues to provide a reproduction, it seems to be a bit overkill from my side to fiddle with sandboxes for long hours just for this... Let's discuss my idea for sandbox reproduction first:
|
@JustusNBB I checked our implementation and couldn't find when the base url is used during the schema generation. |
But I ment for the host part inside I think we should actually close, because I have most of the information I need and can't give reproduction priority while already having a workaround/fix. Unlikely that I will reopen myself (because of priority and time constraints). Keep up the great work and insanely fast response times! |
Issue workflow progress
Progress of the issue based on the Contributor Workflow
Describe the bug
After upgrading dependencies, my mesh throws
ERR_INVALID_URL
, because nobaseUrl
,host
orservers
is given.Previously it was enough to load the schema with an absolute SourceURL and it would configure itself with that host as baseUrl using that source!
To Reproduce
Steps to reproduce the behavior:
Use an OpenAPIv3 Swagger Schema without
servers
(host+basePath) config.I can't trim this down to a simple sandbox yet, too many open questions.
Results in this kind of error:
Expected behavior
Somehow this is still working with older graphql-mesh versions, there the host is derived from the
sourceUrl
I guess... I would expect something alike this to be implemented again.How should multiple server hosts be handled?
The upstream source uses OpenAPIv3, which may expose
servers
instead ofhost
&baseUrl
, but that is optional.Environment:
@graphql-mesh/cli
: 0.76.2@graphql-mesh/openapi
: 0.32.1Additional context
Also I noticed newly imported snake_casing, there are quite a few changes concerning the OpenAPI Handler including WIP Overhaul: #4278, I am still missing overview as it is a bit much, what recent changes did I miss?
The OpenAPI Handler Migration for v0.32 did not affect me - I think.
I was able to use the latest packages with a bit of manual tinkering (fixing type issues):
How can I workaround this?
Providing a
baseUrl
override in the.meshrc.yml
seems to do the trick! But that still confuses me, why is it needed now?What happend to Swagger Schema Integrity Validation? It seems json-machete does not implement that anymore, what's the background?
The text was updated successfully, but these errors were encountered: