Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 20 23:59
    thejuan edited #1106
  • Oct 20 23:58
    thejuan labeled #1106
  • Oct 20 23:58
    thejuan opened #1106
  • Oct 19 12:30
    remko opened #1105
  • Oct 19 12:08

    greenkeeper[bot] on uglify-js-3.6.3

    (compare)

  • Oct 19 12:07
    Travis epoberezkin/ajv@5fda87f (greenkeeper/uglify-js-3.6.3) passed (2368)
  • Oct 19 12:03

    greenkeeper[bot] on uglify-js-3.6.3

    chore(package): update uglify-j… (compare)

  • Oct 18 22:13

    greenkeeper[bot] on karma-4.4.1

    (compare)

  • Oct 18 22:05

    greenkeeper[bot] on mocha-6.2.2

    (compare)

  • Oct 18 21:54
    Travis epoberezkin/ajv@15c8d49 (greenkeeper/karma-4.4.1) passed (2367)
  • Oct 18 21:49

    greenkeeper[bot] on karma-4.4.1

    chore(package): update karma to… (compare)

  • Oct 18 21:17
    Travis epoberezkin/ajv@89af8c0 (greenkeeper/mocha-6.2.2) passed (2366)
  • Oct 18 21:11

    greenkeeper[bot] on mocha-6.2.2

    chore(package): update mocha to… (compare)

  • Oct 17 18:10
    epoberezkin unlabeled #1104
  • Oct 17 18:10
    epoberezkin labeled #1104
  • Oct 17 18:07
    epoberezkin closed #1104
  • Oct 17 18:07
    epoberezkin commented #1104
  • Oct 17 16:58
    cjolif labeled #1104
  • Oct 17 16:58
    cjolif opened #1104
  • Oct 17 10:40
    epoberezkin labeled #1103
Evgeny Poberezkin
@epoberezkin
Nope
There is ajv-errors
Vaibhav Mehta
@i-break-codes
yea, I checked that but it's for custom error messages only.. anyways, thanks for the quick response.. appreciated
Rui Silva
@RuiAlias
Hi! I have a question but first of all, thanks for ajv! Is there a way to get the complete list of properties of a Schema, with $ref and allOf expanded using ajv?
From what I've read in the FAQ, it looks like this is not possible. If that is the case, can you guys recommend some other library for this?
Rui Silva
@RuiAlias
Thanks!
Ntropy
@Ntropy
Hi,
Is it possible to enable some additional logging, diagnostic messages in ajv?
Evgeny Poberezkin
@epoberezkin
What is the objective?
Ben Hutton
@Relequestual
I'm trying to get validation errors. Is there any sense of validation error bubbling upwards? As in, if I do allOf > [{required: a}], I get the error on the required but not the allOf, and I'd like to see both. Anyone know? =]
Matthias Mohr
@m-mohr

Hey all,
is there a way to interfere the validation of each value before it is validated against the (sub-)schema? Potentially as plugin?

Background:
I have a JSON structure that can hold variables, which we defined to be an object with an id and a type, for example: {variable_id: 'password', type: 'string'}. These can be embedded in my JSON files, for example:

{
  process: 'login',
  arguments: {
    username: 'john_doe',
    password: {variable_id: 'password', type: 'string'}
  }
}

In the end the variable for password is replaced with a string value, but I don't know that value yet. So what I'd like to do here is to interfere at the point where the value of password is checked against the schema. Currently it fails of course, because the variable object is not a string, which is expected in the JSON schema. So what I need to do is to check if there's an object with a variable_id property before validating against the original part of the JSON schema. If there's a variable I need to run a custom function that checks whether the variable definition is compatible to the schema (I have code for that) and if it's not a variable, just run the validation as usual. Where do I need to interfere in the ajv code? Any hints on that? I can't change the JSON schemas, these are coming from an external source.

Thanks in advance...

Ntropy
@Ntropy
@epoberezkin to make possible to handle successed subschemas
Evgeny Poberezkin
@epoberezkin
@Relequestual let me know if allErrors option helps?
@m-mohr please check the custom keywords - that’s what they are for I think
@Ntropy I think it may be related to annotation collection tbh... Maybe it’s worth allowing generic hooks or events to the instance. I will think about it - it would be a new feature
Matthias Mohr
@m-mohr
@epoberezkin I'm not sure how this could be achieved with custom keywords. I already use them somewhere else and they work very well there, but in this use case? We don't get to the point where the custom keyword could be checked as it already fails beforehand due to a string being expected, not an object. Or do I miss something here?
Ntropy
@Ntropy
@epoberezkin this feature could be used to simplify schemas: by removing conditional subschemas based on data. It can be used as some kind of preprocessor
Evgeny Poberezkin
@epoberezkin
@m-mohr you can use allOf to control execution order
Matthias Mohr
@m-mohr
@epoberezkin Thanks, but then I need to parse the JSON Schema myself and replace all subschemas with allOf's. If I start to parse/modify JSON it get's messy and I don't have much reason anymore to use ajv. So I don't think that's a reasonable way to go. Isn't there a single place in code where one could apply some pre-processing, e.g. by writing a plugin? I just couldn't figure out where that is...
Mattias Severson
@matsev
Hi all,
I have problem with ajv JSON validation of a JavaScript object that contains line breaks, e.g. { key: 'a string\nwith a line break' }. Consequently, I have posted a question on SO. Please write a line or two if you know what I am doing wrong?
Evgeny Poberezkin
@epoberezkin
  1. You don’t need to serialise data. 2. “.” in regex does not match new line character
Ben Hutton
@Relequestual
Hello. @epoberezkin draft-8 is due to be published any day now. There is at least one implementation which already has a beta for testing. Do you have plans to support draft-8? =]
Evgeny Poberezkin
@epoberezkin
@Relequestual I will ready it!
Read it
@/all any interest to contribute to draft-8 support and generally to Ajv development further?
Evgeny Poberezkin
@epoberezkin
@Relequestual is there change log - everything that was added/changed/removed?
Ben Hutton
@Relequestual
@epoberezkin You'd have to look at each document. There's a changelog at the end, which is in the index
Mahmoud Abd Al Kareem
@MahmoudAbdAlKareem
Hello
I'm trying to use ajv for FHIR schema validation
IS there any resources for that?
ttxndrx
@ttxndrx
When referencing external schemas with $ref, can the compiled schema provide an expanded/evaluated representation, where all references are replaced by the actual schemas?