# How to update schema dynamically (Angular)?

**URL:** <https://jsonforms.discourse.group/t/how-to-update-schema-dynamically-angular/81>\
**Category:** General\
**Created:** [June 9, 2021, 3:03am UTC](https://jsonforms.discourse.group/t/how-to-update-schema-dynamically-angular/81 "2021-06-09T03:03:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![discobot](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/discobot/32/3_2.png) [@discobot](https://jsonforms.discourse.group/u/discobot)\
**Post date:** [June 9, 2021, 3:03am UTC](https://jsonforms.discourse.group/t/how-to-update-schema-dynamically-angular/81/1 "2021-06-09T03:03:28Z")

</div>

I have a requirement where I need to update the schema for Jsonforms. I need to update the schema with more fields and click on update that should inject the updated schema to the Jsonforms. I tried “ajv.addSchema” but it didn’t work. What is the better approach?

_[[original thread](https://spectrum.chat/jsonforms/general/how-to-update-schema-dynamically-angular~90d69b76-91f6-48d2-8152-c1771cef88b2) by Chiranjeevi Tapal]_

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [June 10, 2021, 8:03am UTC](https://jsonforms.discourse.group/t/how-to-update-schema-dynamically-angular/81/2 "2021-06-10T08:03:17Z")

</div>

Hi @chiranjeevi-tapal(chiranjeevi-tapal), AJV is just the validation framework. Usually you don’t need to touch it at all. What you need to do instead is to exchange the schema input of JSON Forms.

Based on your other questions I’m assuming you’re using the Angular renderers. Somewhere in your code you’re using JSON Forms, for example like this

```auto
<jsonforms
    [data]="data"
    [schema]="schema"
    [uischema]="uischema"
    [renderers]="renderers"
    [ajv]="ajv"
></jsonforms>

```

Now all you need to do is to update this `schema` input on your side.
