diff --git a/README.md b/README.md index 3ac6d5d..249fac5 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Let's explore an example of our schema for a typical JSON API response containin } } ``` -In the above example, two types of constraints are used: constraint functions (also referred to as validation functions, such as `@range(1, 10000)`) and constraint data types (also referred to as validation data types, such as `#integer`). All constraint functions begin with the `@` symbol, while all constraint data types start with `#`. C-style comments are also supported within the schema. In this example, `address` can be `null` (like an optional input for users) and if it is `null` then no constraints of `address` are applicable. The following JSON is one of the examples that will be successfully validated against the above schema. To start your journey with the JSON validation library, please consult the documentation available [here](https://relogiclabs.github.io/JsonSchema-Java/articles/intro). +In the above example, two types of constraints are used: constraint functions (also referred to as validation functions, such as `@range(1, 10000)`) and constraint data types (also referred to as validation data types, such as `#integer`). All constraint functions begin with the `@` symbol, while all constraint data types start with `#`. C-style comments are also supported within the schema. In this example, `address` can be `null` (like an optional input for users) and if it is `null` then no constraints of `address` are applicable. The following JSON is one of the examples that will be successfully validated against the above schema. To start your journey with the JSON validation library, please consult the documentation available [here](https://relogiclabs.github.io/JSchema-Java/articles/intro). ```json { "user": { @@ -63,7 +63,7 @@ In the above example, two types of constraints are used: constraint functions (a } ``` ## Extended Example -The next example represents an expanded version of the previous one, which brings more complexity. To effectively construct such schemas with multiple layers of nested structures, it's beneficial to have a fundamental understanding of this schema format. While the syntax may seem difficult at first, it becomes straightforward once you have a basic understanding of it. For more detailed information, reference documentation is available [here](https://relogiclabs.github.io/JsonSchema-Java/articles/intro). +The next example represents an expanded version of the previous one, which brings more complexity. To effectively construct such schemas with multiple layers of nested structures, it's beneficial to have a fundamental understanding of this schema format. While the syntax may seem difficult at first, it becomes straightforward once you have a basic understanding of it. For more detailed information, reference documentation is available [here](https://relogiclabs.github.io/JSchema-Java/articles/intro). ```cpp %title: "Extended User Profile Dashboard API Response" %version: 2.0.0 @@ -224,4 +224,4 @@ The subsequent JSON sample is an illustrative example that successfully validate } } ``` -For more information about the schema syntax format and library functionalities, please refer to the reference documentation [here](https://relogiclabs.github.io/JsonSchema-Java/api/index.html). \ No newline at end of file +For more information about the schema syntax format and library functionalities, please refer to the reference documentation [here](https://relogiclabs.github.io/JSchema-Java/api/index.html). \ No newline at end of file diff --git a/doc/content/_index.md b/doc/content/_index.md index ffbaec3..1dd48c8 100644 --- a/doc/content/_index.md +++ b/doc/content/_index.md @@ -7,5 +7,5 @@ date = 2023-10-08T09:38:53+06:00 The New JSON Schema prioritizes simplicity, conciseness, and readability, making it user-friendly and accessible without the need for extensive prior knowledge. It offers efficient read-write facilities, precise JSON document definition through various data types and functions, and extensibility to meet modern web service diverse requirements. For a comprehensive overview of this JSON Schema, we invite you to explore our dedicated post available [here](https://www.relogiclabs.com/p/json-schema.html). diff --git a/doc/content/articles/datatypes.md b/doc/content/articles/datatypes.md index 2c5223a..0b34b71 100644 --- a/doc/content/articles/datatypes.md +++ b/doc/content/articles/datatypes.md @@ -80,13 +80,13 @@ The date-time data type serves as the parent data type for both date and time ty ``` ### The Date Data Type -The date data type accepts a string representation of a date, conforming to the ISO 8601 standard (date part only). This is the default configuration, which can be modified using the directive described [here](/JsonSchema-Java/articles/directives). It is a subtype of date-time type and thus also formatted as per the JSON string specification. Detailed explanations of the ISO 8601 standard can be found in this [document](https://www.iso.org/iso-8601-date-and-time-format.html). Furthermore, you can refer to this [document](/JsonSchema-Java/articles/datetime) for a detailed description of the date pattern associated with this data type. To define this data type in schema, use the following syntax: +The date data type accepts a string representation of a date, conforming to the ISO 8601 standard (date part only). This is the default configuration, which can be modified using the directive described [here](/JSchema-Java/articles/directives). It is a subtype of date-time type and thus also formatted as per the JSON string specification. Detailed explanations of the ISO 8601 standard can be found in this [document](https://www.iso.org/iso-8601-date-and-time-format.html). Furthermore, you can refer to this [document](/JSchema-Java/articles/datetime) for a detailed description of the date pattern associated with this data type. To define this data type in schema, use the following syntax: ```html #date ``` ### The Time Data Type -The time data type accepts a string representation of a time (including both date and time parts), in accordance with the ISO 8601 standard. This default configuration can be modified using the directive described [here](/JsonSchema-Java/articles/directives). Similar to the date data type, it is a subtype of date-time data type and thus also formatted as per the JSON string specification. Here is the ISO 8601 standard [document](https://www.iso.org/iso-8601-date-and-time-format.html), which contains detailed explanations. Furthermore, you can refer to this [document](/JsonSchema-Java/articles/datetime) for a detailed description of the date-time pattern associated with this data type. To define this data type in schema, use the following syntax: +The time data type accepts a string representation of a time (including both date and time parts), in accordance with the ISO 8601 standard. This default configuration can be modified using the directive described [here](/JSchema-Java/articles/directives). Similar to the date data type, it is a subtype of date-time data type and thus also formatted as per the JSON string specification. Here is the ISO 8601 standard [document](https://www.iso.org/iso-8601-date-and-time-format.html), which contains detailed explanations. Furthermore, you can refer to this [document](/JSchema-Java/articles/datetime) for a detailed description of the date-time pattern associated with this data type. To define this data type in schema, use the following syntax: ```html #time ``` diff --git a/doc/content/articles/directives.md b/doc/content/articles/directives.md index f3cae56..38ab0c3 100644 --- a/doc/content/articles/directives.md +++ b/doc/content/articles/directives.md @@ -43,13 +43,13 @@ The default value of this directive is `false`, which means that by default, und ``` ### Date Data Type Format -The `DateDataTypeFormat` pragma directive enables you to customize the default format of the `#date` data type. By default, the `#date` data type follows the ISO 8601 standard, precisely using the format `YYYY-MM-DD`. Additional details on date-time patterns and formats are available [here](/JsonSchema-Java/articles/datetime). The subsequent example illustrates the process of defining a customized date format for the `#date` data type: +The `DateDataTypeFormat` pragma directive enables you to customize the default format of the `#date` data type. By default, the `#date` data type follows the ISO 8601 standard, precisely using the format `YYYY-MM-DD`. Additional details on date-time patterns and formats are available [here](/JSchema-Java/articles/datetime). The subsequent example illustrates the process of defining a customized date format for the `#date` data type: ```js %pragma DateDataTypeFormat: "DD-MM-YYYY" ``` ### Time Data Type Format -To customize the default format of the `#time` data type, utilize the `TimeDataTypeFormat` pragma directive. By default, the `#time` data type follows the ISO 8601 standard, precisely in the format `YYYY-MM-DD'T'hh:mm:ss.FZZ`. Further information on date-time patterns and formats can be found [here](/JsonSchema-Java/articles/datetime). The following example demonstrates how to specify a customized time format for the `#time` data type: +To customize the default format of the `#time` data type, utilize the `TimeDataTypeFormat` pragma directive. By default, the `#time` data type follows the ISO 8601 standard, precisely in the format `YYYY-MM-DD'T'hh:mm:ss.FZZ`. Further information on date-time patterns and formats can be found [here](/JSchema-Java/articles/datetime). The following example demonstrates how to specify a customized time format for the `#time` data type: ```js %pragma TimeDataTypeFormat: "DD-MM-YYYY hh:mm:ss" ``` @@ -69,7 +69,7 @@ The `IgnoreObjectPropertyOrder` pragma directive provides a means to enforce a s ## Definition / Define Directive This feature in JSON schemas allows you to define a name for a component or fragment of schema or validation rules, which can be referenced from various parts of your schema. This means that if you encounter similar validation requirements in different sections of your schema, you can conveniently refer to the named component instead of duplicating the same validation rules. -By providing clear and descriptive names for these validation rules or sub-schemas, you can enhance the overall clarity and context of your schema. This clarity not only makes it easier to understand the structure and intent of the schema but also contributes to keeping your complex schema well-organized, concise, and more manageable. For more information about the schema component syntax and format, please refer to the documentation [here](/JsonSchema-Java/articles/components). +By providing clear and descriptive names for these validation rules or sub-schemas, you can enhance the overall clarity and context of your schema. This clarity not only makes it easier to understand the structure and intent of the schema but also contributes to keeping your complex schema well-organized, concise, and more manageable. For more information about the schema component syntax and format, please refer to the documentation [here](/JSchema-Java/articles/components). The name or alias of the directive is always start with `$` which also refers to that they are named fragment defined elsewhere in the schema. Here is a simple example of how to use this directive: ```js diff --git a/doc/content/articles/functions.md b/doc/content/articles/functions.md index bd3b5d3..b63cc39 100644 --- a/doc/content/articles/functions.md +++ b/doc/content/articles/functions.md @@ -179,12 +179,12 @@ Validates whether the `target` string is a valid phone number. It follows the IT ```stylus #string target - @date(pattern) ``` -Validates that the `target` string matches the date and time pattern specified by the `pattern` parameter. It fully supports the ISO 8601 date and time format. Beyond this standard, it also allows custom date and time formats, ensuring compatibility with various systems and meeting diverse users and businesses requirements. This [document](/JsonSchema-Java/articles/datetime) provides a comprehensive overview of the date-time custom patterns. +Validates that the `target` string matches the date and time pattern specified by the `pattern` parameter. It fully supports the ISO 8601 date and time format. Beyond this standard, it also allows custom date and time formats, ensuring compatibility with various systems and meeting diverse users and businesses requirements. This [document](/JSchema-Java/articles/datetime) provides a comprehensive overview of the date-time custom patterns. ``` #string target - @time(pattern) ``` -Both the `@date` and `@time` functions support a complete range of date-time patterns, enabling the precise definition of any date and time scenario. Therefore, these functions can be used interchangeably. When the sole consideration is the date or day of the month in a year, employing the `@date` function is the more convenient choice. In contrast, when it becomes necessary to specify a particular time on a date, the `@time` function is the more appropriate option. To learn more about date-time patterns, please refer to [this page](/JsonSchema-Java/articles/datetime). +Both the `@date` and `@time` functions support a complete range of date-time patterns, enabling the precise definition of any date and time scenario. Therefore, these functions can be used interchangeably. When the sole consideration is the date or day of the month in a year, employing the `@date` function is the more convenient choice. In contrast, when it becomes necessary to specify a particular time on a date, the `@time` function is the more appropriate option. To learn more about date-time patterns, please refer to [this page](/JSchema-Java/articles/datetime). ### Date and Time Range ```stylus diff --git a/doc/content/articles/intro.md b/doc/content/articles/intro.md index 4738f7e..a8cbea7 100644 --- a/doc/content/articles/intro.md +++ b/doc/content/articles/intro.md @@ -8,15 +8,15 @@ weight = 1 JSON, short for JavaScript Object Notation, is one of the most widely used data exchange formats that are both user-friendly and machine-readable. New JSON Schema is a practical tool for defining and validating the structure of JSON documents. It allows you to specify the expected format, data types, and constraints of JSON data. The following guides offer comprehensive details about the New JSON Schema. This document provides a list of links, each corresponding to a specific detail document available in this project.
- * [Getting Started & Installation](/JsonSchema-Java/articles/quickstart) - * [Validation Syntax & Format](/JsonSchema-Java/articles/validation) - * [Validation Directives & Pragmas](/JsonSchema-Java/articles/directives) - * [Schema Specification & Grammar](/JsonSchema-Java/articles/specification) - * [Data Types & Validation](/JsonSchema-Java/articles/datatypes) - * [Functions & Validation](/JsonSchema-Java/articles/functions) - * [Date & Time Patterns](/JsonSchema-Java/articles/datetime) - * [Reusable Components of Validation](/JsonSchema-Java/articles/components) - * [Build from Source Code](/JsonSchema-Java/articles/sourcebuild) - * [API Reference Documentation](/JsonSchema-Java/api/index.html) + * [Getting Started & Installation](/JSchema-Java/articles/quickstart) + * [Validation Syntax & Format](/JSchema-Java/articles/validation) + * [Validation Directives & Pragmas](/JSchema-Java/articles/directives) + * [Schema Specification & Grammar](/JSchema-Java/articles/specification) + * [Data Types & Validation](/JSchema-Java/articles/datatypes) + * [Functions & Validation](/JSchema-Java/articles/functions) + * [Date & Time Patterns](/JSchema-Java/articles/datetime) + * [Reusable Components of Validation](/JSchema-Java/articles/components) + * [Build from Source Code](/JSchema-Java/articles/sourcebuild) + * [API Reference Documentation](/JSchema-Java/api/index.html)
\ No newline at end of file diff --git a/doc/content/articles/quickstart.md b/doc/content/articles/quickstart.md index 1a37afd..d117abb 100644 --- a/doc/content/articles/quickstart.md +++ b/doc/content/articles/quickstart.md @@ -162,4 +162,4 @@ Actual (Json Line: 3:14): found #string inferred by "not number" at org.example.SampleSchema.checkIsValid(SampleSchema.java:64) at org.example.Main.main(Main.java:5) ``` -For more information about the schema syntax format and library functionalities, please refer to the reference documentation [here](/JsonSchema-Java/api/index.html). \ No newline at end of file +For more information about the schema syntax format and library functionalities, please refer to the reference documentation [here](/JSchema-Java/api/index.html). \ No newline at end of file diff --git a/doc/content/articles/sourcebuild.md b/doc/content/articles/sourcebuild.md index c4c4d9f..9ac3472 100644 --- a/doc/content/articles/sourcebuild.md +++ b/doc/content/articles/sourcebuild.md @@ -10,9 +10,9 @@ This comprehensive guide illustrates the procedures for retrieving source code f ## Build the Library To get started, clone the project from the following URL using your preferred Git client (command line or GUI). You can open a terminal and enter the following Git clone command as shown below: ```shell -git clone https://github.com/relogiclabs/JsonSchema-Java.git +git clone https://github.com/relogiclabs/JSchema-Java.git ``` -Next, navigate to the project root directory of the `JsonSchema-Java` that you just cloned. Inside the directory, you should find a `pom.xml` file. This file contains the project configuration and dependencies required to build the library. Use the `cd` command to enter the project root directory and execute the following Maven command to build the Json Schema library: +Next, navigate to the project root directory of the `JSchema-Java` that you just cloned. Inside the directory, you should find a `pom.xml` file. This file contains the project configuration and dependencies required to build the library. Use the `cd` command to enter the project root directory and execute the following Maven command to build the Json Schema library: ```shell mvn clean install @@ -173,4 +173,4 @@ Actual (Json Line: 3:14): found #string inferred by "not number" at org.example.SampleSchema.checkIsValid(SampleSchema.java:64) at org.example.Main.main(Main.java:5) ``` -For more information about the schema syntax format and library functionalities, please refer to the reference documentation [here](/JsonSchema-Java/api/index.html). \ No newline at end of file +For more information about the schema syntax format and library functionalities, please refer to the reference documentation [here](/JSchema-Java/api/index.html). \ No newline at end of file diff --git a/doc/hugo.toml b/doc/hugo.toml index cfdbc0d..c181665 100644 --- a/doc/hugo.toml +++ b/doc/hugo.toml @@ -1,4 +1,4 @@ -baseURL = "https://relogiclabs.github.io/JsonSchema-Java" +baseURL = "https://relogiclabs.github.io/JSchema-Java" languageCode = "en-us" title = "New Json Schema" diff --git a/doc/layouts/partials/head.html b/doc/layouts/partials/head.html index 64a734a..c945248 100644 --- a/doc/layouts/partials/head.html +++ b/doc/layouts/partials/head.html @@ -1,5 +1,5 @@ - - - + + + - \ No newline at end of file + \ No newline at end of file diff --git a/doc/layouts/partials/header.html b/doc/layouts/partials/header.html index e8fbf6a..bca82ba 100644 --- a/doc/layouts/partials/header.html +++ b/doc/layouts/partials/header.html @@ -9,12 +9,12 @@ - Relogic Labs + Relogic Labs
- Home - API Reference - GitHub + Home + API Reference + GitHub
\ No newline at end of file diff --git a/doc/public/articles/components/index.html b/doc/public/articles/components/index.html index 0488fb1..28cec96 100644 --- a/doc/public/articles/components/index.html +++ b/doc/public/articles/components/index.html @@ -1,9 +1,9 @@ - - - + + + -
+
@@ -28,47 +28,47 @@