Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>swagger snippets to typeNew to Visual Studio Code? Get it now.
swagger snippets to type

swagger snippets to type

hdb

|
17 installs
| (0) | Free
swagger model转换为ts type
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

swagger-snippets-to-type README

Example

{
businessId	string
业务Id

competeCarBrand	string
竞品品牌名称

competeCarBrandCode	string
竞品品牌code

competeCarModel	string
竞品车型

competeCarModelCode	string
竞品车型Code

imgUrlList	[
图片凭证

文件上传参数{
fileId	string
文件ID

fileName	string
文件名称

fileUrl	string
文件url

}]

operateType	string
操作类型,1-新增,2-修改

id	integer($int64)
订单Id

payType	integer($int32)
支付方式, 1-线上,2-线下

refundReason	string
退款原因

refundReasonCode	string
退款原因-code

refundRemark	string
退款原因说明

saleId	string
销售Id

saleName	string
销售名称

}

复制到剪切板 执行swagger to ts type命令 转换结果

{
	/** 业务Id */
	businessId: string;
	/** 竞品品牌名称 */
	competeCarBrand: string;
	/** 竞品品牌code */
	competeCarBrandCode: string;
	/** 竞品车型 */
	competeCarModel: string;
	/** 竞品车型Code */
	competeCarModelCode: string;
	/** 图片凭证 */
	imgUrlList: {
		/** 文件ID */
		fileId: string;
		/** 文件名称 */
		fileName: string;
		/** 文件url */
		fileUrl: string;
	}[];
	/** 操作类型,1-新增,2-修改 */
	operateType: string;
	/** 订单Id */
	id: number;
	/** 支付方式, 1-线上,2-线下 */
	payType: number;
	/** 退款原因 */
	refundReason: string;
	/** 退款原因-code */
	refundReasonCode: string;
	/** 退款原因说明 */
	refundRemark: string;
	/** 销售Id */
	saleId: string;
	/** 销售名称 */
	saleName: string;
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft