raml2html没有正确生成数组声明

时间:2018-03-12 11:22:37

标签: raml

我正在使用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

中上述2个属性的示例
  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中得到的内容

enter image description here

数组显示为array of memberTypes.TermsAndConditions
问题是如何摆脱memberTypes?我只想让类型为array of TermsAndConditions

我该如何实现这一目标?是否有raml2html工具的命令行选项可以解决这个问题?

0 个答案:

没有答案