- 
          
- 
        Couldn't load subscription status. 
- Fork 457
Yaml config enhancements to support variable substitutions, includes and packages #4818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
        
      
            jimtng
  wants to merge
  24
  commits into
  openhab:main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
jimtng:yaml-preprocessor-secretless
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Open
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            24 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      a0821ff
              
                Yaml config enhancements to support variable substitutions, includes …
              
              
                jimtng 1620166
              
                merge lists in packages
              
              
                jimtng 2dc872d
              
                minor fix in boolean test
              
              
                jimtng 769305b
              
                support single and double quoted defaults which can contain braces
              
              
                jimtng 3f88e4e
              
                remove MissingVariableException (not implemented), refine default val…
              
              
                jimtng c767cf5
              
                Rename __PATH__ to __DIRECTORY__
              
              
                jimtng 144407f
              
                remove unnecessary variable merging in the IncludeObject creation
              
              
                jimtng 3afcde2
              
                address compiler warnings
              
              
                jimtng d3ff630
              
                add __DIR__ as an alias to __DIRECTORY__
              
              
                jimtng f0c7f66
              
                Add include dependency change processing
              
              
                jimtng 664eb3a
              
                fix comment
              
              
                jimtng cdfdc73
              
                skip include processing during initialization
              
              
                jimtng e2c6107
              
                adapt to changes in main branch
              
              
                jimtng cf96ce7
              
                Add a lookup map for WatchService.Kind and unify Kind references
              
              
                jimtng 41fd560
              
                add a comment about include file error message
              
              
                jimtng ca7e0a7
              
                apply copilot suggestions
              
              
                jimtng 4aa9090
              
                move getNestedValue into the test class.
              
              
                jimtng e4a111c
              
                prevent resolveVariable from returning null
              
              
                jimtng 1c642b0
              
                break up resolveVariable method
              
              
                jimtng a745008
              
                add more comments, improve error msg on include file
              
              
                jimtng ead76a9
              
                remove tostring
              
              
                jimtng db29071
              
                apply formatting
              
              
                jimtng d9d4564
              
                use Files.newInputStream
              
              
                jimtng 6ea8086
              
                Add hidden keys feature
              
              
                jimtng File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
        
          
  
    
      
          
            24 changes: 24 additions & 0 deletions
          
          24 
        
  ...l/src/main/java/org/openhab/core/model/yaml/internal/util/preprocessor/IncludeObject.java
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| /* | ||
| * Copyright (c) 2010-2025 Contributors to the openHAB project | ||
| * | ||
| * See the NOTICE file(s) distributed with this work for additional | ||
| * information. | ||
| * | ||
| * This program and the accompanying materials are made available under the | ||
| * terms of the Eclipse Public License 2.0 which is available at | ||
| * http://www.eclipse.org/legal/epl-2.0 | ||
| * | ||
| * SPDX-License-Identifier: EPL-2.0 | ||
| */ | ||
| package org.openhab.core.model.yaml.internal.util.preprocessor; | ||
|  | ||
| import java.util.Map; | ||
|  | ||
| /** | ||
| * The {@link IncludeObject} represents an object constructed from an <code>!include</code> node | ||
| * to be processed by the {@link YamlPreprocessor}. | ||
| * | ||
| * @author Jimmy Tanagra - Initial contribution | ||
| */ | ||
| record IncludeObject(String fileName, Map<String, String> vars) { | ||
| } | 
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The field 'modelIncludes' should have documentation explaining the bidirectional mapping between model names and their include file paths, especially since this is a key feature for dependency tracking.