Мой API может повторить 200 или 400, произошла ошибка.Я хочу, чтобы они использовали одну и ту же модель, но разные примеры.В моем коде ниже я хочу, чтобы мои 200 Info говорили что-то вроде «Все в порядке», а 400 - «Not ok».
responses:
'200':
description: >-
Invoice received for processing but beware of potentional warnings
and information
schema:
$ref: '#/definitions/Response'
'400':
description: Invoice could not be processed due to fatal errors
schema:
$ref: '#/definitions/Response'
Response:
type: object
properties:
Info:
type: string
information
Messages:
type: object
properties:
Fatal:
type: array
items:
type: object
Warning:
type: array
items:
type: object
Information:
type: array
items:
type: object