'How to Ignore fields used by custom annotation in swagger
I have a custom annotation and use that in controller class for modify data. I need to ignore that in swagger dashboard.
Custom Annotation :
@Target(AnnotationTarget.VALUE_PARAMETER)
@Retention(AnnotationRetention.RUNTIME)
annotation class CustomAnnotation(
val fieldName: String,
val sourceType: String
)
Api Function :
@GetMapping("/")
fun get(
@PathVariable input: String,
@CustomAnootation id: String
): Model = modelService.get(input)
I have a lot of api that use CustomAnnotataion in controller class, and i want ignore all of them without use @ApiIgnore or @Hidden for every one.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
