-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Using local artifactory with schemas causes some issues #917
Comments
@derberg you are using a local studio instance to load your localhost schema ? or using https://studio.asyncapi.com/ ? |
Hi @derberg @Amzani , I tried to reproduce the error using the http-server method but for me it is working fine. I have attached the screenshot , I think it might be a problem of CORS , Can you just try using |
I'm using |
@ayush3160 but you did not reproduce my environment
in inspect I see
Assuming you use netlify, you could do https://github.com/asyncapi/website/blob/master/netlify.toml#L5 I'm pretty sure that it is CORS on netlify setting, as @ayush3160 proved it works fine on localhost from sources |
@derberg this is how I tried to replicate the issue and enabling CORS in both cases resolved the issues for me.
I used this file to create a server and
CORS was disabled by default for me so I had to enable it with this is my shows an OPTIONS request. but it works fine. |
omg it started working when I went into incognito...... 🤦🏼 normally console was showing now getting also nice error for apicurio:
now I was able to dig in and find proper way to enable cors in apicurio: Thanks folks for helping 🙏🏼 |
Describe the bug
I have such document
And studio points strange issue in not existing line:
42:21 | TypeError: Failed to fetch
Yes, this is a valid link, I have this resource available. You can easily reproduce it.
Also when I try some different reference, pointing to
https://www.asyncapi.com/resources/casestudies/adeo/CostingRequestPayload.avsc
all is good. Like I don't know, likelocalhost
is blocked or somethingHow to Reproduce
Terminal 1
Start artifactory
docker run -it -p 8080:8080 apicurio/apicurio-registry-mem:2.5.8.Final
Terminal 2
upload schema
and now you can access schema under: http://localhost:8080/apis/registry/v2/groups/my-group/artifacts/UserSignedUp
quickly checking
curl http://localhost:8080/apis/registry/v2/groups/my-group/artifacts/UserSignedUp --verbose
you can see server returns json with 200 like a charmbut yeah, when you put this link in
$ref
you get the same error as I described.So I thought, maybe it is because of Apicurio, so this is how I confirmed that probably not
npm install -g http-server
dupa.avro
http-server /folder/where/avrofile/located/
http://127.0.0.1:8080/dupa.avro
and put in AsyncAPI document -> still the same errorTypeError: Failed to fetch
So I do not think it is a problem of Apicurio sharing some wrong content type or something. Look like there is localhost issue?
The text was updated successfully, but these errors were encountered: