Closed sberwal closed 2 months ago
thats coz, when it fails to load , it would like to show the path that you provided that resulted in the failure, and allow you to fix and retry again
I agree with that and the error messages contains the path to the spec which failed to load. Why do we need to show the header again when its set to be hidden?
The header should only be shown for parsing errors when its set to true else error message should be enough to show the path to the failed spec.
Does this make sense?
Why do we need to show the header again when its set to be hidden
so that you can fix the path and reload the spec with the hidden header
is it creating any issue on your end ?
hi mrinmoy,
yes, it creating an issue because we have embedded the rapidoc in html pages customised to our theme. so if any error message comes the rapidoc shows the default header which breaks the GUI as we have set "show-header = false".
Though we understand the path to spec needs to be shown but that spec path is visible in the error message generated by rapidoc below the header. Please see the pic below. The error messages contains the path to the spec so header can still be hidden if its set to be hidden.
This will solve the purpose
Thanks, Suraj
@mrin9 any thoughts on this particular issue.
Hi
Currently if rapidoc is used in embedded mode and is not able to parse the json specified in the spec-url it shows the default rapidoc header with the name of json file revealed and a default error message saying spec not loaded.
If there was way to handle the error messages thrown by rapidoc and pass a custom error message there for default errors. Also the default rapidoc header should not be revealed.
the rapidoc code