Bug Report Checklist
Description
ComposedSchema can exist only with properties.
For example when the normalizer executes schema.setOneOf(null). It can happen for REMOVE_ANYOF_ONEOF_AND_KEEP_PROPERTIES_ONLY.
ModelUtils.isComposedSchema returns true in that case -> it leads to undesired side effects.
For example at InlineModelResolver
openapi-generator version
7.21.0
OpenAPI declaration file content or url
openapi: 3.0.3
info:
version: "1.0.0"
title: test inline enum
paths:
/test:
post:
requestBody:
description: request
content:
application/json:
schema:
$ref: '#/components/schemas/Dummy'
required: true
responses:
200:
description: Successfully created reverse listings for retail
components:
schemas:
Dummy:
type: object
properties:
status:
type: string
enum:
- GOOD
- BAD
oneOf:
- properties:
good:
type: string
- properties:
bad:
type: string
Generation Details
Steps to reproduce
--inline-schema-options RESOLVE_INLINE_ENUMS=true --openapi-normalizer REMOVE_ANYOF_ONEOF_AND_KEEP_PROPERTIES_ONLY=true
Related issues/PRs
Suggest a fix
Bug Report Checklist
Description
ComposedSchema can exist only with properties.
For example when the normalizer executes
schema.setOneOf(null). It can happen for REMOVE_ANYOF_ONEOF_AND_KEEP_PROPERTIES_ONLY.ModelUtils.isComposedSchema returns true in that case -> it leads to undesired side effects.
For example at InlineModelResolver
openapi-generator version
7.21.0
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
--inline-schema-options RESOLVE_INLINE_ENUMS=true --openapi-normalizer REMOVE_ANYOF_ONEOF_AND_KEEP_PROPERTIES_ONLY=trueRelated issues/PRs
Suggest a fix