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

Fix missing comma in Java model constructor #175

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Examples/Java/Sources/Board.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ public class Board {
private int _bits = 0;

private Board(
@Nullable String identifier
@Nullable Set<User> contributors
@Nullable Map<String, Integer> counts
@Nullable Date createdAt
@Nullable Map<String, String> creator
@Nullable String descriptionText
@NonNull Image image
@Nullable String name
@Nullable String url
@Nullable String identifier,
@Nullable Set<User> contributors,
@Nullable Map<String, Integer> counts,
@Nullable Date createdAt,
@Nullable Map<String, String> creator,
@Nullable String descriptionText,
@NonNull Image image,
@Nullable String name,
@Nullable String url,
int _bits
) {
this.identifier = identifier;
Expand Down
58 changes: 29 additions & 29 deletions Examples/Java/Sources/Everything.java
Original file line number Diff line number Diff line change
Expand Up @@ -195,35 +195,35 @@ public class Everything {
private int _bits = 0;

private Everything(
@Nullable List<Object> arrayProp
@Nullable Boolean booleanProp
@Nullable Date dateProp
@Nullable @EverythingIntEnum int intEnum
@Nullable Integer intProp
@Nullable List<Object> listPolymorphicValues
@Nullable List<List<User>> listWithListAndOtherModelValues
@Nullable List<Map<String, User>> listWithMapAndOtherModelValues
@Nullable List<String> listWithObjectValues
@Nullable List<User> listWithOtherModelValues
@Nullable List<Integer> listWithPrimitiveValues
@Nullable Map<String, EverythingMapPolymorphicValues> mapPolymorphicValues
@Nullable Map<String, Object> mapProp
@Nullable Map<String, List<User>> mapWithListAndOtherModelValues
@Nullable Map<String, Map<String, Object>> mapWithMapAndOtherModelValues
@Nullable Map<String, String> mapWithObjectValues
@Nullable Map<String, User> mapWithOtherModelValues
@Nullable Map<String, Integer> mapWithPrimitiveValues
@Nullable Double numberProp
@Nullable User otherModelProp
@Nullable EverythingPolymorphicProp polymorphicProp
@Nullable Set<Object> setProp
@Nullable Set<User> setPropWithOtherModelValues
@Nullable Set<Integer> setPropWithPrimitiveValues
@Nullable Set<String> setPropWithValues
@Nullable @EverythingStringEnum String stringEnum
@Nullable String stringProp
@Nullable String type
@Nullable String uriProp
@Nullable List<Object> arrayProp,
@Nullable Boolean booleanProp,
@Nullable Date dateProp,
@Nullable @EverythingIntEnum int intEnum,
@Nullable Integer intProp,
@Nullable List<Object> listPolymorphicValues,
@Nullable List<List<User>> listWithListAndOtherModelValues,
@Nullable List<Map<String, User>> listWithMapAndOtherModelValues,
@Nullable List<String> listWithObjectValues,
@Nullable List<User> listWithOtherModelValues,
@Nullable List<Integer> listWithPrimitiveValues,
@Nullable Map<String, EverythingMapPolymorphicValues> mapPolymorphicValues,
@Nullable Map<String, Object> mapProp,
@Nullable Map<String, List<User>> mapWithListAndOtherModelValues,
@Nullable Map<String, Map<String, Object>> mapWithMapAndOtherModelValues,
@Nullable Map<String, String> mapWithObjectValues,
@Nullable Map<String, User> mapWithOtherModelValues,
@Nullable Map<String, Integer> mapWithPrimitiveValues,
@Nullable Double numberProp,
@Nullable User otherModelProp,
@Nullable EverythingPolymorphicProp polymorphicProp,
@Nullable Set<Object> setProp,
@Nullable Set<User> setPropWithOtherModelValues,
@Nullable Set<Integer> setPropWithPrimitiveValues,
@Nullable Set<String> setPropWithValues,
@Nullable @EverythingStringEnum String stringEnum,
@Nullable String stringProp,
@Nullable String type,
@Nullable String uriProp,
int _bits
) {
this.arrayProp = arrayProp;
Expand Down
6 changes: 3 additions & 3 deletions Examples/Java/Sources/Image.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ public class Image {
private int _bits = 0;

private Image(
@Nullable Integer height
@Nullable String url
@Nullable Integer width
@Nullable Integer height,
@Nullable String url,
@Nullable Integer width,
int _bits
) {
this.height = height;
Expand Down
2 changes: 1 addition & 1 deletion Examples/Java/Sources/Model.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class Model {
private int _bits = 0;

private Model(
@Nullable String identifier
@Nullable String identifier,
int _bits
) {
this.identifier = identifier;
Expand Down
34 changes: 17 additions & 17 deletions Examples/Java/Sources/Pin.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,23 +96,23 @@ public class Pin {
private int _bits = 0;

private Pin(
@Nullable Map<String, String> attribution
@Nullable List<PinAttributionObjects> attributionObjects
@Nullable Board board
@Nullable String color
@Nullable Map<String, Integer> counts
@NonNull Date createdAt
@NonNull Map<String, User> creator
@Nullable String descriptionText
@NonNull String identifier
@Nullable Image image
@Nullable @PinInStock int inStock
@Nullable String link
@Nullable Map<String, String> media
@Nullable String note
@Nullable List<Map<String, Object>> tags
@Nullable String url
@Nullable Map<String, Object> visualSearchAttrs
@Nullable Map<String, String> attribution,
@Nullable List<PinAttributionObjects> attributionObjects,
@Nullable Board board,
@Nullable String color,
@Nullable Map<String, Integer> counts,
@NonNull Date createdAt,
@NonNull Map<String, User> creator,
@Nullable String descriptionText,
@NonNull String identifier,
@Nullable Image image,
@Nullable @PinInStock int inStock,
@Nullable String link,
@Nullable Map<String, String> media,
@Nullable String note,
@Nullable List<Map<String, Object>> tags,
@Nullable String url,
@Nullable Map<String, Object> visualSearchAttrs,
int _bits
) {
this.attribution = attribution;
Expand Down
20 changes: 10 additions & 10 deletions Examples/Java/Sources/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ public class User {
private int _bits = 0;

private User(
@Nullable String bio
@Nullable Map<String, Integer> counts
@Nullable Date createdAt
@Nullable @UserEmailFrequency String emailFrequency
@Nullable String firstName
@Nullable String identifier
@Nullable Image image
@Nullable String lastName
@Nullable String type
@Nullable String username
@Nullable String bio,
@Nullable Map<String, Integer> counts,
@Nullable Date createdAt,
@Nullable @UserEmailFrequency String emailFrequency,
@Nullable String firstName,
@Nullable String identifier,
@Nullable Image image,
@Nullable String lastName,
@Nullable String type,
@Nullable String username,
int _bits
) {
this.bio = bio;
Expand Down
8 changes: 4 additions & 4 deletions Examples/Java/Sources/VariableSubtitution.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ public class VariableSubtitution {
private int _bits = 0;

private VariableSubtitution(
@Nullable Integer allocProp
@Nullable Integer copyProp
@Nullable Integer mutableCopyProp
@Nullable Integer newProp
@Nullable Integer allocProp,
@Nullable Integer copyProp,
@Nullable Integer mutableCopyProp,
@Nullable Integer newProp,
int _bits
) {
this.allocProp = allocProp;
Expand Down
2 changes: 1 addition & 1 deletion Sources/Core/JavaModelRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public struct JavaModelRenderer: JavaFileRenderer {

func renderModelConstructor() -> JavaIR.Method {
let args = -->(transitiveProperties.map { param, schemaObj in
self.typeFromSchema(param, schemaObj) + " " + param.snakeCaseToPropertyName()
self.typeFromSchema(param, schemaObj) + " " + param.snakeCaseToPropertyName() + ","
} + ["int _bits"])

return JavaIR.method([.private], className + "(\n" + args + "\n)") {
Expand Down