Constructor
new module:"openapi-transformers/nullable-not-required.js"()
- Source:
Methods
(inner) isNullable(schemanon-null, hasNullType, refNullable) → {boolean}
Determines whether a given Schema can have a null value.
Parameters:
| Name | Type | Description |
|---|---|---|
schema |
object | OpenAPI Schema object. |
hasNullType |
boolean | Whether 'null' is a valid Schema type. |
refNullable |
boolean | Treat $ref as nullable. |
- Source:
Returns:
- Type
- boolean
(inner) isPropNullable(schemanon-null, propName, hasNullType, refNullable) → (nullable) {boolean}
Determines whether a given property of a given schema can have a null value.
Parameters:
| Name | Type | Description |
|---|---|---|
schema |
object | OpenAPI Schema object. |
propName |
string | Name of property to check. |
hasNullType |
boolean | Whether 'null' is a valid Schema type. |
refNullable |
boolean | Treat $ref as nullable. |
- Source:
Returns:
- Type
- boolean