Native JSON schema validator classes in IRIS
1️⃣ Description of the idea
Introduce native JSON Schema validator classes in IRIS that allow developers to validate JSON data against a predefined JSON Schema. This would enable built-in support for structural and semantic validation of JSON payloads, especially in REST APIs.
In the Spec-First approach, automatically apply this validation when the payload/response schema is defined using Swagger.
2️⃣ Who is the target audience?
Backend developers building or consuming REST APIs can easily test utilize this features and validating untrusted input formats
Integration engineers validating external JSON input.
API designers ensuring contract-first development.
QA teams enforcing payload structure compliance.
3️⃣ What problem does it solve?
Currently, IRIS lacks a native way to validate JSON against a schema:
Developers must manually write validation logic (e.g., checking required fields, types, formats) - when consuming APIs.
There's no standard or reusable way to validate data consistency across APIs
External tools or custom libraries must be integrated, increasing complexity and risk
A native JSON Schema validator solves this by:
Providing a consistent, reusable, standards-compliant way to validate JSON
Simplifying request/response validation for APIs
Seamless and default validation implementation is provided with the Spec-First approach, ensuring that JSON payloads are automatically validated based on the schema defined in the Swagger API specification.
4️⃣ How does this impact the efficiency, stability, reliability, etc., of the product?
Efficiency: Reduces boilerplate code for validating API input/output
Stability: Ensures data conforms to expected structure before further processing
Reliability: Improves data quality and error handling
5️⃣ Provide a specific use case or scenario that illustrates how this idea could be used in practice
Validation must be implemented manually in ObjectScript, leading to redundant and error-prone code. With Native JSON Schema Validator The developer simply writes Clear, declarative validation. Safer, more predictable input handling and it helps Rapid API development with built-in schema support
Thank you for submitting the idea. The status has been changed to "Community Opportunity".
Stay tuned!