Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can`t use it without schema 2 #53

Closed
1 of 5 tasks
pharindoko opened this issue Dec 19, 2018 · 2 comments
Closed
1 of 5 tasks

Can`t use it without schema 2 #53

pharindoko opened this issue Dec 19, 2018 · 2 comments
Assignees

Comments

@pharindoko
Copy link

pharindoko commented Dec 19, 2018

Describe the bug
which template:

  • MaterialDesignFrameworkModule — Material Design
  • Bootstrap3FrameworkModule — Bootstrap 3
  • Bootstrap4FrameworkModule — Bootstrap 4
  • NoFrameworkModule — plain HTML
  • Other (please specify below)

A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

Use plain json without schema
It fails to validate - schema is undefined

More details:

ajv.js

function validate(schemaKeyRef, data) {
	...
    v = this.getSchema(schemaKeyRef);
	...
}

ajv.js line 238
It compares keyRef = "http://json-schema.org/draft-06/schema# with "http://json-schema.org/draft-07/schema"

  return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef];

result "undefined" will be returned

Error in line 92 will be thrown:

    if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"');

Expected behavior

The correct schema will be taken

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • Angular 7
@hamzahamidi hamzahamidi self-assigned this Dec 19, 2018
@hamzahamidi
Copy link
Owner

Noted I'll check this out asap

@hamzahamidi
Copy link
Owner

Duplicate #52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants