diff --git a/1.0.0-SNAPSHOT/index.html b/1.0.0-SNAPSHOT/index.html index 4ea6a0c8..a3eed7d3 100644 --- a/1.0.0-SNAPSHOT/index.html +++ b/1.0.0-SNAPSHOT/index.html @@ -619,14 +619,19 @@ table.CodeRay td.code>pre{padding:0} -
  • 10. Contributing +
  • 10. Spring Boot Demo
  • -
  • 11. License
  • +
  • 11. Contributing + +
  • +
  • 12. License
  • @@ -1841,6 +1846,9 @@ compile "io.github.swagger2markup:swagger2markup-import-files-ext:1.0.0-SNAPSHOT

    6.4.2. Spring RestDocs extension

    +
    +

    Swagger2Markup can be used together with spring-restdocs. Swagger2Markup can include the generated CURL request, HTTP request and HTTP response example snippets from spring-restdocs into the generated Markup documents. See spring-restdocs how to configure it.

    +
    Usage guide
    @@ -1885,7 +1893,24 @@ compile "io.github.swagger2markup:swagger2markup-spring-restdocs-ext:1.0.0-SNAPS
    -

    Example: /snippets/addPet/http-request.adoc.

    +

    The following Unit Test uses Spring RestDocs to tests the /pets endoint and writes the example files into the build/snippets folder. Have a look at the Spring Boot Demo for a full example using Spring Boot, Springfox and Spring RestDocs.

    +
    +
    +
    +
    @Rule
    +public final RestDocumentation restDocumentation = new RestDocumentation("build/snippets");
    +
    +@Test
    +public void addAPetToTheStore() throws Exception {
    +  this.mockMvc.perform(post("/pets/").content(createPet())
    +    .contentType(MediaType.APPLICATION_JSON))
    +    .andDo(document("addPet", preprocessResponse(prettyPrint())))
    +    .andExpect(status().isOk());
    +}
    +
    +
    +
    +

    Example: build/snippets/addPet/http-request.adoc.

    @@ -2353,22 +2378,54 @@ swagger2markup.outputLanguage=DE
    -

    10. Contributing

    +

    10. Spring Boot Demo

    +
    +
    +

    The quickest way to get started is to look at the demo project spring-swagger2markup-demo. The demo shows how to generate static docs (HTML5 and PDF) with the Swagger2Markup Gradle Plugin and serve them as static content in a Spring Boot App under http://localhost:9080/docs/index.html and http://localhost:9080/docs/index.pdf.

    +
    +
    +

    10.1. Full example

    +
    +

    If you want to start the Spring Boot application, please run:

    +
    +
    +
    +
    gradlew clean build
    +
    +
    +
    +
    +
    java -jar build/libs/spring-swagger2markup-demo-{project-version}.jar
    +
    +
    +
    +

    If you only want to generate the HTML and PDF documentation, please run:

    +
    +
    +
    +
    gradlew clean asciidoctor
    +
    +
    +
    +
    +
    +
    +

    11. Contributing

    -

    10.1. Questions

    +

    11.1. Questions

    You can ask questions about Swagger2Markup in Gitter.

    -

    10.2. Bugs

    +

    11.2. Bugs

    If you believe you have found a bug, please take a moment to search the existing issues. If no one else has reported the problem, please open a new issue that describes the problem in detail and, ideally, includes a test that reproduces it.

    -

    10.3. Enhancements

    +

    11.3. Enhancements

    If you’d like an enhancement to be made to Swagger2Markup, pull requests are most welcome. The source code is on GitHub. You may want to search the existing issues and pull requests to see if the enhancement is already being worked on. You may also want to open a new issue to discuss a possible enhancement before work on it begins.

    @@ -2376,7 +2433,7 @@ swagger2markup.outputLanguage=DE
    -

    11. License

    +

    12. License

    Copyright 2016 Robert Winkler

    @@ -2398,7 +2455,7 @@ swagger2markup.outputLanguage=DE