Skip to content

ContinuationObject leaks into schema #1961

Closed
@orange-buffalo

Description

@orange-buffalo

Describe the bug

When using springdoc-openapi in a project with Spring Boot 3 + WebFlux + Kotlin Coroutines, the generated schema has ContinuationObject parameters.

To Reproduce

  • Spring Boot: 3.0.0
  • springdoc-openapi: 2.0.0
  • springdoc-openapi modules: springdoc-openapi-starter-common and springdoc-openapi-starter-webflux-api, also reproducible with springdoc-openapi-starter-webflux-ui alone.
  • Sample project: https://github.com/orange-buffalo/reproducer-springdoc-openapi-kotlin. SchemaTest.kt is the test reproducing the problem.

Expected result

Same behaviour as on 1.x - no coroutines internals leaking into schema.

Actual result
Schema gets extra parameters:

- name: $completion
   in: query
   required: false
   schema:
     $ref: '#/components/schemas/ContinuationObject'

And extra types:

  ContinuationObject:
     type: object
     properties:
       context:
         $ref: '#/components/schemas/CoroutineContext'
   CoroutineContext:
     type: object

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions