代码拉取完成,页面将自动刷新
在swift2thrift-generator-cli(0.14.2)基础上定制idl文件生成,将primitive封装类型(Integer,Long,Boolean...)的参数和字段在生成的IDL文件中默认指定为optional,将primitive类型的参数和字段默认指定为required.
命令行参数与swift提供的swift2thrift-generator-cli保持一致,增加了一个命令行参数-primitiveOptional
(默认true),当指定为false时生成的idl文件与swift2thrift-generator-cli完全一致。
Usage: Swift2ThriftGenerator [options] <Swift-class-name...>
Options:
-allow_multiple_packages
Allow input classes to reside in different packages. The value of this
flag defines the generated java.swift namespace. Note that Swift classes
generated from the resultant Thrift file will all reside in one Java package
-package, -default_package
Default package for unqualified classes
Default: <empty string>
-map
Map of external type or service to include file
-namespace
Namespace for a particular language to include
-out
Thrift IDL output file, defaults to stdout
-primitiveOptional
Generate optional field and parameter from the wrap type of primitive
type(such as Integer,Long...)
Default: true
-recursive
Generate all types transitively reachable from the specified types and
services
Default: false
-v, -verbose
Show verbose messages
Default: false
使用示例(注意以下为windows bat脚本,路径分隔符为windows下的;
):
set MYCLASS=target\classes;..\db\target\classes;..\simplemq\target\classes
java -cp lib\idl-generator-cli-1.0-SNAPSHOT-standalone.jar;%MYCLASS% ^
com.gitee.l0km.thrift.swift2thrift.generator.Main ^
-namespace py gdface.thrift ^
-namespace java com.gdface
-namespace cpp gdface ^
-out IFaceLog.thrift ^
-package net.gdface.facelog.service BaseFaceLog ^
-recursive
关于参数的更详细权威的用法说明参见原版swift2thrift-generator-cli及《thrift:swift 命令行生成 IDL文件及Client java代码过程》
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. 开源生态
2. 协作、人、软件
3. 评估模型