Constructor
new module:"openapi-transformers/remove-type-if.js"()
- Source:
Methods
(static) allNonNullTypes(type) → {boolean}
Checks if a given type constraint validates all types other than null.
The type constraint may or may not include null.
This predicate is useful for conversion of schemas which explicitly accept
any type (and are only valid in OAS 3.1 and JSON Schema) to implicitly
accept any type (which are valid in all OAS and JSON Schema versions).
"null" is excluded because it must be handled by `nullable` in OAS 3
(and `x-nullable` in OAS 2).
Parameters:
| Name | Type | Description |
|---|---|---|
type |
string | !Array.<string> | Schema Object type. |
- Source:
Returns:
true if type is an Array which contains the 5 JSON
Schema types other than "null" (handled by `nullable`) and "integer"
(covered by "number"), which may or may not be present. Otherwise false.
- Type
- boolean