《raml 1.0 与 raml 0.8区别之处》
type与schema
1.0中新增的type概念类似于Objects对象或Model模型,与0.8中schema对应。
1.0中还出现的schema自动识别为type的别名,以后尽量使用type,schema会被移除。
行首types:为声明多个type属性,属性下type: string为表示该属性为string类型。
type: object则说明该属性为对象类型
## 示例:声明一个类型为对象的属性 types: Email: type: object properties: name: type: string title: type: string forward: type: string
作者:ryanemax
微信关注:ryanemax (刘雨飏)
本文出处:https://romantic-hoover-f991f1.netlify.com/cookbook/api/ramldiff0.8-1.0/
授权协议:
CC BY-SA 4.0