@travetto/schema 6.0.0-rc.2 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +3 -0
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -25,6 +25,7 @@ The module utilizes AST transformations to collect schema information, and facil
25
25
  * `title` - definition of the schema
26
26
  * `description` - detailed description of the schema
27
27
  * `examples` - A set of examples as [JSON](https://www.json.org) or [YAML](https://en.wikipedia.org/wiki/YAML)
28
+
28
29
  The `title` will be picked up from the [JSDoc](http://usejsdoc.org/about-getting-started.html) comments, and additionally all fields can be set using the [@Describe](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/common.ts#L15) decorator.
29
30
 
30
31
  **Code: Sample User Schema**
@@ -85,11 +86,13 @@ This schema provides a powerful base for data binding and validation at runtime.
85
86
  * [@Secret](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/field.ts#L56) marks a field as being sensitive. This is used by certain logging activities to ensure sensitive information is not logged out.
86
87
  * [@Specifier](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/field.ts#L198) attributes additional specifiers to a field, allowing for more specification beyond just the field's type.
87
88
  * [@SubTypeField](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/field.ts#L204) allows for promoting a given field as the owner of the sub type discriminator (defaults to `type`).
89
+
88
90
  Additionally, schemas can be nested to form more complex data structures that are able to bound and validated.
89
91
 
90
92
  Just like the class, all fields can be defined with
91
93
  * `description` - detailed description of the schema
92
94
  * `examples` - A set of examples as [JSON](https://www.json.org) or [YAML](https://en.wikipedia.org/wiki/YAML)
95
+
93
96
  And similarly, the `description` will be picked up from the [JSDoc](http://usejsdoc.org/about-getting-started.html) comments, and additionally all fields can be set using the [@Describe](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/common.ts#L15) decorator.
94
97
 
95
98
  ### Parameters
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/schema",
3
- "version": "6.0.0-rc.2",
3
+ "version": "6.0.0",
4
4
  "description": "Data type registry for runtime validation, reflection and binding.",
5
5
  "keywords": [
6
6
  "schema",
@@ -27,10 +27,10 @@
27
27
  "directory": "module/schema"
28
28
  },
29
29
  "dependencies": {
30
- "@travetto/registry": "^6.0.0-rc.2"
30
+ "@travetto/registry": "^6.0.0"
31
31
  },
32
32
  "peerDependencies": {
33
- "@travetto/transformer": "^6.0.0-rc.3"
33
+ "@travetto/transformer": "^6.0.0"
34
34
  },
35
35
  "peerDependenciesMeta": {
36
36
  "@travetto/transformer": {