docs: public void init(final Class<?>[] classes, final GlobalHeader globalHeader, final String baseURI) {
  		if (!this.initialized.compareAndSet(false, true)) {
  			throw new RestDocException("Generator already initialized");
  		}
  		this.logger.info("Starting generation of RestDoc");
  		this.logger.info("Searching for RestDoc API classes");
  		
  		if (globalHeader != null) {
  			if (globalHeader.getRequestHeader() != null) {
  				this.requestHeaderMap.putAll(globalHeader.getRequestHeader());
  			}
  			if (globalHeader.getResponseHeader() != null) {
  				this.responseHeaderMap.putAll(globalHeader.getResponseHeader());
  			}
  			if ((globalHeader.getAdditionalFields() != null) && !globalHeader.getAdditionalFields().isEmpty()) {
  				this.globalAdditional.putAll(globalHeader.getAdditionalFields());
  			}
  		}
  		
  		for (final Class<?> apiClass : classes) {
  			// check if class provides predefined RestDoc
  			boolean scanNeeded = true;
  			if (Arrays.asList(apiClass.getInterfaces()).contains(IProvideRestDoc.class)) {
  				try {
  					this.logger.info("Class {} provides predefined RestDoc", apiClass.getCanonicalName());
  					final IProvideRestDoc apiObject = (IProvideRestDoc) apiClass.newInstance();
  					final RestResource[] restDocResources = apiObject.getRestDocResources();
  					for (final RestResource restResource : restDocResources) {
  						this.resources.put(restResource.getPath(), restResource);
  					}
  					this.schemaMap.putAll(apiObject.getRestDocSchemas());
  					scanNeeded = false;
  				} catch (final Exception e) {
  					// ignore it and fall back to annotation scan
  				}
  			}
  			if (scanNeeded) {
  				this.addResourcesOfClass(apiClass, baseURI);
  			}
  		}
  	}