Interface specification, fault tolerance rules, the rule data backup APH

Before the words: before and after decoupling, the use of front-end development aspects of APH, background development aspects postman (can be considered as a background to do the aph background version)

 

1, api standard: identifier (ret: 1 is normal data, the interface 0 error), the data body (data: api data containers, all data must be placed at the interface where the normal), the error body (error: When the interface when the error, the error message accommodate)

2, api fault-tolerant processing interfaces, each interface to have three versions of the data and the background to this :( agreed standard, unified null processing, digital, rational use of empty string type data).

Distal fault tolerant rules: non-null compared to normal data, the normal processing, fault tolerance and take all null (0 so distinguish numeric, string type '')

(1) Data interface api each have at least three versions: 1, the health data (field data is complete for all interfaces, compliance type); 2, malformed data (partial data morbid, pathological data agreed with the unified background to null identification, see null do fault tolerance); 3, given data interfaces, interface typically ret 0

Guess you like

Origin www.cnblogs.com/liujinyu/p/11031725.html
Recommended