Skip to content

[ALL?] Bug: Request body's schema can not contain allOf ("String to be sanitized is null. Default to Object") #8601

@djslin99

Description

@djslin99
Description

When I have an allOf keyword in my request body's schema, I get the following warning three times:
String to be sanitized is null. Default to Object

Swagger-codegen version

Self build with 3.0.0 Branch commit d78362d

Swagger declaration file content
openapi: "3.0.0"
info:
  version: 1.0.0
  title: Test
paths:
  /test:
    post:
      operationId: test
      requestBody:
        required: true
        content:
          application/json:
            schema:
               allOf:
                - $ref: '#/components/schemas/Test'
      responses:
        default:
          description: response...
components:
  schemas:
    Test:
      type: object
Command line used for generation

I tried it with java, jaxrs-cxf-client, jaxrs-cxf, spring and typescript-angular. I can test more languages if needed.

For example: java -jar swagger-codegen-cli.jar generate -l spring -i test.yaml -o test

Steps to reproduce

Use the allOf keyword in request body's schema and generate spring code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions