vlingo / xoom-schemata

The VLINGO XOOM Schema Registry.
https://vlingo.io
Mozilla Public License 2.0
17 stars 9 forks source link

Generate data types #194

Closed jakzal closed 3 years ago

jakzal commented 3 years ago

Example:

data Price {
    double amount
    string currency
}

Java:

package Context.data;

import java.lang.String;

public final class Price {
  public final double amount;

  public final String currency;

  public Price(final double amount, final String currency) {
    this.amount = amount;
    this.currency = currency;
  }
}

C#:

namespace Context.Data
{
  public sealed class Price
  {
    public double Amount { get; }

    public string Currency { get; }

    public Price(double amount, string currency) {
      Amount = amount;
      Currency = currency;
    }
  }
}

Additionally I also extracted type and field/property classes, and added an import statement for SemanticVersion.