File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed 
src/Microservices/CatalogMicroservice Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 3535
3636var  app  =  builder . Build ( ) ; 
3737
38- if  ( app . Environment . IsDevelopment ( ) ) 
38+ var  shouldShowSwagger  =  Environment . GetEnvironmentVariable ( 
39+     "SHOULD_SHOW_SWAGGER" , 
40+     EnvironmentVariableTarget . Process 
41+ )  ??  "" ; 
42+ 
43+ if  ( app . Environment . IsDevelopment ( )  ||  shouldShowSwagger  is  "true" ) 
3944{ 
4045    app . UseSwagger ( ) ; 
4146    app . UseSwaggerUI ( c => 
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ services:
1414     - catalog-microservice 
1515    environment :
1616     - SQL_CONNECTION_STRING=Data Source=catalog-sqlserver;Integrated Security=false;User ID=sa;Password=@sineThingComplicated1234;Encrypt=false;TrustServerCertificate=true; 
17+      - SHOULD_SHOW_SWAGGER=true 
1718
1819  catalog-sqlserver :
1920    image : mcr.microsoft.com/azure-sql-edge 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments