RAML未知类型作为联合类型的选项

时间:2018-08-31 07:37:48

标签: raml

尝试制作简单的东西时,我遇到了一些问题。我有一个可以具有Parameter1或Parameter2的POST方法,但是当我尝试验证项目时,我得到了Unknown类型作为联合类型错误的选项。

#%RAML 1.0
title: Risks
version: v0.3.0
description: !include docs/apiDescription.md
baseUri: https://www.bbvaapis.com/risks/v0

uses:
  customerBureau: types/customerBureau.raml
  financialDebts: types/financialDebts.raml
  identityDocuments: types/identityDocuments.raml
  rating: types/rating.raml
  contract: types/contract.raml

annotationTypes:
  enumDescription: !include ../glapi-global-apis-commons-commons/annotations/enumDescription.raml

resourceTypes:
  consulting-post: !include ../glapi-global-apis-commons-commons/resourceTypes/consulting-post.raml
  collection: !include ../glapi-global-apis-commons-commons/resourceTypes/collection.raml

/external-filters/request:
    description: |
        Service for requesting the necessary information for non-customers (or customers) to external bureaus or the interveners of a contract.
    type: consulting-post
    post:
        description: |
            Method for requesting the necessary information for non-customers (or customers) to external bureaus or requesting the necessary information for the interveners of a contract . Will be mandatory
            the personal information of the non-customers (name, middle name and identity document). If the user was client
            the information required will be the customer identificator. If what is wanted information to external bureaus of the interveners of a contract is mandatory the information of the contract
            (number of contract and format of the contract).
        body:
            application/json:
                type: customerBureau.customerBureau | contract.contract
                examples:
                    non-customer:
                        value: !include examples/external-filters/request/post-204-non-customer.json
                        description: JSON input example when request information about external filters of a non-customer
                        displayName: Non-customer JSON input
                    customer:
                        value: !include examples/external-filters/request/post-204-customer.json
                        description: JSON input example when request information about external filters of a Customer
                        displayName: Customer JSON input
                    contract:
                        value: !include examples/external-filters/request/post-204-contract.json
                        description: JSON input example when request information about external filters of the interveners of a Contract
                        displayName: Contract JSON input
        responses:
            204:
                description: No content.

此行中显示错误:类型:customerBureau.customerBureau | contract.contract

有人知道为什么不起作用吗?

0 个答案:

没有答案