Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add top level XML code generation hints #1652

Open
silkentrance opened this issue Aug 3, 2018 · 0 comments
Open

Add top level XML code generation hints #1652

silkentrance opened this issue Aug 3, 2018 · 0 comments
Labels
media and encoding Issues regarding media type support and how to encode data (outside of query/path params) schema-object xml
Milestone

Comments

@silkentrance
Copy link

silkentrance commented Aug 3, 2018

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.

@handrews handrews added the media and encoding Issues regarding media type support and how to encode data (outside of query/path params) label Jan 30, 2024
@handrews handrews added this to the v3.2.0 milestone Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
media and encoding Issues regarding media type support and how to encode data (outside of query/path params) schema-object xml
Projects
None yet
Development

No branches or pull requests

3 participants