Code Monkey home page Code Monkey logo

Comments (11)

remonzh avatar remonzh commented on August 17, 2024 1

Yes, this happens a lot now. So what happens that AJV had an update , where you need to add this: ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json'));
If the schema won't be defined by the caller

from ajsf.

remonzh avatar remonzh commented on August 17, 2024 1

@hamzahamidi , You get the following error now:
ERROR Error: no schema with key or ref "http://json-schema.org/draft-06/schema#" at Ajv.validate (vendor.bundle.js:sourcemap:98) at Ajv.validateSchema (vendor.bundle.js:sourcemap:184) at Ajv._addSchema (vendor.bundle.js:sourcemap:318) at Ajv.compile (vendor.bundle.js:sourcemap:118) at JsonSchemaFormService.webpackJsonp.../../../../../src/lib/src/json-schema-form.service.ts.JsonSchemaFormService.compileAjvSchema (json-schema-form.service.ts:278) at JsonSchemaFormComponent.webpackJsonp.../../../../../src/lib/src/json-schema-form.component.ts.JsonSchemaFormComponent.activateForm (json-schema-form.component.ts:664) at JsonSchemaFormComponent.webpackJsonp.../../../../../src/lib/src/json-schema-form.component.ts.JsonSchemaFormComponent.initializeForm (json-schema-form.component.ts:305) at JsonSchemaFormComponent.webpackJsonp.../../../../../src/lib/src/json-schema-form.component.ts.JsonSchemaFormComponent.updateForm (json-schema-form.component.ts:205) at JsonSchemaFormComponent.webpackJsonp.../../../../../src/lib/src/json-schema-form.component.ts.JsonSchemaFormComponent.ngOnChanges (json-schema-form.component.ts:178) at checkAndUpdateDirectiveInline (vendor.bundle.js:sourcemap:132289)

from ajsf.

remonzh avatar remonzh commented on August 17, 2024 1

Not yet, but you just need to add this line when you initialize the ajv object

from ajsf.

remonzh avatar remonzh commented on August 17, 2024 1

Somehow I can't add PR, but if you can do that line, then it is great :)

from ajsf.

hamzahamidi avatar hamzahamidi commented on August 17, 2024

Thank you @remonzh & @sinoysiby .I'll check this out asap

from ajsf.

hamzahamidi avatar hamzahamidi commented on August 17, 2024

Yes, this happens a lot now. So what happens that AJV had an update , where you need to add this: ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json'));
If the schema won't be defined by the caller

@remonzh Do you a ready PR?

from ajsf.

hamzahamidi avatar hamzahamidi commented on August 17, 2024

Not yet, but you just need to add this line when you initialize the ajv object

Thank you @remonzh . Can you provide a PR for this?

from ajsf.

hamzahamidi avatar hamzahamidi commented on August 17, 2024

@remonzh I can't reproduce the issue in the online demo. If you have time, can you give me an example? Thank you

from ajsf.

remonzh avatar remonzh commented on August 17, 2024

https://hamidihamza.com/Angular6-json-schema-form/?set=ng-jsf&example=ng-jsf-data-only&framework=material-design&language=en
You go here & choose "Data Only" From the Current Example Drop box. here is how it looks like:
image
And here is the error
image

from ajsf.

atotalnoob avatar atotalnoob commented on August 17, 2024

I am getting this same issue with Angular 7 and Material Design framework.

Could we merge this resoluution into the NPM build?

from ajsf.

mayankkalbhor avatar mayankkalbhor commented on August 17, 2024

I am getting this issue in all the frameworks i am trying to use. I am using Angular 6/Node 8. I have opened a new issue also in this case. Do you know how to resolve this issue? I have opened #82 with this same problem

from ajsf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.