All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.asciidoc.extension.raml.RamlBaseUriMacro Maven / Gradle / Ivy

The newest version!
package com.asciidoc.extension.raml;

import org.asciidoctor.ast.AbstractBlock;
import org.asciidoctor.extension.InlineMacroProcessor;
import raml.tools.util.LogUtil;

import java.util.Map;

public class RamlBaseUriMacro extends InlineMacroProcessor {
  public RamlBaseUriMacro(String macroName, Map config) {
    super(macroName, config);
  }

  @Override
  protected Object process(AbstractBlock parent, String ramlFileName, Map attributes) {
    try {
      return new RamlContextFactory()
        .ramlContext(parent, ramlFileName)
        .getBaseUri();
    } catch (Exception e) {
      throw LogUtil.loggedException(new RuntimeException(e));
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy