我正在使用raml2html工具为我的ReST apis生成html文档。
我已在我在主memberTypes.raml
中包含的raml文件service.raml
中定义了所有类型。
以下是service.raml
文件中的示例。
#%RAML 1.0
title: update member object
uses:
memberTypes: /memberTypes.raml
types:
Member:
properties:
termsAndConditions:
type: memberTypes.TermsAndConditions[]
description: The terms and conditions that the member has accepted.
required: false
person:
type: memberTypes.Person
description: The personal details of the member.
required: true
以下是memberTypes.raml
Person:
properties:
personName:
type: NameType
description: The name of the member.
required: true
dateOfBirth:
type: DateOfBirth
required: true
TermsAndConditions:
properties:
version:
type: string
description: The version of the terms and conditions.
acceptedDate:
type: date-only
description: The date on which the corresponding terms and conditions were accepted. Format is YYYY-MM-DD, ISO-8601 Calendar date format.
现在,下面是我在html中得到的内容
数组显示为array of memberTypes.TermsAndConditions
。
问题是如何摆脱memberTypes
?我只想让类型为array of TermsAndConditions
。
我该如何实现这一目标?是否有raml2html工具的命令行选项可以解决这个问题?