Skip to content

Commit cbc7821

Browse files
authored
Merge pull request #4966 from karenetheridge/ether/xml-deprecations
updates for the "xml" and "example" keywords
2 parents 5f38d1d + c2b1114 commit cbc7821

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/oas.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3819,8 +3819,8 @@ When using a Schema Object with XML, if no XML Object is present, the behavior i
38193819
| <a name="xml-name"></a>name | `string` | Sets the name of the element/attribute corresponding to the schema, replacing the 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`. |
38203820
| <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. |
38213821
| <a name="xml-prefix"></a>prefix | `string` | The prefix to be used for the [name](#xml-name). |
3822-
| <a name="xml-attribute"></a>attribute | `boolean` | Declares whether the property definition translates to an attribute instead of an element. Default value is `false`. If `nodeType` is present, this field MUST NOT be present.<br /><br />**Deprecated:** Use `nodeType: "attribute"` in place of `attribute: true` |
3823-
| <a name="xml-wrapped"></a>wrapped | `boolean` | MAY be used only for an array definition. Signifies whether the array is wrapped (for example, `<books><book/><book/></books>`) or unwrapped (`<book/><book/>`). Default value is `false`. The definition takes effect only when defined alongside `type` being `"array"` (outside the `items`). If `nodeType` is present, this field MUST NOT be present.<br /><br />**Deprecated:** Set `nodeType: "element"` explicitly in place of `wrapped: true` |
3822+
| <a name="xml-attribute"></a>attribute | `boolean` | Declares whether the property definition translates to an attribute instead of an element. Default value is `false`. If `nodeType` is present, this field MUST NOT be present.<br /><br />**Deprecated:** Use `nodeType: "attribute"` instead of `attribute: true` |
3823+
| <a name="xml-wrapped"></a>wrapped | `boolean` | MAY be used only for an array definition. Signifies whether the array is wrapped (for example, `<books><book/><book/></books>`) or unwrapped (`<book/><book/>`). Default value is `false`. The definition takes effect only when defined alongside `type` being `"array"` (outside the `items`). If `nodeType` is present, this field MUST NOT be present.<br /><br />**Deprecated:** Use `nodeType: "element"` instead of `wrapped: true` |
38243824

38253825
Note that when generating an XML document from object data, the order of the nodes is undefined.
38263826
Use `prefixItems` to control node ordering as shown under [Ordered Elements and Text](#ordered-elements-and-text).

src/schemas/validation/meta.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ type:
1515
properties:
1616
discriminator:
1717
$ref: '#/$defs/discriminator'
18-
example: true
18+
example:
19+
deprecated: true
1920
externalDocs:
2021
$ref: '#/$defs/external-docs'
2122
xml:
@@ -33,8 +34,6 @@ $defs:
3334
type: string
3435
propertyName:
3536
type: string
36-
required:
37-
- propertyName
3837
type: object
3938
unevaluatedProperties: false
4039

@@ -74,8 +73,10 @@ $defs:
7473
type: string
7574
attribute:
7675
type: boolean
76+
deprecated: true
7777
wrapped:
7878
type: boolean
79+
deprecated: true
7980
type: object
8081
dependentSchemas:
8182
nodeType:

0 commit comments

Comments
 (0)