Generate client stubs & document your REST-API using Swagger & Spring by Johannes Fiala

preview_player
Показать описание

This session will show you how you can easily document your REST API's using Spring & Swagger.

It will show you how to use the Swagger-Spring integration in a Spring Boot application:

Setup a basic REST API using Spring-Boot together with Swagger-Springfox
Access and test the REST-API using the Swagger-UI client
Generate client code stubs for your language (e.g. Java, PHP, Python, ...) using Swagger-Codegen
Technology stack:

Spring/Spring Boot
Follow-up BOF: Thursday 21:00: Enhance existing REST APIs (e.g. Facebook Graph API) using Swagger/Spring: Access the Facebook Graph API directly with code completion & compile-time check
Рекомендации по теме
Комментарии
Автор

Q & A after the talk (not recorded):
*) Is JSR-303 supported?

*) Is it working with Spring-MVC as well?
Yes, you only need Spring MVC and the Swagger Springfox dependencies. It runs on e.g. Tomcat and Jboss EAP as well (without Spring Boot dependencies). You can also do "hybrid" development, using Spring-Boot for local development and package without Spring Boot dependencies for deployment.

*) Who is the company behind Swagger?
SmartBear acquired the Swagger API & tooling in March 2015 from Reverb Technologies.

johannes
Автор

Hi. Great video. I was thinking of using Swagger for my Rest Api documentation in spring boot. I just have a small doubt.
Will swagger generate documentation for @ControllerAdvice class? Because I am mostly using the advice to handle and return error codes.

mohammedsalmanshaikh
Автор

THANK YOU!!!! GREAT VIDEO!
Spent a looot of time looking for something like this.

I am facing issue with generating Base and Derived model classes.
For example I have model class BaseResource and ConcreteResource extends BaseResource.
However, after running the server, generated json just have all the BaseResource members inside ConcreteResource and have no mention of BaseResource in relation to the ConcreteResource.
I want to use swagger.json to generate typescript client. I can't, since the model is wrong.
Can you pleeeeaaase help me?

MrDianaSan
Автор

Close your eyes... boom .. it's Arnold Schwarzenegger

stasotiro
Автор

The munching sounds are terrible. Get some water man!

krystol
welcome to shbcf.ru