Skip to content

components schema not generated #601

Closed
@dongshengYoung

Description

@dongshengYoung

Describe the bug

@Operation(summary = "Get chart data", description = "search chart data of target streaming stage and other conditions")
    public HttpResult<ChartDataVo> getProxyChart(@CurrentService PastaService pastaService,
                                                 @Parameter( // open api description
                                                         description = "search conditions",
                                                         schema = @Schema(name = "chartSearchParam",
                                                                 implementation = ChartSearchParam.class)
                                                 ) ChartSearchParam chartSearchParam ) throws ApiException {
method body...
}

when adding schema property, schema not generate correctly
1587613534
I think it's because empty value of schema
1587619313


To Reproduce
Steps to reproduce the behavior:

  • spring boot version: 2.2.6.RELEASE
  • springdoc-openapi : compile('org.springdoc:springdoc-openapi-ui:1.3.4')

sample code

public class ChartSearchParam {

    /**
     * timestamp milliseconds
     */
    @Schema(description = "chart data start at, unix timestamp, milliseconds")
    private Long startAt;

    /*    @DateTimeFormat(pattern="yyyy-MM-dd'T'HH:mm:ss.SSSz")
    private ZonedDateTime endAt;*/

    /**
     * timestamp milliseconds
     */
    @Schema(description = "chart data end at, unix timestamp, milliseconds")
    private Long endAt;


    /**
     * what kind of chart data is requested
     */
    @Schema(description = "which streaming stage data is required", implementation = Stage.class)
    private String chartType = "CLIENT_TO_PROXY";

    @Schema(description = "primary key of target stream")
    private Long streamSeq;

}

Expected behavior

  • chartSearchParam shows normal and each field has description

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