@pbvision/fastify-firestore-service 0.0.3 → 0.0.4

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.
package/docs/api.md CHANGED
@@ -93,7 +93,7 @@ Notice that inputs can be configured to use a default value if none is provided
93
93
  (see `num2`). Inputs can also be configured to just have their value be
94
94
  undefined if omitted with the `optional()` marker (see `more`).
95
95
 
96
- The `BODY`, `PATH_PARAMS`, `HEADERS`, and `QS` properties all support a mapping of field names to Todea Schema objects. For advanced usages like specifying a default value or description, the mapping can be replaced with an Object schema `S.obj({})`. For example:
96
+ The `BODY`, `PATH_PARAMS`, `HEADERS`, and `QS` properties all support a mapping of field names to Schema objects. For advanced usages like specifying a default value or description, the mapping can be replaced with an Object schema `S.obj({})`. For example:
97
97
  ```javascript
98
98
  static BODY = S.obj({ a: S.str })
99
99
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pbvision/fastify-firestore-service",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Web Framework using Fastify and Firestore ORM",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
package/src/api/api.js CHANGED
@@ -158,25 +158,25 @@ class API {
158
158
  static TAG = undefined
159
159
 
160
160
  /**
161
- * The Todea schema describing the HTTP headers this API handles, if any.
161
+ * The Schema describing the HTTP headers this API handles, if any.
162
162
  * @public
163
163
  */
164
164
  static HEADERS = undefined
165
165
 
166
166
  /**
167
- * The Todea schema describing the path params this API handles, if any.
167
+ * The Schema describing the path params this API handles, if any.
168
168
  * @public
169
169
  */
170
170
  static PATH_PARAMS = undefined
171
171
 
172
172
  /**
173
- * The Todea schema describing the query string this API handles, if any.
173
+ * The Schema describing the query string this API handles, if any.
174
174
  * @public
175
175
  */
176
176
  static QS = undefined
177
177
 
178
178
  /**
179
- * The Todea schema describing the request body this API handles. Note that
179
+ * The Schema describing the request body this API handles. Note that
180
180
  * GET requests should not have request bodies. Use HTTP POST requests if
181
181
  * request data size is too big to fit in the query string.
182
182
  * @public
@@ -520,7 +520,7 @@ class API {
520
520
  /**
521
521
  * Removes the required marker from any top-level properties which have a
522
522
  * default value.
523
- * @param {TodeaSchema} schema a Todea schema
523
+ * @param {Schema} schema a Schema object
524
524
  * @private
525
525
  */
526
526
  static __makeParamsWithDefaultValuesOptional (schema) {
@@ -548,7 +548,7 @@ class API {
548
548
  static _getHeaders () {
549
549
  let headers = this.HEADERS
550
550
  if (headers) {
551
- headers = headers.isTodeaSchema
551
+ headers = headers.isSchema
552
552
  ? headers
553
553
  : S.obj(headers)
554
554
  }
@@ -603,7 +603,7 @@ class API {
603
603
  }
604
604
 
605
605
  /**
606
- * Return a mapping from status code to Todea schemas.
606
+ * Return a mapping from status code to Schemas.
607
607
  * @private
608
608
  */
609
609
  static _getResponseSchemas () {
@@ -680,7 +680,7 @@ class API {
680
680
  /** @private */
681
681
  static get swaggerSchema () {
682
682
  const wrapInSchema = (x) => {
683
- return x.isTodeaSchema ? x : S.obj(x)
683
+ return x.isSchema ? x : S.obj(x)
684
684
  }
685
685
 
686
686
  // istanbul ignore next
@@ -39,11 +39,11 @@ class __RequestDone extends Error {
39
39
  }
40
40
 
41
41
  /**
42
- * Gets a Todea Schema object.
42
+ * Gets a Schema object.
43
43
  */
44
44
  static get schema () {
45
45
  let schema = this.SCHEMA
46
- if (!schema.isTodeaSchema) {
46
+ if (!schema.isSchema) {
47
47
  schema = S.obj(schema)
48
48
  }
49
49
  return schema