profile
viewpoint
Austin Wright awwright Arizona https://twitter.com/awwscript Just this guy, you know?

awwright/magnode 22

The semantic content management system for Node.js.

awwright/contenttype 8

Javascript/ECMAScript library for parsing Content-Type and Media/MIME type strings

awwright/git-node 5

Make Node.js submodules useful

awwright/http-progress 5

Resumable Requests and Long-Running Operations in HTTP

awwright/dive-httpd 3

Experimental HTTP application framework based on URI templates and Stream#pipe

awwright/jsonschemaparse 3

Streaming parser for JSON with automatic validation and customizable parsing

awwright/gulp-http-server 2

An HTTP server with Gulp!

awwright/jsonschema 2

jsonschema

awwright/CAPSLOCKSCRIPT 1

JAVASCRIPT, LOUD, STRONG AND IMPROVED

awwright/guru-specfile 1

The Declarative, Semantic Build System

issue commenttdegrunt/jsonschema

csp policy blocking script

Are you sure you're using the "jsonschema" package? We don't use eval.

On Thu, Feb 13, 2020, 10:17 sid786 notifications@github.com wrote:

Error compiling schema, function code: var refVal1 = refVal[1]; var validate = function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; var vErrors = null; var errors = 0; var errs_1 = errors; var errs_2 = errors; if ((typeof data !== "number" || (data % 1) || data !== data)) { var err = { keyword: 'type' , dataPath: (dataPath || '')

  • "" , schemaPath: '#/definitions/positiveInteger/type' , params: { type: 'integer' } , message: 'should be integer' , schema: refVal[1].type , parentSchema: refVal[1] , data: data } ; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } if (typeof data === "number") { if ( data < 0 || data !== data) { var err = { keyword: 'minimum' , dataPath: (dataPath || '') + "" , schemaPath: '#/definitions/positiveInteger/minimum' , params: { comparison: '>=', limit: 0, exclusive: false } , message: 'should be >= 0' , schema: 0 , parentSchema: refVal[1] , data: data } ; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } var valid2 = errors === errs_2; var valid1 = errors === errs_1; validate.errors = vErrors; return errors === 0; }; return validate; F @ main.e6cc2c184e2eb1d54b53.js:1 s @ main.e6cc2c184e2eb1d54b53.js:1 L @ main.e6cc2c184e2eb1d54b53.js:1 e.exports @ main.e6cc2c184e2eb1d54b53.js:1 e.exports @ main.e6cc2c184e2eb1d54b53.js:1 e.exports @ main.e6cc2c184e2eb1d54b53.js:1 e.exports @ main.e6cc2c184e2eb1d54b53.js:1 F @ main.e6cc2c184e2eb1d54b53.js:1 e @ main.e6cc2c184e2eb1d54b53.js:1 v.

compile @ main.e6cc2c184e2eb1d54b53.js:1 v.getSchema @ main.e6cc2c184e2eb1d54b53.js:1 v.validate @ main.e6cc2c184e2eb1d54b53.js:1 v.validateSchema @ main.e6cc2c184e2eb1d54b53.js:1 v.addSchema @ main.e6cc2c184e2eb1d54b53.js:1 v.addSchema @ main.e6cc2c184e2eb1d54b53.js:1 v.addMetaSchema @ main.e6cc2c184e2eb1d54b53.js:1 f.setSchema @ main.e6cc2c184e2eb1d54b53.js:1 g.create @ main.e6cc2c184e2eb1d54b53.js:1 f.setMode @ main.e6cc2c184e2eb1d54b53.js:1 f.create @ main.e6cc2c184e2eb1d54b53.js:1 f @ main.e6cc2c184e2eb1d54b53.js:1 e.ngOnInit @ main.e6cc2c184e2eb1d54b53.js:1 (anonymous) @ main.e6cc2c184e2eb1d54b53.js:1 (anonymous) @ main.e6cc2c184e2eb1d54b53.js:1 $ @ main.e6cc2c184e2eb1d54b53.js:1 mw @ main.e6cc2c184e2eb1d54b53.js:1 (anonymous) @ main.e6cc2c184e2eb1d54b53.js:1 updateDirectives @ main.e6cc2c184e2eb1d54b53.js:1 H @ main.e6cc2c184e2eb1d54b53.js:1 Z @ main.e6cc2c184e2eb1d54b53.js:1 J_ @ main.e6cc2c184e2eb1d54b53.js:1 H_ @ main.e6cc2c184e2eb1d54b53.js:1 Z_ @ main.e6cc2c184e2eb1d54b53.js:1 K_ @ main.e6cc2c184e2eb1d54b53.js:1 H_ @ main.e6cc2c184e2eb1d54b53.js:1 e.detectChanges @ main.e6cc2c184e2eb1d54b53.js:1 e.tick @ main.e6cc2c184e2eb1d54b53.js:1 (anonymous) @ main.e6cc2c184e2eb1d54b53.js:1 e.invoke @ polyfills.0049dfda0d1bcdbcd2bf.js:1 onInvoke @ main.e6cc2c184e2eb1d54b53.js:1 e.invoke @ polyfills.0049dfda0d1bcdbcd2bf.js:1 t.run @ polyfills.0049dfda0d1bcdbcd2bf.js:1 e.run @ main.e6cc2c184e2eb1d54b53.js:1 next @ main.e6cc2c184e2eb1d54b53.js:1 o @ main.e6cc2c184e2eb1d54b53.js:1 t.

