From 9a05b103ef6f225296a71105799fd8dbd4186a2e Mon Sep 17 00:00:00 2001 From: Seva Safris Date: Tue, 30 May 2023 21:26:56 +0700 Subject: [PATCH] Restrict object.extends to only refer to object.name(s), re #8 --- README.md | 21 ++++++++++++------- schema-0.4/schema-0.4.xsd | 44 ++++++++++++++++++--------------------- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 7b03252..0406bb6 100644 --- a/README.md +++ b/README.md @@ -90,11 +90,11 @@ Any application that consumes well-formed JSON can use the JSON Schema Defi ### 1.1 Dependencies on Other Specifications -The definition of the JSON Schema Definition Language depends on the following specifications: [RFC4627][rfc4627] and [XMLSchema][xmlschema]. +The definition of the JSON Schema Definition Language depends on the following specifications: [RFC4627][rfc4627], [RFC7159][rfc7159], and [XMLSchema][xmlschema]. ### 1.2 Conventions Used in This Document -The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119.txt). +The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119][rfc2119]. ## 2 Purpose @@ -106,7 +106,7 @@ Provide a schema language to describe normative contracts between pro 1. The schema language MUST provide meaningful and useful constraint rules for the 5 JSON value types: `boolean`, `number`, `string`, `object`, and `array`. -1. The schema language MUST support schema descriptions for any and all legal JSON documents, as specified by [RFC2119](https://www.ietf.org/rfc/rfc2119.txt). +1. The schema language MUST support schema descriptions for any and all legal JSON documents, as specified by [RFC2119][rfc2119]. 1. The schema language MUST be free-of and agnostic-to patterns specific to any particular programming language. @@ -1697,13 +1697,13 @@ This section provides sample schemas in both `jsdx` and `jsd` representations. - + - + - + @@ -2164,7 +2164,8 @@ This section provides sample schemas in both `jsdx` and `jsd` representations. "doc": "Template for integer number type with range", "bindings": [{ "lang": "java", - "decode": "org.libj.math.BigIntegers.of" + "type": "java.math.BigInteger", + "decode": "org.libj.math.BigIntegers.intern" }] }, "plainDecimal": { @@ -2173,6 +2174,7 @@ This section provides sample schemas in both `jsdx` and `jsd` representations. "doc": "Template cached BigDecimal", "bindings": [{ "lang": "java", + "type": "java.math.BigDecimal", "encode": "this.toPlainString" }] }, @@ -2183,7 +2185,8 @@ This section provides sample schemas in both `jsdx` and `jsd` representations. "doc": "First template for real number type with range", "bindings": [{ "lang": "java", - "decode": "org.libj.math.BigDecimals.of", + "type": "java.math.BigInteger", + "decode": "org.libj.math.BigDecimals.intern", "encode": "this.toPlainString" }] }, @@ -3250,5 +3253,7 @@ This project is licensed under the MIT License - see the [LICENSE.txt](LICENSE.t [ecma262]: http://www.ecma-international.org/publications/standards/Ecma-262.htm [interval-notation]: https://en.wikipedia.org/wiki/Interval_(mathematics)#Classification_of_intervals [oxygenxml]: https://www.oxygenxml.com/xml_editor/download_oxygenxml_editor.html +[rfc2119]: https://www.ietf.org/rfc/rfc2119.txt [rfc4627]: https://www.ietf.org/rfc/rfc4627.txt +[rfc7159]: https://www.ietf.org/rfc/rfc7159.txt [xmlschema]: http://www.w3.org/2001/XMLSchema \ No newline at end of file diff --git a/schema-0.4/schema-0.4.xsd b/schema-0.4/schema-0.4.xsd index 388e6a8..49f76e4 100644 --- a/schema-0.4/schema-0.4.xsd +++ b/schema-0.4/schema-0.4.xsd @@ -69,7 +69,7 @@ - + Identifier pattern that must start with either a capital letter, or must include a '$' followed by a capital letter. @@ -89,18 +89,10 @@ - - - - Specifies a list of type names. Optional. - - - - - + Specifies the name of the referenced type. Required. @@ -200,7 +192,14 @@ - + + + + Specifies a list of type names. Optional. + + + + @@ -214,8 +213,6 @@ - - @@ -249,13 +246,6 @@ - - - - - - - @@ -274,7 +264,7 @@ - + The number of digits to the right of the decimal point. If a value is not specified, the scale is unbounded. @@ -359,8 +349,6 @@ - - @@ -511,7 +499,7 @@ - + Specifies the name of the type to extend. Optional. @@ -647,6 +635,14 @@ + + + + + + + + \ No newline at end of file