mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-08 06:28:33 +00:00
fix(openapi):validate API spec imports (#8322)
* fix(openapi):validate API spec imports and resolve preview to error state instead of hanging * fix(openapi):allows opening of malformed files with correct extension * fix(openapi):reject non-OpenAPI content in spec preview before timeout * test(openapi): add unit + e2e coverage for spec import validation * refactor(openapi):centralise spec error messages and fix dialog restore * fix:removed nested try catch * test:added common locators * refactor:removed repeated lines * refactor:removed redundant file reads --------- Co-authored-by: Adwait Aayush <adwaitaayush@Adwaits-MacBook-Air.local>
This commit is contained in:
19
tests/import/openapi/fixtures/openapi-broken.json
Normal file
19
tests/import/openapi/fixtures/openapi-broken.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"openapi": "3.0.0",
|
||||
"info": {
|
||||
"title": "Malformed OpenAPI"
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"paths": {
|
||||
"/test": {
|
||||
"get": {
|
||||
"summary": "Test endpoint",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user