openclarity / apiclarity

An API security tool to capture and analyze API traffic, test API endpoints, reconstruct Open API specification, and identify API security risks. 
https://apiclarity.io
Apache License 2.0
498 stars 64 forks source link

Provide better validation error message for uploaded spec #338

Open amccormi opened 1 year ago

amccormi commented 1 year ago

Is your feature request related to a problem? Please describe. I tried to upload an OpenAPI spec file, but it was missing a version (was an empty string). The Upload Spec UI just says "Error in File", but the log message for APIClarity server is much more detailed: "spec validation failed. invalid info: value of version must be a non-empty string. spec validation failed""

Describe the solution you'd like I'd like to see the more descriptive error make it's way into the UI to provide feedback about what's wrong with the spec file.

Describe alternatives you've considered Until I found the log message, I had no idea what was wrong, so there wasn't an alternative.