YML polygon definition

The one of existing option to create polygon definition is YML file.

Previous page

YML configuration

The example YML configuration might looks like this one:

// polygon.yml 
polygon:
  public: 0
  types = ['intarface', 'class', 'enum']
  pacakges:
    dto:
      required: true
      public: -1
      types: ['class']
    ports:
      public: -1
      types: ['interface']
    queries:
      packagePrivate: -1
      types: ['class']
    commands:
      packagePrivate: -1
      types: ['class']

By default plugin is looking for definition in following path: src/main/resources/polygon.yml.

The full list of allowed elements:

Element Description  
polygon The root element. Required  
polygon.public How many public scope objects are allowed. -1 unlimited, 0 not allowed, n n allowed 0
polygon.packagePrivate How many public scope objects are allowed. -1 unlimited, 0 not allowed, n n allowed 0 (-1 for root level)
polygon.protected How many public scope objects are allowed. -1 unlimited, 0 not allowed, n n allowed 0
polygon.internal How many internal scope objects are allowed. -1 unlimited, 0 not allowed, n n allowed 0
polygon.types What types are allowed. Available values are ['interface', 'class', 'enum', 'abstract class', 'data class', 'open class' ] ['interface', 'class', 'enum', 'abstract class']
polygon.packages All packages definitions goes here.