Search in sources :

Example 1 with PageConfigurationEntity

use of io.gravitee.management.model.PageConfigurationEntity in project gravitee-management-rest-api by gravitee-io.

the class SwaggerService_TransformTest method getPage.

private PageEntity getPage(String resource, String contentType) throws IOException {
    URL url = Resources.getResource(resource);
    String descriptor = Resources.toString(url, Charsets.UTF_8);
    PageEntity pageEntity = new PageEntity();
    pageEntity.setContent(descriptor);
    pageEntity.setContentType(contentType);
    PageConfigurationEntity pageConfigurationEntity = new PageConfigurationEntity();
    pageConfigurationEntity.setTryIt(true);
    pageConfigurationEntity.setTryItURL("https://my.domain.com/v1");
    pageEntity.setConfiguration(pageConfigurationEntity);
    return pageEntity;
}
Also used : PageEntity(io.gravitee.management.model.PageEntity) PageConfigurationEntity(io.gravitee.management.model.PageConfigurationEntity) URL(java.net.URL)

Aggregations

PageConfigurationEntity (io.gravitee.management.model.PageConfigurationEntity)1 PageEntity (io.gravitee.management.model.PageEntity)1 URL (java.net.URL)1