# Deleting Schema

## 1. Overview

When a user attempts to delete a schema from the grid page, a modal window appears to confirm the action and display relevant dependency information.

<figure><img src="/files/60AyjRaBia2Y0Cl8uHpX" alt=""><figcaption></figcaption></figure>

## 2. Functional Details

### 2.1 Deleting Schemas with Child Schemas

When deleting a schema that has child schemas:

* The modal displays a list of all child schemas that can be deleted along with it.
* It also shows which child schemas cannot be deleted due to dependencies on other schemas.
* A checkbox allows the user to choose whether to:
* Delete only the selected schema, or
* Delete the selected scheme and all its child schemas.

<figure><img src="/files/6FiPCAx3eyiHT5E9yFfk" alt=""><figcaption></figcaption></figure>

### 2.2 Deleting Schemas with Parent Dependencies

If the selected schema depends on one or more parent schemas, deletion is not allowed.\
In this case:

* The modal displays a warning message explaining that the scheme cannot be deleted due to existing dependencies.

<figure><img src="/files/juhTeEk4hgjDx2qM0fpr" alt=""><figcaption></figcaption></figure>

### 2.3 Deleting all Schemas

User will now be able to delete all schemas for a particular policy by using "Delete All Schemas" button:

<figure><img src="/files/BIx49VDnH1CcjrOFKzEI" alt=""><figcaption></figcaption></figure>

### 2.4 Delete Multiple Schemas

Added ability to select and delete items from schema table in Guardian UI.

<figure><img src="/files/kFVUyh2sZb5yX5vAc9Bz" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Note:

1. Selected items remain selection across pagination.
2. Dependencies are considered when deleting multiple schemas.
   {% endhint %}


---

# 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://guardian.hedera.com/guardian-dev/guardian/standard-registry/schemas/deleting-schema.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.
