Tabnine Logo
LinkDescriptor.ignored
Code IndexAdd Tabnine to your IDE (free)

How to use
ignored
method
in
org.springframework.restdocs.hypermedia.LinkDescriptor

Best Java code snippets using org.springframework.restdocs.hypermedia.LinkDescriptor.ignored (Showing top 3 results out of 315)

origin: spring-projects/spring-restdocs

private LinkDescriptor createDescriptor(String description, LinkDescriptor source) {
  LinkDescriptor newDescriptor = new LinkDescriptor(source.getRel())
      .description(description);
  if (source.isOptional()) {
    newDescriptor.optional();
  }
  if (source.isIgnored()) {
    newDescriptor.ignored();
  }
  return newDescriptor;
}
origin: spring-projects/spring-restdocs

public static LinksSnippet links(LinkDescriptor... descriptors) {
  return HypermediaDocumentation.links(linkWithRel("self").ignored().optional(),
      linkWithRel("curies").ignored()).and(descriptors);
}
// end::ignore-links[]
origin: spring-projects/spring-restdocs

@Test
public void ignoredLink() throws IOException {
  new LinksSnippet(
      new StubLinkExtractor().withLinks(new Link("a", "alpha"),
          new Link("b", "bravo")),
      Arrays.asList(new LinkDescriptor("a").ignored(),
          new LinkDescriptor("b").description("Link b")))
              .document(this.operationBuilder.build());
  assertThat(this.generatedSnippets.links())
      .is(tableWithHeader("Relation", "Description").row("`b`", "Link b"));
}
org.springframework.restdocs.hypermediaLinkDescriptorignored

Popular methods of LinkDescriptor

  • description
  • optional
    Marks the link as optional.
  • <init>
    Creates a new LinkDescriptor describing a link with the given rel.
  • attributes
  • getAttributes
  • getDescription
  • getRel
    Returns the rel of the link described by this descriptor.
  • isIgnored
  • isOptional
    Returns true if the described link is optional, otherwise false.

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSupportFragmentManager (FragmentActivity)
  • runOnUiThread (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now