File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed 
src/main/java/dev/openfga/sdk/api/client Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,11 @@ public CompletableFuture<ClientReadAuthorizationModelResponse> readAuthorization
248248            ClientReadAuthorizationModelOptions  options ) throws  FgaInvalidParameterException  {
249249        configuration .assertValid ();
250250        String  storeId  = configuration .getStoreIdChecked ();
251-         String  authorizationModelId  = options .getAuthorizationModelIdChecked ();
251+         // Set authorizationModelId from options if available; otherwise, use the default from configuration 
252+         String  authorizationModelId  = !isNullOrWhitespace (options .getAuthorizationModelId ())
253+                 ? options .getAuthorizationModelIdChecked ()
254+                 : configuration .getAuthorizationModelId ();
255+ 
252256        var  overrides  = new  ConfigurationOverride ().addHeaders (options );
253257        return  call (() -> api .readAuthorizationModel (storeId , authorizationModelId , overrides ))
254258                .thenApply (ClientReadAuthorizationModelResponse ::new );
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments