swagger-api / swagger-core

Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API
http://swagger.io
Apache License 2.0
7.36k stars 2.17k forks source link

@Hidden not working at class level #4660

Closed rodrigo-rufino closed 1 month ago

rodrigo-rufino commented 2 months ago

Dependency: io.swagger.core.v3:swagger-jaxrs2:2.0.10

I'm trying to add @Hidden annotation to my class to remove it from the yaml, but it is not working.

If I add it to a field, it is hidden properly. The problem seems to happen at class level.

My class:

@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Hidden
public class SampleDTO {

    private String Name;

}

The same happens for @Schema(hidden = true).

micryc commented 1 month ago

Hi @rodrigo-rufino are you stil experiencing this issue ? I have tried to reproduce this with swagger-jaxrs2:2.2.20 and it looks like @Hidden annotation works properly, for now I am closing this ticket, if this issue still appears for you, feel free to reopen