Tool overview
What is an OpenAPI Validator?
An OpenAPI validator lints OpenAPI 3 and Swagger 2 documents for structural errors, warnings, and path coverage issues.
Why use this OpenAPI Validator?
Catch broken specs before codegen or gateway deploy—without uploading private API definitions to a hosted linter.
Key Features
OpenAPI/Swagger linting, structured diagnostics, path coverage cues, and private local analysis.
How to Use
Follow these steps to get accurate results from the tool interface above.
- Paste OpenAPI 3 or Swagger 2 as JSON or YAML into the input panel.
- Review the status banner: VALID, VALID WITH WARNINGS, or INVALID.
- Fix blocking diagnostics first — duplicate operationId, missing responses, and invalid $ref.
- Re-lint until the document is VALID or only acceptable warnings remain.
- Pipe the cleaned spec into Kiota SDK Engine for readiness scoring and kiota generate preview.
- Prefer OpenAPI 3 for new APIs; treat Swagger 2 results as legacy with migration warnings.
- Use this page as a PR checklist gate before approving OpenAPI changes.
- Keep specs local — nothing is uploaded for lint or logging.
OpenAPI Validator — Complete Guide & Kiota Readiness
Authoritative walkthrough: lint status, pre-Kiota readiness, CI gates, fixes for duplicate operationId / missing responses / invalid $ref, and piping into Kiota SDK Engine — all runnable against the editor above.
What OpenAPI Validator does
OpenAPI Validator is a client-side linter for OpenAPI 3 and Swagger 2 JSON/YAML. It reports VALID, VALID WITH WARNINGS, or INVALID with path-aware diagnostics so you can fix blockers before SDK generation or gateway import.
What you get
- Parse OpenAPI 3.x and Swagger 2 documents (JSON or YAML)
- Status banner: VALID / VALID WITH WARNINGS / INVALID
- Checks for version keys, paths coverage, servers, and common structural issues
- Local-only lint — safe for internal API specs
- Direct handoff path to Kiota SDK Engine for codegen readiness
Use this tool when
- You need a fast pre-flight before Microsoft Kiota or other generators
- CI or a PR checklist requires a human-readable lint of the committed spec
- You inherited a Swagger 2 file and want migration warnings before OpenAPI 3 work
- Duplicate operationId or broken $ref keep breaking codegen
Prefer a sibling tool when
- You need full Kiota readiness scoring, language matrix, and CLI command builder → Kiota SDK Engine
- You only need to beautify JSON payloads → JSON Formatter
- You need mock response arrays → JSON Generator
Readiness before Kiota and other codegen
Code generators (especially Kiota) fail loudly on structural problems that a casual YAML glance misses. Lint here first, then open Kiota SDK Engine for generator-specific readiness.
Blockers to clear before codegen
- Duplicate or missing operationId (method naming collisions)
- Missing or empty responses on success status codes
- Invalid or dangling $ref into components
- Missing openapi/swagger version key or empty paths object
- Circular schema references (often surface in Kiota next)
Warnings you may defer
- Missing servers[] — clients may need --base-url overrides
- Swagger 2 migration notes — prefer OpenAPI 3 for new APIs
- Sparse descriptions — documentation quality, not parse blockers
Step-by-step: paste, lint, fix, pipe
First-time walkthrough before generating an SDK.
- Paste OpenAPI 3 or Swagger 2 as JSON or YAML into the input panel.
- Read the status: VALID, VALID WITH WARNINGS, or INVALID.
- Fix every error in the diagnostics list — start with operationId, responses, and $ref failures.
- Re-lint until the status is VALID or only acceptable warnings remain.
- Pipe the cleaned spec into Kiota SDK Engine for readiness score, language preview, and kiota generate command.
- Commit the fixed document and optionally add this lint as a PR checklist item.
Use case: CI / PR lint gate
Pull requests merge OpenAPI edits that later break nightly SDK regeneration. Reviewers cannot spot duplicate operationIds by eye.
How this tool solves it
- Paste the PR’s OpenAPI document into the validator during review.
- Require VALID (or documented warnings only) before approve.
- Call out duplicate operationId and broken $ref in the review thread with the diagnostic text.
- After merge, run Kiota in CI against the same document.
Human-speed lint gate that catches the same class of failures generators hit — without uploading the spec.
Use case: pre-SDK check before Kiota
A team is about to run kiota generate and wants confidence the document will not fail on naming or $ref issues.
How this tool solves it
- Lint the document here until INVALID is cleared.
- Pipe into Kiota SDK Engine and review the OpenAPI Readiness score.
- Fix any remaining Kiota-specific issues (circular refs, nullable style) in the Kiota diagnostics.
- Copy the generated CLI command once readiness is acceptable.
A two-step local workflow: structural lint → Kiota readiness → generate on your machine.
Use case: Swagger 2 migration warnings
An older Swagger 2 JSON still powers a gateway. Stakeholders want OpenAPI 3 before adopting Kiota.
How this tool solves it
- Paste the Swagger 2 document and note migration warnings.
- Fix structural INVALID issues that would block any converter.
- Plan an OpenAPI 3 migration for new features; keep Swagger 2 only while gated.
- Re-lint the OpenAPI 3 result before Kiota.
Clear signal that Swagger 2 is parsed with warnings — prefer OpenAPI 3 for new SDK work.
Fix: duplicate operationId
Generators name client methods from operationId. Duplicates cause collisions.
Why it happens
Two or more operations share the same operationId, or operationId is missing where the generator requires it.
Diagnose
Search the document for repeated operationId values. Kiota and this linter both flag collisions — fix here before opening the SDK engine.
Fixes
- Assign a unique operationId to every operation (verb + resource is a common pattern).
- Remove unused duplicate paths that were copied during editing.
- If trimming for a partial SDK, drop conflicting paths instead of renaming production IDs casually.
After renaming, re-lint and then re-check Kiota readiness — method names in previews will change.
Fix: missing or empty responses
Operations without usable responses break typed client generation.
Why it happens
A path operation omits responses, or success responses have empty content {} with no schema.
Diagnose
Inspect each operation’s responses map for 200/201 (or default) entries and ensure content schemas resolve.
Fixes
- Add at least one success response with an application/json (or relevant) media type.
- Point content schema to components.schemas via $ref instead of leaving content empty.
- Document error responses (4xx/5xx) when clients must handle them — warnings may remain if omitted.
Fix: invalid or dangling $ref
Invalid $ref pointers prevent schema resolution during lint and codegen.
Why it happens
A $ref targets a missing component, uses a wrong JSON Pointer, or forms a cycle the resolver cannot expand.
Diagnose
Follow each failing $ref path into components.schemas / parameters / responses. Confirm the target key exists and spelling matches.
Fixes
- Repair or recreate the missing component target.
- Normalize $ref strings to #/components/... pointers.
- Break circular references by extracting shallow DTOs (Kiota’s circular-ref guide applies next).
VALID vs VALID WITH WARNINGS vs INVALID
Interpret the banner before you change the document.
Validation status
| Status | Meaning | Next step |
|---|---|---|
| VALID | No blocking structural issues detected | Safe to pipe into Kiota or commit |
| VALID WITH WARNINGS | Parses but has non-blocking issues (e.g. servers, Swagger 2) | Review warnings; proceed if acceptable |
| INVALID | Blocking errors present | Fix diagnostics before codegen |
Pipe cleaned specs into Kiota SDK Engine
OpenAPI Validator and Kiota SDK Engine are complementary. Lint for structural health here; use Kiota for generator readiness, language matrix, endpoint selection, and CLI command export.
- Pipe or paste the cleaned spec into Kiota SDK Engine after VALID.
- Use Kiota diagnostics for duplicate operationId, circular $ref, and nullable style issues that generators emphasize.
- Copy kiota generate from the Kiota Generate step — file emission still runs via the local Kiota CLI.
- Keep both tools client-side so internal API contracts never leave the browser.
OpenAPI lint best practices
- Lint on every OpenAPI PR before approving.
- Prefer OpenAPI 3 for new APIs; treat Swagger 2 as legacy with migration warnings.
- Make operationId unique and stable — renames churn generated clients.
- Always give success responses a resolvable schema.
- Clear INVALID before opening Kiota; use Kiota for generator-specific readiness next.
- Do not upload internal specs to third-party lint SaaS when this local path suffices.
Frequently Asked Questions
Expandable answers for common debugging bottlenecks and data privacy questions.
Related tools
Explore other related utilities that complement this tool.
Official Documentation & References
Authoritative specifications and platform documentation for this utility.