Skip to content

components schema not generated #601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dongshengYoung opened this issue Apr 23, 2020 · 0 comments
Closed

components schema not generated #601

dongshengYoung opened this issue Apr 23, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@dongshengYoung
Copy link

dongshengYoung commented Apr 23, 2020

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
@bnasslahsen bnasslahsen added the bug Something isn't working label Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants