facebookarchive / swift

An annotation-based Java library for creating Thrift serializable types and services.
Apache License 2.0
900 stars 297 forks source link

Requiredness should be after field id. #218

Closed haijunz closed 10 years ago

haijunz commented 10 years ago

Tested with java -cp ~/.m2/repository/com/facebook/swift/swift2thrift-generator-cli/0.14.0-SNAPSHOT/swift2thrift-generator-cli-0.14.0-SNAPSHOT-standalone.jar:gen-swift/ com.facebook.swift.generator.swift2thrift.Main -package sum -recursive SumService

and it generates correct result: struct SumRequest { 1: required i32 num1; 2: required i32 num2; }

alandau commented 10 years ago

doh! lgtm