italia / api-oas-checker

An OpenAPI 3 checker based on spectral.
https://italia.github.io/api-oas-checker/
58 stars 23 forks source link

Is not possibile upload and validate OAS3.0 JSON files #695

Open wlorenzetti opened 2 months ago

wlorenzetti commented 2 months ago

Uploading OAS3.0 JSON file on online validator https://italia.github.io/api-oas-checker/ I obtain the following error:

Screenshot_20240502_084853

Here the JSON file: api.openapi3.json

ioggstream commented 2 months ago

Can you try the following:

  1. pasting the json content in the editor ;
  2. Passing the file URL instead of uploading.
wlorenzetti commented 2 months ago

Console log error stack trace: Object { message: "Unsupported protocol data:", name: "AxiosError", code: "ERR_BAD_REQUEST", config: {…}, stack: "" } 8468.9bc2f185dd5fa8c5d498.js:1:1703 p https://italia.github.io/api-oas-checker/8468.9bc2f185dd5fa8c5d498.js:1 p https://italia.github.io/api-oas-checker/8468.9bc2f185dd5fa8c5d498.js:1 Js https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 cu https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 uu https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 uu https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 Zl https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 Uo https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 Vl https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 (Asinc.: VoidFunction) Vl https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 $l https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 Oa https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 notify https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 Yl https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 notify https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 notifyNestedSubs https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 o https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 h https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 onload https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 (Asinc.: EventHandlerNonNull) n https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 Me https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 ze https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 Mr https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 Mr https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 Lr https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 qr https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 Yl https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 Ne https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 qr https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 Vt https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 $t https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 (Asinc.: EventListener.handleEvent) zr https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 Br https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 Ur https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 Ur https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 createRoot https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2

https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2 https://italia.github.io/api-oas-checker/main.27cfdb0d6a137dbefa7c.js:2
wlorenzetti commented 2 months ago

Can you try pasting the json content in the editor ?

It's very strange in past I tried to copy and paste the JSON content file inside the validator and it didn't work fine. I just try now and with copy and paste now it works!. So I think only upload file feature is not working. Thanks @ioggstream for the help!