Skip to content

Add top level XML code generation hints #1652

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions