Examples of loadDocuments()


Examples of com.github.kongchen.swagger.docgen.AbstractDocumentSource.loadDocuments()

            getLog().debug(apiSources.toString());
            for (ApiSource apiSource : apiSources) {

                AbstractDocumentSource documentSource = new MavenDocumentSource(apiSource, getLog());
                documentSource.loadOverridingModels();
                documentSource.loadDocuments();
        if (apiSource.getOutputPath() != null){
          File outputDirectory = new File(apiSource.getOutputPath()).getParentFile();
          if (outputDirectory != null && !outputDirectory.exists()) {
            if (!outputDirectory.mkdirs()) {
              throw new MojoExecutionException("Create directory[" +
View Full Code Here

Examples of com.github.kongchen.swagger.docgen.AbstractDocumentSource.loadDocuments()

    public void testIssue17() throws Exception, GenerateException {
    ApiSource apiSource = prepare();
        String locations = apiSource.getLocations();
        apiSource.setLocations("issue17");
        AbstractDocumentSource documentSource = new MavenDocumentSource(apiSource, new SystemStreamLog());
        documentSource.loadDocuments();
        OutputTemplate outputTemplate = new OutputTemplate(documentSource);
        Assert.assertEquals(outputTemplate.getDataTypes().size(), 1);
        Assert.assertEquals(outputTemplate.getDataTypes().iterator().next().getName(), "Child");
        // set back
        apiSource.setLocations(locations);
View Full Code Here

Examples of com.github.kongchen.swagger.docgen.AbstractDocumentSource.loadDocuments()

    @Test
    public void test() throws Exception, GenerateException {
    ApiSource apiSource = prepare();
        AbstractDocumentSource documentSource = new MavenDocumentSource(apiSource, new SystemStreamLog());
        documentSource.loadDocuments();
        OutputTemplate outputTemplate = new OutputTemplate(documentSource);
        assertEquals(apiSource.getApiVersion(), outputTemplate.getApiVersion());
        assertEquals(3, outputTemplate.getApiDocuments().size());
        for (MustacheDocument doc : outputTemplate.getApiDocuments()) {
            if (doc.getIndex() == 1) {
View Full Code Here

Examples of com.github.kongchen.swagger.docgen.AbstractDocumentSource.loadDocuments()

  @Test
  public void testSwaggerFilter() throws Exception, GenerateException {
    ApiSource apiSource = prepare();
    apiSource.setSwaggerInternalFilter(TestSwaggerSpecFilter.class.getName());
    AbstractDocumentSource documentSource = new MavenDocumentSource(apiSource, new SystemStreamLog());
    documentSource.loadDocuments();
    OutputTemplate outputTemplate = new OutputTemplate(documentSource);
    assertEquals(apiSource.getApiVersion(), outputTemplate.getApiVersion());
    assertEquals(3, outputTemplate.getApiDocuments().size());
    for (MustacheDocument doc : outputTemplate.getApiDocuments()) {
      if (doc.getIndex() == 1) {
View Full Code Here

Examples of com.github.kongchen.swagger.docgen.AbstractDocumentSource.loadDocuments()

  @Test
  public void testSwaggerApiReader() throws Exception {
    ApiSource apiSource = prepare();
    apiSource.setSwaggerApiReader(TestSwaggerApiReader.class.getName());
    AbstractDocumentSource documentSource = new MavenDocumentSource(apiSource, new SystemStreamLog());
    documentSource.loadDocuments();
    OutputTemplate outputTemplate = new OutputTemplate(documentSource);
    assertEquals(apiSource.getApiVersion(), outputTemplate.getApiVersion());
    assertEquals(3, outputTemplate.getApiDocuments().size());
    for (MustacheDocument doc : outputTemplate.getApiDocuments()) {
      if (doc.getIndex() == 1) {
View Full Code Here

Examples of com.github.kongchen.swagger.docgen.AbstractDocumentSource.loadDocuments()

  @Test
  public void testSwaggerApiReaderDefaultConfig() throws Exception {
    ApiSource apiSource = prepare();
    AbstractDocumentSource documentSource = new MavenDocumentSource(apiSource, new SystemStreamLog());
    documentSource.loadDocuments();
    OutputTemplate outputTemplate = new OutputTemplate(documentSource);
    assertEquals(apiSource.getApiVersion(), outputTemplate.getApiVersion());
    assertEquals(3, outputTemplate.getApiDocuments().size());
    for (MustacheDocument doc : outputTemplate.getApiDocuments()) {
      if (doc.getIndex() == 1) {
View Full Code Here

Examples of org.openbel.framework.core.kam.JdbcKAMLoaderImpl.loadDocuments()

        }

        // load documents
        List<DocumentHeader> dhs = p2pn.getDocumentTable().getDocumentHeaders();
        try {
            jkl.loadDocuments(dhs);
        } catch (SQLException e) {
            final String msg = "Error loading documents";
            throw new DatabaseError(schema, msg, e);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.