Skip to content

Commit

Permalink
Change nullable & type for OpenApi v3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
DjordyKoert committed Nov 17, 2023
1 parent 595d8b6 commit ebb0c87
Show file tree
Hide file tree
Showing 11 changed files with 107 additions and 46 deletions.
17 changes: 11 additions & 6 deletions docs/reference/annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -956,10 +956,12 @@ An object instance is valid against this property if its number of properties is
<dt><strong>required</strong> : <span style="font-family: monospace;">string[]</span></dt>
<dd><p>An object instance is valid against this property if its property set contains all elements in this property's<br />
array value.</p></dd>
<dt><strong>type</strong> : <span style="font-family: monospace;">string</span></dt>
<dt><strong>type</strong> : <span style="font-family: monospace;">string|non-empty-array&lt;string&gt;</span></dt>
<dd><p>The type of the schema/property.<br />
<br />
The value MUST be one of "string", "number", "integer", "boolean", "array" or "object".</p></dd>
OpenApi v3.0: The value MUST be one of "string", "number", "integer", "boolean", "array" or "object".<br />
<br />
Since OpenApi v3.1 an array of types may be used.</p></dd>
<dt><strong>format</strong> : <span style="font-family: monospace;">string</span></dt>
<dd><p>The extending format for the previously mentioned type. See Data Type Formats for further details.</p></dd>
<dt><strong>collectionFormat</strong> : <span style="font-family: monospace;">string</span></dt>
Expand Down Expand Up @@ -1009,7 +1011,7 @@ An array instance is valid against this property if its number of items is great
<dd><p>A boolean value indicating whether all items in an array property must be unique.<br />
<br />
If this attribute is set to true, then all items in the array must be unique.</p><p><i>See</i>: <a href="http://json-schema.org/latest/json-schema-validation.html#anchor49">JSON schema validation</a></p></dd>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]|int[]|float[]|\UnitEnum[]|class-string</span></dt>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]|int[]|float[]|bool[]|\UnitEnum[]|class-string</span></dt>
<dd><p>A collection of allowable values for a property.<br />
<br />
A property instance is valid against this attribute if its value is one of the values specified in this collection.</p><p><i>See</i>: <a href="http://json-schema.org/latest/json-schema-validation.html#anchor76">JSON schema validation</a></p></dd>
Expand Down Expand Up @@ -1040,7 +1042,10 @@ To represent examples that cannot naturally be represented in JSON or YAML, a st
contain the example with escaping where necessary.</p></dd>
<dt><strong>nullable</strong> : <span style="font-family: monospace;">bool</span></dt>
<dd><p>Allows sending a null value for the defined schema.<br />
Default value is false.</p></dd>
Default value is false.<br />
<br />
This must not be used when using OpenApi version 3.1,<br />
instead make the "type" property an array and add "null" as a possible type.</p></dd>
<dt><strong>deprecated</strong> : <span style="font-family: monospace;">bool</span></dt>
<dd><p>Specifies that a schema is deprecated and should be transitioned out of usage.<br />
Default value is false.</p></dd>
Expand Down Expand Up @@ -1093,7 +1098,7 @@ defined by this property's value.</p></dd>
<dd><p>The relative or absolute path to a security scheme.</p><p><i>See</i>: <a href="https://swagger.io/docs/specification/using-ref/">Using refs</a></p></dd>
<dt><strong>securityScheme</strong> : <span style="font-family: monospace;">string</span></dt>
<dd><p>The key into OpenApi->security array.</p></dd>
<dt><strong>type</strong> : <span style="font-family: monospace;">string</span></dt>
<dt><strong>type</strong> : <span style="font-family: monospace;">string|non-empty-array&lt;string&gt;</span></dt>
<dd><p>The type of the security scheme.</p></dd>
<dt><strong>description</strong> : <span style="font-family: monospace;">string</span></dt>
<dd><p>A short description for security scheme.</p></dd>
Expand Down Expand Up @@ -1163,7 +1168,7 @@ An object representing a server variable for server URL template substitution.
<dl>
<dt><strong>serverVariable</strong> : <span style="font-family: monospace;">string</span></dt>
<dd><p>The key into Server->variables array.</p></dd>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]|int[]|float[]|\UnitEnum[]|class-string</span></dt>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]|int[]|float[]|bool[]|\UnitEnum[]|class-string</span></dt>
<dd><p>An enumeration of values to be used if the substitution options are from a limited set.</p></dd>
<dt><strong>default</strong> : <span style="font-family: monospace;">string</span></dt>
<dd><p>The default value to use for substitution, and to send, if an alternate value is not supplied.<br />
Expand Down
Loading

0 comments on commit ebb0c87

Please sign in to comment.