[英]Getting "structural error" while converting a Swagger 2.0 file to OpenAPI 3.0
我的代碼片段:
insuranceCompanyNbr:
type: integer
totalDigits: 6
invoiceTypeInfo:
$ref: '#/definitions/invoiceTypeInfo'
submitterTypeId:
type: string
我收到此錯誤:
錯誤:definitions.InvoiceType.properties.insuranceCompanyNbr 處的結構錯誤。
不應該有額外的屬性。
附加屬性:totalDigits
我該如何解決這個錯誤?
我嘗試在代碼的開頭添加模式,但沒有用。
OpenAPI 中沒有totalDigits
關鍵字——v. 2.0 和 3.x 中都沒有。 您需要刪除此關鍵字,或在其前面加上x-
以使其成為擴展名(即任意元數據)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.