Skip to content

Commit 23e9712

Browse files
committed
Root XML element name comes from component name
Clarifies that the name of the root XML element comes from the component name, which was shown in an example but was unclear due to the use of the obsolete OAS 2.0 terminology "model." This does not change the restriction (in the `xml` field of the Schema Object) that the `xml` field only applies to property schemas (and not root schemas).
1 parent 3ee2f01 commit 23e9712

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

src/oas.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3253,22 +3253,25 @@ animals:
32533253

32543254
###### XML Attribute, Prefix and Namespace
32553255

3256-
In this example, a full model definition is shown.
3256+
In this example, a full [schema component](#components-schemas) definition is shown.
3257+
Note that the name of the root XML element comes from the component name.
32573258

32583259
```yaml
3259-
Person:
3260-
type: object
3261-
properties:
3262-
id:
3263-
type: integer
3264-
format: int32
3265-
xml:
3266-
attribute: true
3267-
name:
3268-
type: string
3269-
xml:
3270-
namespace: https://example.com/schema/sample
3271-
prefix: sample
3260+
components:
3261+
schemas:
3262+
Person:
3263+
type: object
3264+
properties:
3265+
id:
3266+
type: integer
3267+
format: int32
3268+
xml:
3269+
attribute: true
3270+
name:
3271+
type: string
3272+
xml:
3273+
namespace: https://example.com/schema/sample
3274+
prefix: sample
32723275
```
32733276

32743277
```xml

0 commit comments

Comments
 (0)