JSON Schema 对比
发布 API 契约前检查 JSON Schema 的结构变化。
Schema path difference report
JSON Schema structure diff
Paste two JSON Schema or OpenAPI component drafts
Сравните два черновика JSON Schema или OpenAPI и проверьте пути, обязательные поля, типы и ограничения.
Часто задаваемые вопросы об онлайн-калькуляторах
Does this validate a schema?
No. It compares two JSON documents. Use a schema validator separately when you need to check whether either draft is valid.
Does key order affect the result?
No when the default option is enabled; object keys are normalized before paths are compared.
Does this validate my API responses?
No. It compares the schema documents. Run a separate validator against representative payloads when you need validation evidence.
Which schema draft is supported?
The comparison focuses on the JSON structure and keywords present in the documents. Confirm draft-specific behavior with your validator and test suite.
Can I compare schemas containing internal field names?
The workspace is intended for local browser comparison, but you should still follow your organization’s data-handling rules before pasting sensitive material.
Compare JSON Schema versions
Review two JSON Schema documents to find structural changes in properties, nesting, types, required fields, and constraints. This is useful when an API contract changes and you need a focused review before publishing a new version.
How to Use this Comparer Online
- Place the earlier schema on the left and the proposed schema on the right.
- Compare added and removed properties first, then inspect type and required-field changes.
- Treat a removed required field, a narrowed type, or a new constraint as a compatibility decision that needs review.
The result is a structural comparison of the schemas you provide. It is not a replacement for validating real payloads against the selected draft or running your API contract tests.
Review compatibility deliberately
An added optional property is usually different from an added required property. Likewise, changing a property from a string to an object can affect clients even when the property name stays the same. Record the intended compatibility policy alongside the diff.