code: private void validateConfiguration(ApiSource apiSource) throws GenerateException {
          if (apiSource == null) {
              throw new GenerateException("You do not configure any apiSource!");
          } else if (apiSource.getInfo() == null) {
              throw new GenerateException("`<info>` is required by Swagger Spec.");
          }
          if (apiSource.getInfo().getTitle() == null) {
              throw new GenerateException("`<info><title>` is required by Swagger Spec.");
          }
  
          if (apiSource.getInfo().getVersion() == null) {
              throw new GenerateException("`<info><version>` is required by Swagger Spec.");
          }
  
          if (apiSource.getInfo().getLicense() != null && apiSource.getInfo().getLicense().getName() == null) {
              throw new GenerateException("`<info><license><name>` is required by Swagger Spec.");
          }
  
          if (apiSource.getLocations() == null) {
              throw new GenerateException("<locations> is required by this plugin.");
          }
  
      }
docs: validate configuration according to swagger spec and plugin requirement
  
  @param apiSource
  @throws GenerateException