@aomex/validator
Advanced tools
Comparing version 0.0.11 to 0.0.12
# @aomex/validator | ||
## 0.0.12 | ||
### Patch Changes | ||
- [`0b98122`](https://github.com/aomex/aomex/commit/0b9812229a950b7d2a8d1ed337a276a3bae62c15) Thanks [@geekact](https://github.com/geekact)! - feat(validator): set some fields in both parameterObject and schemaObject | ||
## 0.0.11 | ||
@@ -4,0 +10,0 @@ |
@@ -13,6 +13,3 @@ import { OpenAPI } from '@aomex/openapi-type'; | ||
} | ||
/** | ||
* Useless fields: [title, externalDocs] | ||
*/ | ||
type PartialOpenAPISchema = Pick<OpenAPI.SchemaObject, 'description' | 'deprecated' | 'example'>; | ||
type PartialOpenAPISchema = Pick<OpenAPI.SchemaObject, 'title' | 'description' | 'deprecated' | 'example' | 'externalDocs'>; | ||
interface ValidatorOptions<Type> { | ||
@@ -19,0 +16,0 @@ defaultValue?: Type | (() => Type); |
@@ -18,7 +18,9 @@ var __defProp = Object.defineProperty; | ||
nullable, | ||
docs: { description, deprecated, example, ...docs } = {}, | ||
docs: { description, deprecated, example, ...schemaProperties } = {}, | ||
defaultValue | ||
} = validator.config; | ||
const bothProperties = { description, deprecated, example }; | ||
const schema = { | ||
...docs, | ||
...schemaProperties, | ||
...bothProperties, | ||
default: validator.getDefaultValue(defaultValue), | ||
@@ -29,4 +31,4 @@ nullable: nullable || void 0, | ||
const result = { | ||
...bothProperties, | ||
required: required || void 0, | ||
...{ description, deprecated, example }, | ||
schema | ||
@@ -33,0 +35,0 @@ }; |
{ | ||
"name": "@aomex/validator", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
121424
1524