因此,打字稿模板现在使用serverless.ts而不是YAML进行构建,这很酷-但是缺少有关文件格式工作方式的示例-特别是我在努力与yaml等效:
request:
schema:
application/json: ${file(src/schema/login_request.json)}
x在下面是什么?
request: {
schema: {
'application/json': x
}
}
您只需使用Typescript的即可import
。
import login_request from './src/schema/login_request.json'
// example how to use the value
const request: {
schema: {
'application/json': login_request
}
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句