Examples of ApiListingReference


Examples of com.wordnik.swagger.model.ApiListingReference

        List<ApiListing> apiListings = gatherListings();
        Iterable<ApiListingReference> listings = transform(apiListings, new Function<ApiListing, ApiListingReference>() {
            @Nullable
            @Override
            public ApiListingReference apply(@Nullable ApiListing apiListing) {
                return new ApiListingReference(apiListing.resourcePath(), apiListing.description(), apiListing.position());
            }
        });

        ResourceListing resourceListing = new ResourceListing(swaggerConfig.apiVersion(),
                swaggerConfig.swaggerVersion(),
View Full Code Here

Examples of com.wordnik.swagger.model.ApiListingReference

      String listingDescription = resourceGroupDescriptions.get(resourceGroup);
      Integer position = resourceGroup.getPosition();
      String path = swaggerPathProvider.getResourceListingPath(swaggerGroup, resourceGroupName);
      log.info("Created resource listing Path: {} Description: {} Position: {}",
              path, resourceGroupName, position);
      this.apiListingReferences.add(new ApiListingReference(path, toOption(listingDescription), position));
    }
  }
View Full Code Here

Examples of com.wordnik.swagger.model.ApiListingReference

  private void prepareServiceDocument() {
    List<ApiListingReference> apiListingReferences = new ArrayList<ApiListingReference>();
    for (Iterator<ApiListingReference> iterator = serviceDocument.apis()
        .iterator(); iterator.hasNext();) {
      ApiListingReference apiListingReference = iterator.next();
      String newPath = apiListingReference.path();
      if (useOutputFlatStructure) {
        newPath = newPath.replaceAll("/", "_");
        if (newPath.startsWith("_")) {
          newPath = "/" + newPath.substring(1);
        }
      }
      newPath += ".{format}";
      apiListingReferences.add(new ApiListingReference(newPath,
          apiListingReference.description(), apiListingReference
              .position()));
    }
    // there's no setter of path for ApiListingReference, we need to create
    // a new ResourceListing for new path
    serviceDocument = new ResourceListing(serviceDocument.apiVersion(),
View Full Code Here

Examples of com.wordnik.swagger.model.ApiListingReference

        this.position = position;
    }

    @Override
    public ApiListingReference toSwaggerModel() {
        return new ApiListingReference(path, Utils.getOption(description), position);
    }
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.