Examples of apiVersion()


Examples of com.wordnik.swagger.config.SwaggerConfig.apiVersion()

                if (o1 == null && o2 != null) return -1;
                if (o1 != null && o2 == null) return 1;
                return o1.position() - o2.position();
            }
        });
        serviceDocument = new ResourceListing(swaggerConfig.apiVersion(), swaggerConfig.swaggerVersion(),
                                              scala.collection.immutable.List.fromIterator(JavaConversions.asScalaIterator(apiListingReferences.iterator())),
                                              scala.collection.immutable.List.fromIterator(JavaConversions.asScalaIterator(authorizationTypes.iterator())),
                                              toSwaggerApiInfo(apiSource.getApiInfo()));
    }
View Full Code Here

Examples of com.wordnik.swagger.model.ApiListing.apiVersion()

        apiDocumentationController.setApiVersion("v1");
        apiDocumentationController.setBaseControllerPackage(BASE_CONTROLLER_PACKAGE);
        apiDocumentationController.setBasePath("http://localhost/swagger4spring-web-example");
        ApiListing documentation = apiDocumentationController.getDocumentation(servletRequest);
        assertNotNull(documentation);
        assertEquals(documentation.apiVersion(), "v1");
        assertEquals(documentation.resourcePath(), "/api/v1/test");
    }

    @Test
    public void getResourceList() {
View Full Code Here

Examples of com.wordnik.swagger.model.ApiListing.apiVersion()

                String documentationAsJSON = mapper.writeValueAsString(documentation);
                System.out.println(documentationAsJSON);
                ApiListing documentationDeserialized = JsonSerializer.asApiListing(documentationAsJSON);
                assertNotNull(documentationDeserialized);
                assertTrue(documentationDeserialized.swaggerVersion().equals(SwaggerSpec.version()));
                assertTrue(documentationDeserialized.apiVersion().equals("v1"));
                assertTrue(documentationDeserialized.basePath().equals("http://localhost:8080/api"));
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
View Full Code Here

Examples of com.wordnik.swagger.model.ResourceListing.apiVersion()

        apiDocumentationController.setBasePath("http://localhost/swagger4spring-web-example");

        ResourceListing documentation = apiDocumentationController.getResources(servletRequest);

        assertNotNull(documentation);
        assertEquals("v1", documentation.apiVersion());
        assertEquals(3, documentation.apis().size());

        for (ApiListingReference endPoint : ScalaToJavaUtil.toJavaList(documentation.apis())) {
            assertTrue(END_POINT_PATHS.contains(endPoint.path()));
        }
View Full Code Here

Examples of org.jclouds.ContextBuilder.apiVersion()

        } else if (BLOBSTORE_PROVIDERS.contains(profile.getProvider())) {
          if (profile.getEndpoint() != null) {
            contextBuilder.endpoint(profile.getEndpoint());
          }
          if (profile.getApiversion() != null) {
            contextBuilder.apiVersion(profile.getApiversion());
          }
          if (profile.getIdentity() != null && profile.getCredential() != null) {
            contextBuilder.credentials(profile.getIdentity(), profile.getCredential());
          }
        } else {
View Full Code Here

Examples of org.jclouds.ContextBuilder.apiVersion()

         computeContext.close();
      Properties overrides = setupComputeProperties();
      ContextBuilder builder = ContextBuilder.newBuilder(computeProvider)
               .credentials(computeIdentity, computeCredential).overrides(overrides).modules(setupModules());
      if (computeApiversion != null)
         builder.apiVersion(computeApiversion);
      if (computeBuildversion != null)
         builder.buildVersion(computeBuildversion);

      computeContext = builder.buildView(ComputeServiceContext.class);
   }
View Full Code Here

Examples of org.jclouds.ContextBuilder.apiVersion()

         computeContext.close();
      Properties overrides = setupComputeProperties();
      ContextBuilder builder = ContextBuilder.newBuilder(computeProvider)
               .credentials(computeIdentity, computeCredential).overrides(overrides).modules(setupModules());
      if (computeApiversion != null)
         builder.apiVersion(computeApiversion);
      if (computeBuildversion != null)
         builder.buildVersion(computeBuildversion);

      computeContext = builder.buildView(ComputeServiceContext.class);
   }
View Full Code Here

Examples of org.jclouds.ContextBuilder.apiVersion()

         computeContext.close();
      Properties overrides = setupComputeProperties();
      ContextBuilder builder = ContextBuilder.newBuilder(computeProvider)
               .credentials(computeIdentity, computeCredential).overrides(overrides).modules(setupModules());
      if (computeApiversion != null)
         builder.apiVersion(computeApiversion);
      if (computeBuildversion != null)
         builder.buildVersion(computeBuildversion);

      computeContext = builder.buildView(ComputeServiceContext.class);
   }
View Full Code Here

Examples of org.jclouds.ContextBuilder.apiVersion()

         computeContext.close();
      Properties overrides = setupComputeProperties();
      ContextBuilder builder = ContextBuilder.newBuilder(computeProvider)
               .credentials(computeIdentity, computeCredential).overrides(overrides).modules(setupModules());
      if (computeApiversion != null)
         builder.apiVersion(computeApiversion);
      if (computeBuildversion != null)
         builder.buildVersion(computeBuildversion);

      computeContext = builder.buildView(ComputeServiceContext.class);
   }
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.