Skip to content

feat: RSS-SE-13 add openapi validation - #11

Merged
FierceSloth merged 17 commits into
feature/swaggerEditorfrom
story/RSS-SE-13_addOpenapiValidation
Jul 3, 2026
Merged

FierceSloth merged 17 commits into
feature/swaggerEditorfrom
story/RSS-SE-13_addOpenapiValidation

Conversation

@FierceSloth

@FierceSloth FierceSloth commented Jul 2, 2026 •

Copy link
Copy Markdown
Owner

📋 Trello Task ID

  • RSS-SE-13 (Task ID / Trello Card)
  • No ID (Global fix or chore)

⚡️ Summary

  • Integrate @stoplight/spectral-core to parse and validate OpenAPI schemas in both JSON and YAML formats.
  • Add CodeMirror Linter adapter to display validation errors directly in the editor with inline tooltips.
  • Customize the Spectral oas ruleset to ignore annoying stylistic rules and focus only on structural errors.
  • Add comprehensive unit tests for the schema validation utility.

🛠 Type of change

  • feat (New feature)
  • fix (Bug fix)
  • refactor (Code improvement / Refactoring without changing logic)
  • style (Formatting, CSS)
  • docs (Documentation)
  • chore (Configs, Build)
  • test (Testing)

📷 Screenshots / GIFs

image image

@vercel

vercel Bot commented Jul 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
swagger-editor-app Ready Ready Preview, Comment Jul 3, 2026 3:22pm

Comment on lines +4 to +26
export function detectFormat(text: string): DetectedFormat {
if (!text.trim()) return 'unknown';

try {
const parsed = JSON.parse(text) as unknown;
if (typeof parsed === 'object' && parsed !== null) {
return 'json';
}
} catch {
// not JSON
}

try {
const parsed = yaml.parse(text) as unknown;
if (typeof parsed === 'object' && parsed !== null) {
return 'yaml';
}
} catch {
// not YAML
}

return 'unknown';
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

@FierceSloth
FierceSloth merged commit 60f4251 into feature/swaggerEditor Jul 3, 2026
2 checks passed

This branch was successfully deployed

1 active deployment
Preview — 990d7b84 Deployed Jul 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants