как решить приведенный ниже сценарий удаленной ссылки.В основном я пытаюсь разделить спецификации API на несколько файлов.Использование openapi-generator-cli-3.3.0.jar
Все файлы yaml ниже 4 находятся в одном каталоге.
Main.yaml
openapi:3.0.0
info:
---
---
servers:
---
paths:
/User
/get
tags:
- User
summary: some summary
responses:
'200':
description: some desc
content:
application/json
schema:
$ref: './schemas.yaml#/components/schemas/UserModel'
schemas.YAML file
components:
schemas:
ErrorModel:
type: object
properties:
errorCategory:
type: string
example: "xxxxx"
ErrorModelList:
type: object
properties:
errorModelList:
type: array
items:
$ref: '#components/schemas/ErrorModel'
responses.YAML file
responses:
$ref: './500.yaml'
500.YAML file
description: some desc
content:
application/json
schema:
$ref: './schemas.yaml#/components/schemas/ErrorModelList'
, если я удалю тег 'ref' с помощью, скажем,type: string
, в 500.ямл работает.Но это не то, что я хочу
ERROR: - Could not find components/scheas/ErrorListModel in contents ./500.yaml