2017-02-09 11 views
0

から任意のスキーマと一致していない私は、以下のスペックでエラーData does not match any schemas from 'oneOf'を取得しています:検証エラーがbluemixに接続:データが「oneOfの」

product: 1.0.0 
info: 
    name: account-information 
    title: Account Information 
    version: 1.0.10 
    termsOfService: >- 
    These API are a PSD2 implementation example. The service might be 
    discontinued at any time 
visibility: 
    view: 
    type: public 
    subscribe: 
    type: authenticated 
plans: 
    premium: 
    title: Premium 
    apis: {} 
    rate-limit: 
     value: 1000/1minute 
     hard-limit: true 
    approval: true 
    default: 
    title: Default Plan 
    description: Default Plan 
    approval: false 
    rate-limit: 
     value: 100/hour 
     hard-limit: true 
apis: 
    account: 
    $ref: account.yaml 
    subscription: 
    $ref: subscription.yaml 

完全なエラーメッセージ:

メッセージ: "データが" oneOf "、Chemin dedonnéesのスキーマと一致しません:" Chemin deschéma: "/ oneOf"

メッセージ: "追加プロパティは使用できません"、Chemin dedonnées:名前 "、Chemin deschéma:"/oneOf/0/additionalProperties "

私はどこからエラーが発生し、解決するのか分かりません。 API接続用

答えて

1

私はあなたがX-IBM-名の代わり名前を使用したいと考えています。

info: 
    title: Account Information 
    x-ibm-name: account-information 
    version: 1.0.10 
visibility: 
    view: 
    type: public 
    subscribe: 
    type: authenticated 
plans: 
    premium: 
    title: Premium 
    apis: {} 
    rate-limit: 
     value: 1000/1minute 
     hard-limit: true 
    approval: true 
    default: 
    title: Default Plan 
    description: Default Plan 
    approval: false 
    rate-limit: 
     value: 100/hour 
     hard-limit: true 
apis: 
    account: 
    $ref: account.yaml 
    subscription: 
    $ref: subscription.yaml 

注:私はあなたの上記の例を使用して検証以下のスペックを取得することができた私はまた製品フィールドを削除しました。

enter image description here

また、APIの接続が正しい形式で自動的にソースを作成してもらうために、[デザイン]タブを使用することができます

関連する問題