Skip to content

Add top level XML code generation hints #1652

Open
@silkentrance

Description

@silkentrance

Having to always denote the same xml properties over and over again, namely the prefix and the namespace on properties and data types alike, one should instead be able to add an xml property at the top level, e.g.

xml:
  namespace: 'foo:bar:v1'
  prefix: 'fbv1'
components:
  ...

This then would act as the default for all data types and properties and also items of properties of type array.

This will make things much easier for us.

In the future, this could be extended so that one could have multiple NSURLs and associated prefixes and just reference these prefixes from xml code generation hints at the data type level or property level, e.g.

xml:
  default:
    namespace: 'foo:v1'
  fbv1:
    namespace: 'foo:bar:v1'
  fbv1add:
    namespace: 'foo:bar:v1-additions'
components:
  Foobar:
    xml:
      prefix: 'fbv1add'
  Barfoo:
    xml:
      prefix: 'fbv1'
  Foo:
    // uses default namespace

The code generator could then look up the prefix from the top level xml code generation hints and fill in the gaps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    media and encodingIssues regarding media type support and how to encode data (outside of query/path params)schema-objectxml

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions