Swagger (a) basics

First, what is Swagger

Swagger is a RESTFUL interfaces, based on YAML, JSON language documents online automatically generated code is automatically generated by the tool.
Known as the world's most popular Api framework;
RESTful Api-line automatic document generation tools
run directly, you can test API interface online;
support for multiple languages: (Java, Php ...)
official website: https://swagger.io/

Second, the role of Swagger

API support for automatic generation of synchronization of online documents: Swagger after use may generate documents directly through the code, eliminating the need to manually write the interface documentation for programmers is very convenient, you can save time to write the document to learn new technologies.
Web page provides online testing API: light there is not enough documentation, Swagger generated document also supports online testing. Parameters and formats are set right, the corresponding input parameter values directly in the interface to test interface online.

Third, why use Swagger

Before and after the end of the separation
Vue + SpringBoot
the back end of the times: the front only manage a static page; html ==> backend. Template engine JSP => backend is the main
front and rear ends of split Times:
Dian backend: the backend control layer, service layer, the back-end data access layer [team]
Dian Front: front-end control layer, view layer [preceding] team
, forgery back-end data, json. Already exists, you do not need the back-end, pre-stage project is still able to run up
front and rear end Dian how to interact? ================> the API
, anterior independent, loosely
coupled; . The preceding paragraph may even be deployed on different servers;

Question:
front and back end integration FBI, front-end and back-end staff who can not do, "timely consultations to address this morning," eventually cause problems concentrated outbreak;
Solution:
First, specify the schema [] outline plan, updated in real time API, reduce integration the risk;
early years: Specifies the word planning documents;
before and after the end of the separation:
the front and rear end of the test the backend interface: postman
backend provides interfaces: the need for real-time updates of the latest news and changes!

Published 45 original articles · won praise 7 · views 924

Guess you like

Origin blog.csdn.net/qq_42222342/article/details/103838508