Skip to content

[Spring] Wrong class path for DeferredResult #6451

@sasavilic

Description

@sasavilic
Description

Generated code for Spring is using wrong class path for DeferredResult. Currently, it is used org.springframework.web.context.request.DeferredResult, when actual class path is org.springframework.web.context.request.async.DeferredResult. See here.

Fix should be simple, I will provide PR soon.

Swagger-codegen version

2.2.3. This bug is present since corresponding feature is introduced.

Swagger declaration file content or url
Command line used for generation

I am using swagger-codegen-maven-plugin. Here is the configuration

<configuration>
    <inputSpec>${project.basedir}/src/main/spec/api.yaml</inputSpec>
    <language>spring</language>
    <apiPackage>...removed..</apiPackage>
    <modelPackage>...removed...</modelPackage>
    <configOptions>
        <sourceFolder>java</sourceFolder>
        <dateLibrary>java8</dateLibrary>
        <interfaceOnly>true</interfaceOnly>
        <java8>true</java8>
        <responseWrapper>DeferredResult</responseWrapper>
    </configOptions>
    <library>spring-mvc</library>
    <output>${project.build.directory}/generated-sources/server</output>
</configuration>
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement

I will provide PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions