# Schema and Data Validation

The Schema and Data Validation module enables developers to fully understand and test the structural requirements of workflows. By exposing schema details and providing tools to validate data, it ensures that workflows are configured correctly and ready for production. This functionality is critical for ensuring alignment between data inputs and workflow expectations.

**Key Benefits**

1. **Schema Exploration**:\
   Developers can retrieve schema definitions and their associated fields, understanding the structure and constraints of the data required for workflows.
2. **Data Validation**:\
   The ability to test data submissions against schemas ensures that workflows are not disrupted by invalid or improperly formatted data.
3. **Pre-Workflow Testing**:\
   Developers can simulate data submissions to validate the workflow’s functionality before committing to real-world use. This eliminates errors during the workflow lifecycle.
4. **Enhanced Querying**:\
   When combined with Credit Warehouse Queries, users can align schema details with the fields required to interact with issued assets, creating a seamless querying experience.

***

**How It Works**

1. **Schema Index**:\
   Retrieve a list of schemas tied to specific workflows. Each schema outlines the structure, fields, and validation requirements for data submissions.
2. **Schema Fields**:\
   Explore detailed field-level metadata within schemas, such as required fields, primary keys, and data types.
3. **Test Data Validation**:\
   Use the validation endpoint to test data submissions before applying them to a live workflow. This ensures that data meets all schema requirements and prevents issues downstream.

***

**Use Cases**

1. **Pre-Deployment Testing**:\
   Developers can test workflows and validate data against schemas to ensure smooth operation in production environments.
2. **External Query Alignment**:\
   Schema exploration helps external users understand which fields are required to query the system, especially when interacting with the Credit Warehouse.
3. **Streamlined Workflow Development**:\
   By understanding schemas and validating data, developers can design workflows that are optimized for their specific use cases.

***

{% openapi src="<https://116257023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMgfYR4iNMhdWqFrJ1ibn%2Fuploads%2Fp3lUNEaW0nFPV2ZCMt2b%2FDOVU%20OS.openapi(1).yaml?alt=media&token=2b22f069-e425-4f40-8e6d-176ba0f1db49>" path="/api/v1/schema" method="get" %}
[DOVU OS.openapi(1).yaml](https://116257023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMgfYR4iNMhdWqFrJ1ibn%2Fuploads%2Fp3lUNEaW0nFPV2ZCMt2b%2FDOVU%20OS.openapi\(1\).yaml?alt=media\&token=2b22f069-e425-4f40-8e6d-176ba0f1db49)
{% endopenapi %}

{% openapi src="<https://116257023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMgfYR4iNMhdWqFrJ1ibn%2Fuploads%2Fp3lUNEaW0nFPV2ZCMt2b%2FDOVU%20OS.openapi(1).yaml?alt=media&token=2b22f069-e425-4f40-8e6d-176ba0f1db49>" path="/api/v1/schema/schema/fields" method="get" %}
[DOVU OS.openapi(1).yaml](https://116257023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMgfYR4iNMhdWqFrJ1ibn%2Fuploads%2Fp3lUNEaW0nFPV2ZCMt2b%2FDOVU%20OS.openapi\(1\).yaml?alt=media\&token=2b22f069-e425-4f40-8e6d-176ba0f1db49)
{% endopenapi %}

{% openapi src="<https://116257023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMgfYR4iNMhdWqFrJ1ibn%2Fuploads%2Fp3lUNEaW0nFPV2ZCMt2b%2FDOVU%20OS.openapi(1).yaml?alt=media&token=2b22f069-e425-4f40-8e6d-176ba0f1db49>" path="/api/v1/schema/schema/validate" method="post" %}
[DOVU OS.openapi(1).yaml](https://116257023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMgfYR4iNMhdWqFrJ1ibn%2Fuploads%2Fp3lUNEaW0nFPV2ZCMt2b%2FDOVU%20OS.openapi\(1\).yaml?alt=media\&token=2b22f069-e425-4f40-8e6d-176ba0f1db49)
{% endopenapi %}

***

#### **Future Enhancements**

In future iterations, we plan to introduce a **Schema Builder** that will revolutionize how developers and users interact with the DOVU OS system. This highly visual, drag-and-drop interface will enable seamless creation, modification, and updating of schemas in real-time. The key features of the Schema Builder will include:

1. **User-Friendly Design**:\
   A simple, intuitive interface that empowers developers and non-technical users to construct schemas with ease, eliminating the need for extensive technical knowledge.
2. **Dynamic Updates**:\
   The ability to modify schemas dynamically and pivot designs as project needs evolve, ensuring maximum flexibility and adaptability.
3. **Workflow Integration**:\
   Once built or updated, schemas will automatically connect to the larger workflow system, enabling seamless integration into the project lifecycle. This ensures that schema changes are instantly reflected in workflows, maintaining alignment across the system.
4. **Visual Flow Representation**:\
   A drag-and-drop flow representation that simplifies schema creation and aligns it with workflow visualization, making it easier to design end-to-end solutions.

This future enhancement will significantly streamline the process of schema creation and management, making the system more accessible, flexible, and efficient for all users. It represents a key step forward in empowering users to fully harness the potential of the DOVU OS Workflow Engine.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dovu.earth/workflow-engine/editor/schema-and-data-validation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
