Make the input an unambiguous JSON or YAML document

Start with one nonempty document and fix syntax without discarding data.

Match the finding

These titles and messages come from this local checker. They are not AWS service error quotes.

Cause and scope

The parser rejects invalid syntax, duplicate keys, multiple YAML documents, and non-object roots. These are input failures, so OpenAPI and AWS checks cannot run yet.

What to do

Check that the .json, .yaml, or .yml extension matches the source, inspect the reported character or location, and correct the file in your editor. The root must be an object containing the complete OpenAPI definition.

  1. Check that the file extension matches the source format and that the file is not empty.
  2. Fix missing quotes, delimiters, indentation, or duplicate keys using the intended values.
  3. For a multi-document stream, deliberately select or assemble the single complete API definition, then load it again.

Info fragment: reconcile a duplicate key before parsing again

# Two version keys in this same mapping would be rejected.
# Keep one value only after confirming the intended version.
info:
  title: Pet API
  version: '1.0.0'

If info contained version twice, this checker would reject the document instead of choosing one value. This fragment assumes 1.0.0 was confirmed as correct. Reconcile the conflicting values in the original complete definition rather than discarding one automatically.

Avoid a misleading fix

Do not let a parser silently choose one duplicate key, discard extra documents, or wrap arbitrary content in an object just to get past parsing.

Check your complete file locally

Choose one OpenAPI 3.0 JSON or YAML file, diagnose the findings, and review any eligible security-copy preview before downloading. No file upload or account is needed.

Open the free OpenAPI checker →

Related findings

Sources and scope

Scope: this local checker, API Gateway REST APIs, and OpenAPI 3.0. Guidance reviewed 4 October 2026. A passing check does not guarantee import or runtime behavior.