@@ -225,6 +225,12 @@ it can be handy to arbitrary modify the schema injecting a fragment</p>
225225<dt ><a href =" #ObjectSchema " >ObjectSchema([options])</a > ⇒ <code ><a href =" #StringSchema " >StringSchema</a ></code ></dt >
226226<dd ><p >Represents a ObjectSchema.</p >
227227</dd >
228+ <dt ><a href =" #id " >id(id)</a ></dt >
229+ <dd ><p >It defines a URI for the schema, and the base URI that other URI references within the schema are resolved against.
230+ Calling <code >id</code > on an ObjectSchema will alway set the id on the root of the object rather than in its " ; properties" ; , which
231+ differs from other schema types.</p >
232+ <p ><a href =" https://tools.ietf.org/html/draft-handrews-json-schema-01#section-8.2 " >reference</a ></p >
233+ </dd >
228234<dt ><a href =" #additionalProperties " >additionalProperties(value)</a > ⇒ <code >FluentSchema</code ></dt >
229235<dd ><p >This keyword determines how child instances validate for objects, and does not directly validate the immediate instance itself.
230236Validation with " ; additionalProperties" ; applies only to the child values of instance names that do not match any names in " ; properties" ; ,
@@ -276,10 +282,12 @@ Note the property name that the schema is testing will always be a string.</p>
276282<p ><a href =" https://tools.ietf.org/id/draft-handrews-json-schema-validation-01.html#rfc.section.6.5.4 " >reference</a ></p >
277283</dd >
278284<dt ><a href =" #only " >only(properties)</a > ⇒ <code ><a href =" #ObjectSchema " >ObjectSchema</a ></code ></dt >
279- <dd ><p >Returns an object schema with only a subset of keys provided</p >
285+ <dd ><p >Returns an object schema with only a subset of keys provided. If called on an ObjectSchema with an
286+ <code >$id</code >, it will be removed and the return value will be considered a new schema.</p >
280287</dd >
281288<dt ><a href =" #without " >without(properties)</a > ⇒ <code ><a href =" #ObjectSchema " >ObjectSchema</a ></code ></dt >
282- <dd ><p >Returns an object schema without a subset of keys provided</p >
289+ <dd ><p >Returns an object schema without a subset of keys provided. If called on an ObjectSchema with an
290+ <code >$id</code >, it will be removed and the return value will be considered a new schema.</p >
283291</dd >
284292<dt ><a href =" #definition " >definition(name, props)</a > ⇒ <code >FluentSchema</code ></dt >
285293<dd ><p >The " ; definitions" ; keywords provides a standardized location for schema authors to inline re-usable JSON Schemas into a more general schema.
@@ -951,6 +959,21 @@ Represents a ObjectSchema.
951959| [ options.schema] | [ <code >StringSchema</code >] ( #StringSchema ) | | Default schema |
952960| [ options.generateIds] | [ <code >boolean</code >] ( #boolean ) | <code >false</code > | generate the id automatically e.g. #properties.foo |
953961
962+ <a name =" id " ></a >
963+
964+ ## id(id)
965+ It defines a URI for the schema, and the base URI that other URI references within the schema are resolved against.
966+ Calling ` id ` on an ObjectSchema will alway set the id on the root of the object rather than in its "properties", which
967+ differs from other schema types.
968+
969+ [ reference] ( https://tools.ietf.org/html/draft-handrews-json-schema-01#section-8.2 )
970+
971+ ** Kind** : global function
972+
973+ | Param | Type | Description |
974+ | --- | --- | --- |
975+ | id | [ <code >string</code >] ( #string ) | an #id |
976+
954977<a name =" additionalProperties " ></a >
955978
956979## additionalProperties(value) ⇒ <code >FluentSchema</code >
@@ -1086,7 +1109,8 @@ The value of "properties" MUST be an object. Each value of this object MUST be a
10861109<a name =" only " ></a >
10871110
10881111## only(properties) ⇒ [ <code >ObjectSchema</code >] ( #ObjectSchema )
1089- Returns an object schema with only a subset of keys provided
1112+ Returns an object schema with only a subset of keys provided. If called on an ObjectSchema with an
1113+ ` $id ` , it will be removed and the return value will be considered a new schema.
10901114
10911115** Kind** : global function
10921116
@@ -1097,7 +1121,8 @@ Returns an object schema with only a subset of keys provided
10971121<a name =" without " ></a >
10981122
10991123## without(properties) ⇒ [ <code >ObjectSchema</code >] ( #ObjectSchema )
1100- Returns an object schema without a subset of keys provided
1124+ Returns an object schema without a subset of keys provided. If called on an ObjectSchema with an
1125+ ` $id ` , it will be removed and the return value will be considered a new schema.
11011126
11021127** Kind** : global function
11031128
0 commit comments