Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 RAML 文件中使用全局变量:
#%RAML 1.0 title: MyTitle myVariable: http://example.com version: v1 baseUri: {myVariable}/{version}
但它不起作用。RAML 真的允许这样做吗?
不,它不允许像那样对变量进行分级。但是,它确实允许您baseUriParameters像这样定义:
baseUriParameters
#%RAML 1.0 --- baseUri: http://{myVariable}.com baseUriParameters: myVariable: type: string enum: [ us-east, us-west, emea, apac ] default: us-east