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
  • getExternalFilesDir (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSharedPreferences (Context)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Permission (java.security)
    Legacy security code; do not use.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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