tryOrUnsub @ main.e6cc2c184e2eb1d54b53.js:1 t.next @ main.e6cc2c184e2eb1d54b53.js:1 t.next @ main.e6cc2c184e2eb1d54b53.js:1 t.next @ main.e6cc2c184e2eb1d54b53.js:1 t.next @ main.e6cc2c184e2eb1d54b53.js:1 t.emit @ main.e6cc2c184e2eb1d54b53.js:1 ly @ main.e6cc2c184e2eb1d54b53.js:1 sy @ main.e6cc2c184e2eb1d54b53.js:1 onInvokeTask @ main.e6cc2c184e2eb1d54b53.js:1 e.invokeTask @ polyfills.0049dfda0d1bcdbcd2bf.js:1 t.runTask @ polyfills.0049dfda0d1bcdbcd2bf.js:1 t.invokeTask @ polyfills.0049dfda0d1bcdbcd2bf.js:1 b @ polyfills.0049dfda0d1bcdbcd2bf.js:1 _ @ polyfills.0049dfda0d1bcdbcd2bf.js:1 Show 29 more frames main.e6cc2c184e2eb1d54b53.js:1 Failed to create an instance of Ajv, JSON Schema validation is not available. Please use a JSONEditor bundle including Ajv, or pass an instance of Ajv as via the configuration option ajv. f.setSchema @ main.e6cc2c184e2eb1d54b53.js:1 g.create @ main.e6cc2c184e2eb1d54b53.js:1 f.setMode @ main.e6cc2c184e2eb1d54b53.js:1 f.create @ main.e6cc2c184e2eb1d54b53.js:1 f @ main.e6cc2c184e2eb1d54b53.js:1 e.ngOnInit @ main.e6cc2c184e2eb1d54b53.js:1 (anonymous) @ main.e6cc2c184e2eb1d54b53.js:1 (anonymous) @ main.e6cc2c184e2eb1d54b53.js:1 $ @ main.e6cc2c184e2eb1d54b53.js:1 mw @ main.e6cc2c184e2eb1d54b53.js:1 (anonymous) @ main.e6cc2c184e2eb1d54b53.js:1 updateDirectives @ main.e6cc2c184e2eb1d54b53.js:1 H @ main.e6cc2c184e2eb1d54b53.js:1 Z @ main.e6cc2c184e2eb1d54b53.js:1 J @ main.e6cc2c184e2eb1d54b53.js:1 H_ @ main.e6cc2c184e2eb1d54b53.js:1 Z_ @ main.e6cc2c184e2eb1d54b53.js:1 K_ @ main.e6cc2c184e2eb1d54b53.js:1 H_ @ main.e6cc2c184e2eb1d54b53.js:1 e.detectChanges @ main.e6cc2c184e2eb1d54b53.js:1 e.tick @ main.e6cc2c184e2eb1d54b53.js:1 (anonymous) @ main.e6cc2c184e2eb1d54b53.js:1 e.invoke @ polyfills.0049dfda0d1bcdbcd2bf.js:1 onInvoke @ main.e6cc2c184e2eb1d54b53.js:1 e.invoke @ polyfills.0049dfda0d1bcdbcd2bf.js:1 t.run @ polyfills.0049dfda0d1bcdbcd2bf.js:1 e.run @ main.e6cc2c184e2eb1d54b53.js:1 next @ main.e6cc2c184e2eb1d54b53.js:1 o @ main.e6cc2c184e2eb1d54b53.js:1 t.__tryOrUnsub @ main.e6cc2c184e2eb1d54b53.js:1 t.next @ main.e6cc2c184e2eb1d54b53.js:1 t._next @ main.e6cc2c184e2eb1d54b53.js:1 t.next @ main.e6cc2c184e2eb1d54b53.js:1 t.next @ main.e6cc2c184e2eb1d54b53.js:1 t.emit @ main.e6cc2c184e2eb1d54b53.js:1 ly @ main.e6cc2c184e2eb1d54b53.js:1 sy @ main.e6cc2c184e2eb1d54b53.js:1 onInvokeTask @ main.e6cc2c184e2eb1d54b53.js:1 e.invokeTask @ polyfills.0049dfda0d1bcdbcd2bf.js:1 t.runTask @ polyfills.0049dfda0d1bcdbcd2bf.js:1 t.invokeTask @ polyfills.0049dfda0d1bcdbcd2bf.js:1 b @ polyfills.0049dfda0d1bcdbcd2bf.js:1 _ @ polyfills.0049dfda0d1bcdbcd2bf.js:1 Show 13 more frames main.e6cc2c184e2eb1d54b53.js:1 Error compiling schema, function code: var refVal1 = refVal[1];var refVal2 = refVal[2]; var validate = function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; var vErrors = null; var errors = 0; var errs_1 = errors; var errs_2 = errors; if ((typeof data !== "number" || (data % 1) || data !== data)) { var err = { keyword: 'type' , dataPath: (dataPath || '') + "" , schemaPath: '#/definitions/nonNegativeInteger/type' , params: { type: 'integer' } , message: 'should be integer' , schema: refVal[2].type , parentSchema: refVal[2] , data: data } ; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } if (typeof data === "number") { if ( data < 0 || data !== data) { var err = { keyword: 'minimum' , dataPath: (dataPath || '') + "" , schemaPath: '#/definitions/nonNegativeInteger/minimum' , params: { comparison: '>=', limit: 0, exclusive: false } , message: 'should be >= 0' , schema: 0 , parentSchema: refVal[2] , data: data } ; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } var valid2 = errors === errs_2; var valid1 = errors === errs_1; validate.errors = vErrors; return errors === 0; }; return validate;

Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tdegrunt/jsonschema/issues/296?email_source=notifications&email_token=AADK2DI44LGNNY3KOU3WX3DRCV6BDA5CNFSM4KUXE3H2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4INKVMUQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADK2DI7OKUCNON4HJOTQETRCV6BDANCNFSM4KUXE3HQ .

