Giter Club home page Giter Club logo

springrestdoc's Introduction

TestDriven Documentation. SpringRestDocs. SpringFox. Swagger2Markup. Asciidoctor.

BOOT LOGO

Build Status star this repo fork this repo License: MIT

Test Driven Development is a new approach that was provided by spring rest docs framework.

It expands classical Test Driven Development by adding new phase - documentation. It allows to combine manually written documentation and autogenerated snippets from tests(mockmvc, restassured). You can be sure that your documentation is always up to date.

There results of built documentation are published to github pages: https://tsypuk.github.io/springrestdoc/

Projects

  • SpringFox Swagger.
  • SpringRestDocs.
  • AsciiDoctor is awesome.
  • Swagger2Markdown.

SpringFox

SpringFox allows us to integrate SpringBoot app with swagger documentation. To start using it, you need to:

  1. Add dependencies:
compile 'io.springfox:springfox-swagger2:2.6.1'
compile 'io.springfox:springfox-swagger-ui:2.6.1'
  1. Mark your SpringApplication.class with @EnableSwagger2 annotation
  2. Register @Bean Docket
  3. Mark your code with io.swagger.annotations

Now you have two more things in your application:

  1. The swagger specification in json form by address:
http://localhost:8080/v2/api-docs?group=Module API
  1. The swagger UI page followed by URL:
http://localhost:8080/swagger-ui.html

SpringRestDocs

AsciiDoctor is awesome

Example of how to use diagrams in our documentation.

Swagger2Markup

I'm showing the pipeline, that allows to migrate your project from swagger to asciidoc and start using spring rest docs Test Driven Documentation.

It can be done in two ways:

  1. Using swaggerToMarkUp maven/gradle plugins
  2. By using io.github.swagger2markup from tests.

This two flows are implemented.

Plus like bonus you can move your swagger resource to git markdown/ confluence wiki formats. See tests.

TODO ITEMS

  • Create springboot app for springfox (swagger annotations).
  • Create springboot app restdos.
  • Create springboot app ascidocisawsome. To show advanced features and diagrams.
  • Create springboot app swagger2markup. Migration.
  • Add build to static resource pdf/html in jar.
  • Internal/External Docs. public to git pages.

springrestdoc's People

Contributors

tsypuk avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.