expose swagger doc expansion property
This commit is contained in:
		
							parent
							
								
									60538eff6d
								
							
						
					
					
						commit
						a78e88906b
					
				@ -116,6 +116,8 @@ public class SwaggerConfiguration {
 | 
				
			|||||||
    private String appVersion;
 | 
					    private String appVersion;
 | 
				
			||||||
    @Value("${swagger.group_name:thingsboard}")
 | 
					    @Value("${swagger.group_name:thingsboard}")
 | 
				
			||||||
    private String groupName;
 | 
					    private String groupName;
 | 
				
			||||||
 | 
					    @Value("${swagger.doc_expansion:none}")
 | 
				
			||||||
 | 
					    private String docExpansion;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Bean
 | 
					    @Bean
 | 
				
			||||||
    public OpenAPI thingsboardApi() {
 | 
					    public OpenAPI thingsboardApi() {
 | 
				
			||||||
@ -172,7 +174,7 @@ public class SwaggerConfiguration {
 | 
				
			|||||||
        uiProperties.setDefaultModelExpandDepth(1);
 | 
					        uiProperties.setDefaultModelExpandDepth(1);
 | 
				
			||||||
        uiProperties.setDefaultModelRendering("example");
 | 
					        uiProperties.setDefaultModelRendering("example");
 | 
				
			||||||
        uiProperties.setDisplayRequestDuration(false);
 | 
					        uiProperties.setDisplayRequestDuration(false);
 | 
				
			||||||
        uiProperties.setDocExpansion("list");
 | 
					        uiProperties.setDocExpansion(docExpansion);
 | 
				
			||||||
        uiProperties.setFilter("false");
 | 
					        uiProperties.setFilter("false");
 | 
				
			||||||
        uiProperties.setMaxDisplayedTags(null);
 | 
					        uiProperties.setMaxDisplayedTags(null);
 | 
				
			||||||
        uiProperties.setOperationsSorter("alpha");
 | 
					        uiProperties.setOperationsSorter("alpha");
 | 
				
			||||||
 | 
				
			|||||||
@ -1534,6 +1534,8 @@ swagger:
 | 
				
			|||||||
  version: "${SWAGGER_VERSION:}"
 | 
					  version: "${SWAGGER_VERSION:}"
 | 
				
			||||||
  # The group name (definition) on the API doc UI page.
 | 
					  # The group name (definition) on the API doc UI page.
 | 
				
			||||||
  group_name: "${SWAGGER_GROUP_NAME:thingsboard}"
 | 
					  group_name: "${SWAGGER_GROUP_NAME:thingsboard}"
 | 
				
			||||||
 | 
					  # Control the initial display state of API operations and tags (none, list or full)
 | 
				
			||||||
 | 
					  doc_expansion: "${SWAGGER_DOC_EXPANSION:none}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Queue configuration parameters
 | 
					# Queue configuration parameters
 | 
				
			||||||
queue:
 | 
					queue:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user