遇到模型生成错误
[main] ERROR o.o.codegen.InlineModelResolver - Illegal schema found with $ref combined with other properties, no properties should be defined alongside a $ref:
class ObjectSchema {
class Schema {
type: object
format: null
$ref: #/components/schemas/image
description: null
title: null
multipleOf: null
maximum: null
exclusiveMaximum: null
minimum: null
exclusiveMinimum: null
maxLength: null
minLength: null
pattern: null
maxItems: null
minItems: null
uniqueItems: null
maxProperties: null
minProperties: null
required: null
not: null
properties: null
additionalProperties: null
nullable: null
readOnly: null
writeOnly: null
example: null
externalDocs: null
deprecated: null
discriminator: null
xml: null
}
}
谷歌搜索,但没有找到问题的解决方案。也许有人知道如何解决或解决方法?我生成以下模型:
post:
parameters:
- in: query
name: type
required: true
schema:
type: string
enum:
- profile
description: Type
responses:
"200":
description: OK
content:
application/json:
schema:
type: object
allOf:
- $ref: "../schemas/common/defaultResponse.yaml"
- type: object
properties:
content:
type: object
properties:
popup:
type: object
properties:
title:
type: string
enum:
- Code for use
description:
type: string
comment:
type: string
code:
type: string
qr:
type: string
button_label:
type: string
enum:
- Close sheet
reload_interval:
type: integer