Package com.wordnik.swagger.model

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


      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

  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

        this.position = position;
    }

    @Override
    public ApiListingReference toSwaggerModel() {
        return new ApiListingReference(path, Utils.getOption(description), position);
    }
View Full Code Here

TOP

Related Classes of com.wordnik.swagger.model.ApiListingReference

Copyright © 2018 www.massapicom. 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.