@GetMapping("/configuration/ui") public Mono<ResponseEntity<UiConfiguration>> uiConfiguration() { return Mono.just(new ResponseEntity<>( Optional.ofNullable(uiConfiguration).orElse(UiConfigurationBuilder.builder().build()), HttpStatus.OK)); }
@Bean public UiConfiguration uiConfiguration(SwaggerProperties swaggerProperties) { return UiConfigurationBuilder.builder() .deepLinking(swaggerProperties.getUiConfig().getDeepLinking()) .defaultModelExpandDepth(swaggerProperties.getUiConfig().getDefaultModelExpandDepth()) .defaultModelRendering(swaggerProperties.getUiConfig().getDefaultModelRendering()) .defaultModelsExpandDepth(swaggerProperties.getUiConfig().getDefaultModelsExpandDepth()) .displayOperationId(swaggerProperties.getUiConfig().getDisplayOperationId()) .displayRequestDuration(swaggerProperties.getUiConfig().getDisplayRequestDuration()) .docExpansion(swaggerProperties.getUiConfig().getDocExpansion()) .maxDisplayedTags(swaggerProperties.getUiConfig().getMaxDisplayedTags()) .operationsSorter(swaggerProperties.getUiConfig().getOperationsSorter()) .showExtensions(swaggerProperties.getUiConfig().getShowExtensions()) .tagsSorter(swaggerProperties.getUiConfig().getTagsSorter()) .validatorUrl(swaggerProperties.getUiConfig().getValidatorUrl()) .build(); }
@RequestMapping(value = "/configuration/ui") @ResponseBody public ResponseEntity<UiConfiguration> uiConfiguration() { return new ResponseEntity<UiConfiguration>( Optional.fromNullable(uiConfiguration).or(UiConfigurationBuilder.builder().build()), HttpStatus.OK); }
@Bean UiConfiguration uiConfig() { return UiConfigurationBuilder.builder() .validatorUrl("") .build(); }
@Bean @ConditionalOnMissingBean public UiConfiguration uiConfiguration() { return UiConfigurationBuilder.builder().build(); }
@Bean public UiConfiguration uiConfiguration(SwaggerProperties swaggerProperties) { return UiConfigurationBuilder.builder() .deepLinking(swaggerProperties.getUiConfig().getDeepLinking()) .defaultModelExpandDepth(swaggerProperties.getUiConfig().getDefaultModelExpandDepth()) .defaultModelRendering(swaggerProperties.getUiConfig().getDefaultModelRendering()) .defaultModelsExpandDepth(swaggerProperties.getUiConfig().getDefaultModelsExpandDepth()) .displayOperationId(swaggerProperties.getUiConfig().getDisplayOperationId()) .displayRequestDuration(swaggerProperties.getUiConfig().getDisplayRequestDuration()) .docExpansion(swaggerProperties.getUiConfig().getDocExpansion()) .maxDisplayedTags(swaggerProperties.getUiConfig().getMaxDisplayedTags()) .operationsSorter(swaggerProperties.getUiConfig().getOperationsSorter()) .showExtensions(swaggerProperties.getUiConfig().getShowExtensions()) .tagsSorter(swaggerProperties.getUiConfig().getTagsSorter()) .validatorUrl(swaggerProperties.getUiConfig().getValidatorUrl()) .build(); }
@Bean public UiConfiguration uiConfiguration(SwaggerConfigurationProerties SwaggerConfigurationProerties) { return UiConfigurationBuilder.builder() .deepLinking(SwaggerConfigurationProerties.getUiConfig().getDeepLinking()) .defaultModelExpandDepth(SwaggerConfigurationProerties.getUiConfig().getDefaultModelExpandDepth()) .defaultModelRendering(SwaggerConfigurationProerties.getUiConfig().getDefaultModelRendering()) .defaultModelsExpandDepth(SwaggerConfigurationProerties.getUiConfig().getDefaultModelsExpandDepth()) .displayOperationId(SwaggerConfigurationProerties.getUiConfig().getDisplayOperationId()) .displayRequestDuration(SwaggerConfigurationProerties.getUiConfig().getDisplayRequestDuration()) .docExpansion(SwaggerConfigurationProerties.getUiConfig().getDocExpansion()) .maxDisplayedTags(SwaggerConfigurationProerties.getUiConfig().getMaxDisplayedTags()) .operationsSorter(SwaggerConfigurationProerties.getUiConfig().getOperationsSorter()) .showExtensions(SwaggerConfigurationProerties.getUiConfig().getShowExtensions()) .tagsSorter(SwaggerConfigurationProerties.getUiConfig().getTagsSorter()) .validatorUrl(SwaggerConfigurationProerties.getUiConfig().getValidatorUrl()) .build(); }