You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/oas.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -3190,7 +3190,7 @@ When using a Schema Object with XML, if no XML Object is present, the behavior i
3190
3190
3191
3191
| Field Name | Type | Description |
3192
3192
| ---- | :----: | ---- |
3193
-
| <a name="xml-node-type"></a>nodeType | `string` | One of `element`, `attribute`, `text`, `cdata`, or `none`, as explained under [XML Node Types](#xml-node-types). The default value is `none` if `$ref`, `$dynamicRef`, or `type: array` is present in the [Schema Object](#schema-object) containing the XML Object, and `element` otherwise. |
3193
+
| <a name="xml-node-type"></a>nodeType | `string` | One of `element`, `attribute`, `text`, `cdata`, or `none`, as explained under [XML Node Types](#xml-node-types). The default value is `none` if `$ref`, `$dynamicRef`, or `type: "array"` is present in the [Schema Object](#schema-object) containing the XML Object, and `element` otherwise. |
3194
3194
| <a name="xml-name"></a>name | `string` | Sets the name of the element/attribute corresponding to the schema, replacing name that was inferred as described under [XML Node Names](#xml-node-names). This field SHALL be ignored if the `nodeType` is `text`, `cdata`, or `none`. |
3195
3195
| <a name="xml-namespace"></a>namespace | `string` | The IRI ([[RFC3987]]) of the namespace definition. Value MUST be in the form of a non-relative IRI. |
3196
3196
| <a name="xml-prefix"></a>prefix | `string` | The prefix to be used for the [name](#xml-name). |
@@ -3219,10 +3219,10 @@ The `none` type is useful for JSON Schema constructs that require more Schema Ob
3219
3219
3220
3220
###### Modeling Element Lists
3221
3221
3222
-
For historical compatibility, schemas of `type: array` default to `nodeType: "none"`, placing the nodes for each array item directly under the parent node.
3222
+
For historical compatibility, schemas of `type: "array"` default to `nodeType: "none"`, placing the nodes for each array item directly under the parent node.
3223
3223
This also aligns with the inferred naming behavior defined under [XML Node Names](#xml-node-names).
3224
3224
3225
-
To produce an element wrapping the list, set an explicit `nodeType: "element"` on the `type: array` schema.
3225
+
To produce an element wrapping the list, set an explicit `nodeType: "element"` on the `type: "array"` schema.
3226
3226
When doing so, it is advisable to set an explicit name on either the wrapping element or the item elements to avoid them having the same inferred name.
3227
3227
See examples for expected behavior.
3228
3228
@@ -3347,7 +3347,7 @@ properties:
3347
3347
<animal>value</animal>
3348
3348
```
3349
3349
3350
-
The `name` field for the `type: array` schema has no effect because the default `nodeType` for that object is `none`:
3350
+
The `name` field for the `type: "array"` schema has no effect because the default `nodeType` for that object is `none`:
0 commit comments