Skip to content

XML convert property to an attribute not working #1125

@dcrawford1

Description

@dcrawford1

Adding xml/attribute: true to a property should convert it to a XML attribute. The example from swagger

book:
  type: object
  properties:
    id:
      type: integer
      xml:
        attribute: true
    title:
      type: string
    author:
      type: string

should render as:

<book id="0">
  <title>string</title>
  <author>string</author>
</book>

But in Rapidoc id is still a regular XML property:

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <id>0</id>
  <title>string</title>
  <author>string</author>
</root>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions