mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-07 22:18:33 +00:00
* 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>
7 lines
386 B
TypeScript
7 lines
386 B
TypeScript
export const SPEC_PREVIEW_ERRORS = {
|
|
EMPTY: 'Unable to render preview: No API definition provided.',
|
|
INVALID_YAML_JSON: 'Unable to render preview: content is not a valid YAML or JSON.',
|
|
INVALID_OPENAPI: 'Unable to render preview: content is not a valid OpenAPI specification.',
|
|
TIMEOUT: 'Preview timed out. The spec may be too large or contain unsupported content.'
|
|
} as const;
|