sid786

comment created time in 10 days

issue commentjson-schema-org/json-schema-spec

draft7 schema incorrect in the definition of the "not" property?

"default" isn't very intuitive meaning in JSON Schema, because the schema is not going to be used unless there's a value that exists to use it. It's probably worth pointing this out more explicitly.

This is to say, "default" only applies once a value is created, it doesn't let you create missing properties or array items.

Once I decide to create a "not" property in a schema, that's when I could use the "default" value—in this case, the empty schema, i.e. true.

JSON processing tools may use this information to provide a default value for a missing key/value pair

Yeah this isn't consistent with how the rest of JSON Schema works. A better way to get this behavior would be to provide defaults for the object all at once:

{
  "default": {
    "port": 80
  },
  "properties": {
    "port": { "type":"integer" }
  }
}

This would be closer to the effect you're looking for.

I feel this still might not be quite right, though. Maybe we need a new keyword altogether, which means "if any of the listed properties are missing from the object, it will have the same behavior as the given value".

karenetheridge

comment created time in 10 days

issue closedjson-schema-org/json-schema-spec

Support declaring that all defined properties are required

I would like a way to make all properties defined in a schema to be required without having to explicitly list them.

closed time in 17 days

mfulton26

issue commentjson-schema-org/json-schema-spec

Support declaring that all defined properties are required

This issue is re-summarized and reopened at #846

mfulton26

comment created time in 17 days

issue commentjson-schema-org/json-schema-spec

"requiredProperties" keyword

Keep in mind requiredProperties more of a syntactic sugar than anything else; it makes sense to me that sometimes this sugar will combine applicators and validators.

@gregsdennis I don't think it would make sense to deprecate required; authors may still wish to declare "required" and "properties" separately, for composibility reasons.

awwright

comment created time in 19 days

pull request commentjson-schema-org/json-schema-spec

Don't refer to JSON values as "productions".

I'm looking at the ABNF RFC and its preferred term seems to be "rule" I think "value" is clear enough too, though.

On Tue, Feb 4, 2020, 01:47 Ben Hutton notifications@github.com wrote:

@awwright https://github.com/awwright I can't see how it would fit. Could you give me an example please in case I'm missing something? =]

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/json-schema-org/json-schema-spec/pull/844?email_source=notifications&email_token=AADK2DMQ3FZNEGTARJ2EFKTRBETQZA5CNFSM4KPEG7WKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKWZSZI#issuecomment-581802341, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADK2DLDBOPZEEWMYHNVUSLRBETQZANCNFSM4KPEG7WA .

Relequestual

comment created time in 19 days

issue commentjson-schema-org/json-schema-spec

"requiredProperties" keyword

@gregsdennis Boolean "required" didn't work the same way that other keywords worked; it only had meaning in a subschema in certain keywords, mostly "properties" and "items". It was nonsensical if used inside e.g. "patternProperties", "additionalItems", "additionalProperties", and there's even more considerations like what if you use it inside "oneOf" or "not"?

It also made it more difficult to create composable schemas; referenced a schema that had required: true it could cause a little bit of a problem depending on where the $ref was located.

I actually argued against it at the time because it was a nice authoring convenience compared to the array form; but I think this is superior to boolean "required" by far.

(rewritten from https://github.com/json-schema-org/json-schema-spec/issues/734#issuecomment-487906654 )

awwright

comment created time in 19 days

issue openedjson-schema-org/json-schema-spec

"requiredProperties" keyword

When accepting JSON documents for submission, it is frequently the case the documents are objects that have at least one property that is required, such as an ID or name field.

JSON Schema should have a "requiredProperties" keyword that is similar to "properties" in that it defines a sub-schema to apply to the respective properties; but in addition, each of those properties must exist, similar to the "required" keyword.

This:

{
  "requiredProperties": {
    "name": { "type": "string" }
  }
}

Would be the same as this:

{
  "required": ["name"],
  "properties": {
    "name": { "type": "string" }
  }
}

Alternatively, this functionality could be built into the "required" keyword (so that "required" accepts an array or an object). This may even be preferable, since older validators will (usually) bail if they see an object where an array is expected:

{
  "required": {
    "name": { "type": "string" }
  }
}

This issue is intended to restate and close #659 #681 #734

created time in 19 days

pull request commentjson-schema-org/json-schema-spec

Don't refer to JSON values as "productions".

This is fine by me; but is it possible that "rule" is a better term to use?

Relequestual

comment created time in 19 days

pull request commenttdegrunt/jsonschema

fix type for Schema.required

I'll try to take a look at this tomorrow!

jaredh159

comment created time in 22 days

issue commentjson-schema-org/JSON-Schema-Test-Suite

Draft 3 type test uses an array of 1 element, but standard says a minimum of 2

Also I would point out, this part of the test suite is only making sure the validation result is correct—it's not necessarily saying anything about whether a schema itself is valid or makes sense.

kozross

comment created time in 23 days

GollumEvent

issue commentjson-schema-org/json-schema-vocabularies

Precision and Scale for Decimal Values

I'm still having trouble figuring out what minScale is supposed to do. Why should 1.1 be invalid, but 1.11 be valid? Am I reading that right?

I'd like to see an "in the wild" use case (some sort of testimony that this solves a real-world problem), and implementation that solves that problem.

chapmanjw

comment created time in a month

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha 3e8d47d32a4fde4358911841c33cb703cd73f29d

Add page on resumable uploads

view details

push time in a month

issue commentjson-schema-org/json-schema-spec

How do we close feature requests in favor of 3rd-party vocabulary work?

JSON Schema validation keywords are somewhat maturing, so perhaps we can write up some sort of process for determining if a keyword would be well received by implementors and users.

One requirement could be writing and implementing meta-schema with the proposed keyword.

The risk here is scaring off new users who want to be helpful and contribute. Raising the cost is sort of the point, but more accurately, the point of this should be that there's a clear threshold to cross in order to add a keyword; not to scare off contributors with arcane and arbitrary procedure.

handrews

comment created time in a month

issue commentjson-schema-org/json-schema-spec

why schema keyword value can not be a path ?

Well to answer the original question:

do you have any idea to implement this?

Right now, the answer is "You should implement this in your application, since this is outside the scope of JSON Schema."

Extended reasoning for this is provided at Scope of JSON Schema Validation. Note the bottom "Annotations" section, maybe there can be some way to say "... And there's other requirements applied by the server, not described here". If you have a specific proposal for this, it might be best proposed in a new issue.

DaiKiQi

comment created time in a month

pull request commentripple/ripple-lib

Pin jsonschema to v1.2.2

@FKSRipple If it's an error related to https://github.com/tdegrunt/jsonschema/issues/253 and you can put together a test case, I'd be happy to consider adding it

intelliot

comment created time in a month

issue commentdrush-ops/drush

Drush 10 phar

@weitzman As I mentioned, Drush's install instructions do not solve this problem. Nor does saying "You need Composer".

I would like to reopen at least until the documentation can help someone with the same question.

awwright

comment created time in a month

issue openeddrush-ops/drush

Drush 10 phar

Is your feature request related to a problem? Please describe. I'm trying to perform a Drupal 7->8.8 upgrade with Drush. As noted in the documentation, Drupal 8.4+ requires Drush 10. I was using the Drush 8 phar which is very convenient, but an equivelant does not seem to exist for Drush 10.

Describe the solution you'd like A phar release of Drush 10.

Describe alternatives you've considered The tar.gz download seems to include an executable, but this doesn't seem to do anything, and actually gives a very unhelpful error message:

$ php ./drush-10.1.1/drush.php 

Fatal error: Uncaught Error: Class 'Drush\Config\Environment' not found in ./drush-10.1.1/drush.php:62
Stack trace:
#0 {main}
  thrown in ./drush-10.1.1/drush.php on line 62

PHP version is 7.3.9.

Additional context A phar would also be very useful for distributing drush on package managers. For example:

  • https://packages.debian.org/jessie/drush
  • https://phar.io/
  • https://packages.gentoo.org/packages/app-admin/drush

These are out of date or missing releases because there doesn't seem to be an easy way to install Drush anymore.

created time in 2 months

issue commentjson-schema-org/json-schema-spec

"error code: 1010" - urllib connections have been banned from json-schema.org and now automatic validation scripts break

How many requests do you think you make? It sounds like a lot of CI systems re-request the document every time they boot up, when they should be making the request from a shared cache.

The preferred method is to bundle the documents, and request them from the bundle. For example, we publish https://www.npmjs.com/package/json-metaschema

scottmmjackson

comment created time in 2 months

issue commentjson-schema-org/json-schema-spec

"error code: 1010" - urllib connections have been banned from json-schema.org and now automatic validation scripts break

Also, can you attach the exact HTTP request and response you're seeing here, for reference?

scottmmjackson

comment created time in 2 months

issue commentjson-schema-org/json-schema-spec

"error code: 1010" - urllib connections have been banned from json-schema.org and now automatic validation scripts break

You should distribute the JSON Meta-schema with your library or application, it's not recommended you download schemas over HTTP.

If you do need to download schemas over HTTP—for example, you are programming a generic user agent like a Web browser, be sure you're following the all the guidance listed in "11.3. Usage over HTTP":

  • HTTP clients SHOULD observe caching headers and not re-request documents within their freshness period.
  • Distributed systems SHOULD make use of a shared cache and/or caching proxy.
  • Clients SHOULD set or prepend a User-Agent header specific to the JSON Schema implementation or software product.

What kind of client are you developing?

If HTTP requests are necessary, are you following the guidance?

scottmmjackson

comment created time in 2 months

pull request commenttdegrunt/jsonschema

fix type for Schema.required

I call it "deprecated" in the sense that it's no longer a standard form of JSON Schema. Though I don't have any plans to remove it from this library.

There's a few motivations to change it to a set of property names. It helps make schemas more composable and modular. If you reference a schema with {required: true}, it might have effects you don't want.

JSON Schema has considered a "requiredProperties" keyword (whereas "properties" are all optional). This might be the compromise that's best. See:

  • https://github.com/json-schema-org/json-schema-spec/pull/681
  • https://github.com/json-schema-org/json-schema-spec/issues/659

How would something like that work for you?

jaredh159

comment created time in 2 months

pull request commenttdegrunt/jsonschema

fix type for Schema.required

@jaredh159 The behavior right now is it only shows array of strings, right?

The boolean form is deprecated, is there a good way to indicate that?

jaredh159

comment created time in 2 months

issue commentnodejs/node

No content length on DELETE and OPTIONS

Uh yes, it's been a while since I've run into this, but I'll try to think more about it here

ronag

comment created time in 2 months

issue commentjson-schema-org/json-schema-spec

How to reference JSON schema from JSON data?

Unlike XML, JSON does not define a standard way to do this. This information is usually known out-of-bound, in some fashion.

If your application is validating input, there's no need for the JSON file to declare the schema it's an instance of: Either it's within the bounds that your application understands, or it's not.

If your JSON file is declaring how an application should process it, this is what a media type is for; consider creating a media type underneath the vendor or personal tree.

goldingdamien

comment created time in 2 months

issue commenttdegrunt/jsonschema

Required Reference is not working

This is a change in behavior in some of the recent updates of JSON Schema. It used to be the case that objects with $ref were not considered JSON Schemas, but were actually a feature defined in a different specification. This is no longer the case, and this should get fixed.

douglasramiro

comment created time in 2 months

push eventawwright/dive-httpd

Austin Wright

commit sha dc33885ca4091c9b9659931d4a439d7ab5c82e72

Maybe don't change this quite yet

view details

push time in 2 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha 87445da7acd02164a4c3ecffbbbe8132aca33902

Add page on redirecting HTTP requests

view details

push time in 2 months

created tagawwright/dive-httpd

tagv0.0.23

Experimental HTTP application framework based on URI templates and Stream#pipe

created time in 2 months

GollumEvent
GollumEvent
GollumEvent
GollumEvent
GollumEvent

issue commentjson-schema-org/json-schema-spec

why schema keyword value can not be a path ?

@DaiKiQi I think that would be data consistency validation. In order to test if the data is valid, you have to look up the next value; or you have to hold the previous record in memory. And JSON Schema validation isn't designed to require this.

I wrote https://github.com/json-schema-org/json-schema-spec/wiki/Scope-of-JSON-Schema-Validation hopefully this answers some of your questions. It's a common question, but it hasn't been well explained.

DaiKiQi

comment created time in 2 months

GollumEvent

push eventawwright/dive-httpd

Austin Wright

commit sha c912c638029bf0bb715966b622d39e5d24af5c7b

Fix listing().render() case

view details

push time in 2 months

issue commentjson-schema-org/json-schema-spec

why schema keyword value can not be a path ?

The quick answer is that this is not "structural validation", it is "data consistency validation" - it is comparing one piece of data against another.

For example, verifying that a user ID exists in a database is the same kind of validation as your example: It is comparing one value against some other data.

JSON Schema validation only targets structural validation: a rule that's applied the same way to every value, without using any other data (not including the schema itself, of course).

In part, data consistency is difficult to implement. It would effectively turn JSON Schema into a scripting language. And in my view, this is best left up to actual scripting languages.

Give me a day, I will post a lengthier explanation, with some alternate ways to accomplish what you're looking for.

On Sat, Dec 14, 2019, 07:21 DaiKiQi notifications@github.com wrote:

I have recently used json schema to help validate json data. but i found that its hard to validate cascade relation. for example:

  "ageRange": {

    "minAge": 20,

    "maxAge": 30

  }

I want to limit 18<minAge<maxAge<50. its hard to limit minAge<maxAge. Because keyword minimum's value must be number. why schema keyword value can not be a path?like this:

"maxAge": { "minimum": "$.ageRange.minAge", "exclusiveMaximum": 50 } do you have any idea to implement this?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/json-schema-org/json-schema-spec/issues/826?email_source=notifications&email_token=AADK2DKBFGWNPUUIS554WBTQYTTW3A5CNFSM4J2222QKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IAQALQQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADK2DKAPGWIRYRDLT4MBN3QYTTW3ANCNFSM4J2222QA .

DaiKiQi

comment created time in 2 months

push eventawwright/dive-httpd

Austin Wright

commit sha 6f69de9f1febb5afc506af682f6ad4a94dad3035

Add test for resources returned by Route#listing

view details

Austin Wright

commit sha 9012d824d367d9ae0e39141f3ca4412f3b643c5c

Add stubs for Route#listing renderString

view details

push time in 2 months

created tagawwright/dive-httpd

tagv0.0.22

Experimental HTTP application framework based on URI templates and Stream#pipe

created time in 2 months

issue commentjson-schema-org/json-schema-spec

Precision and Scale for Decimal Values

I'm taking a little bit to read up on Ion, this is the first I've heard of it.

Off-hand and personally, it doesn't seem to me this is a property worth porting or converting between. The vast majority of JSON Schema validators would not be able to validate a property like this. Which is not much of a problem, they would just have to throw an error if it's used in a schema. I imagine usage of such a keyword wouldn't see much adoption if this was the case.

chapmanjw

comment created time in 2 months

issue commentjson-schema-org/json-schema-spec

Precision and Scale for Decimal Values

@chapmanjw Can you elaborate more on why "multipleOf": 0.0001 doesn't satisfy you? What's a reason you'd want to make 1.1 invalid?

chapmanjw

comment created time in 3 months

issue commentjson-schema-org/json-schema-spec

Precision and Scale for Decimal Values

@chapmanjw Is this related to #152? I'm having trouble following you, you listed 1.111 twice in your example. What would be some code I could use to validate this (reading the JSON as a string, if you need to)?

chapmanjw

comment created time in 3 months

issue commentawwright/http-progress

submitted drafts

@dret I posted one of them as an I-D, please see https://datatracker.ietf.org/doc/draft-wright-http-partial-upload/

dret

comment created time in 3 months

push eventawwright/http-progress

Austin Wright

commit sha 30f5cf60982a0ac48c2993da8c3fba32bf17fd76

s/Incomplete Content/Sparse Resource/, s/byteranges/byterange/

view details

push time in 3 months

issue commentawwright/uri-template-router

[Improvement] Store routes as a Map

Thanks @Lcfvs

I'll probably have some more questions later.

And I am AAA_awright on Freenode

Lcfvs

comment created time in 3 months

issue commentawwright/uri-template-router

[Improvement] Store routes as a Map

@Lcfvs Can you give me a code sample of how you'd use it?

Lcfvs

comment created time in 3 months

push eventawwright/dive-httpd

Austin Wright

commit sha 70ef98f86dee35b8cf92e69621f5f723c2f73abf

Don't open file stream until render-time

view details

push time in 3 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha 7857b0ed6f7c3b2773d2319a0ae20714fbf25984

Appease linter

view details

push time in 3 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha c13cbe2bc3cfb3e0c0f62a7110b776218a19a49c

Appease linter

view details

push time in 3 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha 3eb16cba5bfb07e552ff699fad01466cd99cf6b8

Lint fixes

view details

push time in 3 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha b28a8303443c86477def2dd985578ab543979ac6

Add page on query resources in HTTP

view details

push time in 3 months

issue closedawwright/uri-template-router

"Expression Types" documentation missing

The "Expression Types" section of the Readme is the same as the above section (Resume Search). Looks like a copy-paste mishap.

closed time in 3 months

wraugh

issue commentawwright/uri-template-router

"Expression Types" documentation missing

Fixed in 2b6a3e7589e3de7d2cf3e9bd4fd5c9bb5968243b

wraugh

comment created time in 3 months

push eventawwright/uri-template-router

Austin Wright

commit sha 2b6a3e7589e3de7d2cf3e9bd4fd5c9bb5968243b

Rewrite/fix "Expression types" section

view details

push time in 3 months

issue commentawwright/uri-template-router

[Improvement] Store routes as a Map

I don't see why not.

I'm curious, is there a specific advantage you're looking for? Or is it just a better practice?

Lcfvs

comment created time in 3 months

pull request commenttdegrunt/jsonschema

update types: pattern can be RegExp

@jaredh159 Pushed 1.2.5 for you

jaredh159

comment created time in 3 months

created tagtdegrunt/jsonschema

tagv1.2.5

JSON Schema validation

created time in 3 months

push eventtdegrunt/jsonschema

Austin Wright

commit sha 9cb2cf847a33abb76b694c6ed4d8d12ef2037201

Prepare v1.2.5

view details

push time in 3 months

issue commentawwright/uri-template-router

[Improvement] Module type

@Lcfvs Is that well supported by Web browsers and Node.js these days? I'm really not sure what the advantage is over e.g. Browserify

Lcfvs

comment created time in 3 months

issue commentjson-schema-org/json-schema-spec

Named Constants?

As @jdesrosiers points out, the "propertyNames" keyword is probably most suitable for this. That way, the object takes meaning as a generic key-value map. The property keys are more meaningful this way (with e.g. "format", although there's no "phone" format at this time).

Aside: if you're storing phone numbers, you will want to normalize them in an international format. In my understanding, parenthesis in phone numbers is only a US convention; make sure the phone number includes the country code, and has no punctuation. Additionally, you may need to store other information, such as extensions, or written instructions (e.g. a person to ask for).

davaya

comment created time in 3 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha b63c464471764c509ac102922d3b039f35f99ba6

Add POST and 201 Created pages

view details

push time in 3 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha 1d8ac4472d16deb80bfc5c451d7a526c95752bed

Fix Prefer: return page

view details

push time in 3 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha 3f91243538780c1678cf03404cb8bfd935d2262b

PATCH: Fix link targets

view details

push time in 3 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha 0818579bc704dd8310e37a894f46d3260929fe04

Expand PATCH description

view details

push time in 3 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha f689b41112ff12e78e2ef76e4ec4e26f13373a2f

Add PATCH method

view details

push time in 3 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha 736236add70a8a7aaae513cac4c4ff970d0b3502

Fix DELETE description

view details

push time in 3 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha a4af62aa714b0f4a97aa31b7ae1224f598e15919

Add DELETE method

view details

push time in 3 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha fafb022ff9186d4c6c4120cc923bfd97f6b4df33

linter: group errors by document

view details

Austin Wright

commit sha 6d492dae4d0d0d4a59bdba1654f6c4d441c927bd

Several link target fixes

view details

push time in 3 months

created tagawwright/http-progress

tagdraft-wright-http-progress-02

Resumable Requests and Long-Running Operations in HTTP

created time in 3 months

created tagawwright/http-progress

tagdraft-wright-http-partial-upload-00

Resumable Requests and Long-Running Operations in HTTP

created time in 3 months

push eventawwright/http-progress

Austin Wright

commit sha e17d8738f07ee112f2acf21101cc4cbcdf49bbeb

Language and other updates

view details

Austin Wright

commit sha da25c9084cf8ba6a19fbb3f5a073e26fd9383daa

Formatting fixes

view details

push time in 3 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha d8d8733506c25c210fcab05a9cc24bee6aab81ff

Add linting program to test links and things

view details

push time in 3 months

issue commenttdegrunt/jsonschema

v.validate(data,schema) not working...?

Yeah I would say this sort of error should never happen. I'll take a look at this. Are you able to reduce this to a test case?

BradPrit09

comment created time in 3 months

issue commentjson-schema-org/JSON-Schema-Test-Suite

Ensure "additionalItems" and "additonalProperties" stay same-object only

+1 Thanks for filling this!

On Mon, Nov 11, 2019, 13:43 Henry Andrews notifications@github.com wrote:

per @awwright https://github.com/awwright on slack, we should have tests to make sure that additionalItems and additionalProperties are only affected by keywords in the same object (as opposed to the new unevaluatedItems and unevaluatedProperties keywords).

These tests would be valid for earlier drafts as well.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/json-schema-org/JSON-Schema-Test-Suite/issues/294?email_source=notifications&email_token=AADK2DMVBAIQISZL63CNYKLQTG7XVA5CNFSM4JL2R7QKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HYQRACA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADK2DN2CXUQKSW4IOJY753QTG7XVANCNFSM4JL2R7QA .

handrews

comment created time in 3 months

issue commentnodejs/node

makeDuplexPair should be the default stream paradigm

@ronag Fair enough, thanks for the explanation! I'll check that out for sure. Maybe it solves the same things.

@addaleax I'm guessing you have a differing opinion, may I hear?

awwright

comment created time in 4 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha c60d05fc5b8717bdb51bc3b9a603ee52d62e5bda

Add BCP56/RFC3205

view details

push time in 4 months

issue commentnodejs/node

makeDuplexPair should be the default stream paradigm

@ronag Well, I reported that bug, and my impression is it happened because regular streams (with the asymmetric API) are way too complicated for one person to understand how they function. And the same bug is in that "duplexpair" package, too, because it depends on a Node.js-derived stream to work.

Do you have a critique of this proposal per se (by itself), or is the concern simply that the change is unwarranted for now?

And is encapsulation in Node.js simply not a priority? I've noticed a lot of other stuff has been getting ported to symbol properties, for instance.

awwright

comment created time in 4 months

push eventawwright/dive-httpd

Austin Wright

commit sha 4fb80eeb76e7f050f62f5a3171da192848a62f66

Improved effective request URI handling

view details

push time in 4 months

push eventawwright/dive-httpd

Austin Wright

commit sha 78523dfa64185142df0ef6acb20f50043a2d456b

HTTPServer: Test for `app` argument

view details

push time in 4 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha dbaf85b292d2111aa61183e0a3e580239fdb701d

Add 403 (Forbidden)

view details

push time in 4 months

pull request commentjson-schema-org/json-schema-org.github.io

Redirect the standard vocabulary URIs

It's best practice to put something at the target URI, even if it's not machine readable. e.g. https://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul

handrews

comment created time in 4 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha defb2876206e6ea401d87f27efe603ad19c090ab

Add tests for sitemap.xml

view details

Austin Wright

commit sha 3997845f0e66a5209d81bde09de131b4f49376df

Add 401 Unauthorized status code

view details

push time in 4 months

pull request commentjson-schema-org/json-schema-org.github.io

Point "latest" meta-schemas to draft/2019-09

in all seriousness can we just kill the "latest" meta-schemas?

Yeah why not. "latest" has some use for bookmarks and such, but this is probably more relevant to the documentation/specification. If you actually point to "latest" in a schema, you're (figuratively) asking for trouble.

forresst

comment created time in 4 months

push eventawwright/dive-httpd

Austin Wright

commit sha 8e76afc25fe95b1f23da7ffa8eadcdffc582725d

Add Route#prepareMatch, Route#allocateMatch

view details

push time in 4 months

push eventawwright/dive-httpd

Austin Wright

commit sha 13d3566efa30b763050a71718698d3e7c36b3c28

StringResource: test 405 Method Not Allowed

view details

Austin Wright

commit sha 9c2b484b15dd207ec45867dc0f0367dc5f73191b

Add Route#allocate and tests for error page routing

view details

push time in 4 months

push eventawwright/dive-httpd

Austin Wright

commit sha c2354ef0490753ff913fa7f54531516ce0a7d08e

Add tests for conditional GET requests on StringResource

view details

push time in 4 months

push eventawwright/dive-httpd

Austin Wright

commit sha eaaf200658cc8ade73b0ef1cb7e7419e4c4968a5

Cleanup shadowed variable

view details

Austin Wright

commit sha ff66ad5b15ac4daa1e202d55f9a160b6d81ed664

Better conditional request support Adds support for date comparisons, correct ETag support, and maybe more.

view details

push time in 4 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha 14395bce68df25fe7ac5495a2840034551ac476a

Fix sitemap.xml Each entry lacked the path part

view details

Austin Wright

commit sha aecbd5c4a1ec601814182e847086d6975c5181fb

Nit for 412 Precondition Failed

view details

push time in 4 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha 626d40b195bd0e32ae6f63d6b071d2448e3e99b6

Apache HTTPD implementation notes for 414 URI Too Long

view details

push time in 4 months

issue openedhttpwg/http-core

Allow request entity-body related errors after 412 Precondition Failed testing

RFC 7232 HTTP Conditional Requests reads:

A server MUST ignore all received preconditions if its response to the same request without those conditions would have been a status code other than a 2xx (Successful) or 412 (Precondition Failed). In other words, redirects and failures take precedence over the evaluation of preconditions in conditional requests.

This seems to have the effect that 412 cannot happen as part of a 100-continue response, but instead, the entire upload body must be parsed for errors (such as 422 Unprocessable Entity), and only if it is free of errors can the server return 412 (Precondition Failed).

This seems unnecessary and wasteful of bandwidth, and perhaps a result of the fact that server-side validation of documents, including the 422 Unprocessable Entity status code, is a comparatively newer feature of HTTP servers. [1]

If this is the case, consider relaxing this requirement so that 412 (Precondition Failed) is the last error tested before the request body is parsed.

[1] See mailing list thread: https://lists.w3.org/Archives/Public/ietf-http-wg/2019OctDec/0031.html

created time in 4 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha a838a6c84f9b950886fdb7014f8fc26c8e0c62b0

Add HTTP PUT

view details

push time in 4 months

push eventawwright/dive-httpd

Austin Wright

commit sha 9d30f3f2c1a528c44053cdde8f503ffe68f60dab

RouteStaticFile: Allow dependency injection for "fs"

view details

push time in 4 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha 2739cb2ac003f1dde89b93cc5966cb47ba73446f

Add test verifying link targets

view details

Austin Wright

commit sha 15cdea88905b3652a7dac6fbe4924e1c3e50b2b4

Describe intermediary handling for TRACE, OPTIONS

view details

push time in 4 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha dc8aeb3f97d19a1f84a27d8f1094f3e30ac0b24d

Add test for Edit/History links on headers index page

view details

Austin Wright

commit sha 18c79fad280b8ea427b863bee18872617ff9732c

Fix some TRACE typos

view details

push time in 4 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha de4b9a907e27feb450a5e5cace919e775be1b83d

Add HTTP TRACE method

view details

push time in 4 months

push eventawwright/dive-httpd

Austin Wright

commit sha 70cd0b481d7b4e68759ce93035b3429b2391c6ca

Add TRACE support

view details

push time in 4 months

push eventfullstackwiki/fullstackwiki

Austin Wright

commit sha 1aab034bc508912d7b6bb00004ef09a1583c332c

Add pages on conditional request headers

view details

push time in 4 months

created tagawwright/dive-httpd

tagv0.0.21

Experimental HTTP application framework based on URI templates and Stream#pipe

created time in 4 months

more