Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Javadoc-based back-end interface document automatic generation method and apparatus

An automatic generation and interface technology, applied in the information field, can solve problems such as asynchrony, avoid rework, save time for writing interface documents, and improve development efficiency.

Inactive Publication Date: 2017-12-12
珠海牛角科技有限公司
View PDF3 Cites 30 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In view of the defects in the prior art, one of the purposes of the present invention is to provide a method for automatically generating back-end interface documents based on Javadoc. After all codes are changed, the interface documents can be fully automatically generated, which solves the problem that the past codes and manually written interface documents are out of sync. to improve the efficiency of business system development

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Javadoc-based back-end interface document automatic generation method and apparatus
  • Javadoc-based back-end interface document automatic generation method and apparatus
  • Javadoc-based back-end interface document automatic generation method and apparatus

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0029] Make the following conventions for Javadoc

[0030] 1. The first line of Javadoc is the comment name, which is used to describe the name of the class (directory) or interface; the second line is greater than or equal to the detailed description of the interface; add the @mutable tag to the Javadoc of the POJO class, indicating that the current POJO is a Polymorphic POJO means that there are multiple subclasses.

[0031] 2. Others follow the standard Javadoc, such as @param indicates the parameter, @return indicates the return value, and @throws indicates which exceptions are thrown by the interface.

[0032] Make the following conventions for the interface definition (Java code),

[0033] 1. The parameters of the interface contain special login user (user ID) parameters, and intelligently identify whether the interface requires login verification. Special parameter names such as: sessUid: indicates the currently logged in user ID; sessCompanyId: indicates the currentl...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a Javadoc-based back-end interface document automatic generation method. The method specifically comprises the following steps of defining interface information in an interface file; performing description on the interface information by adopting Javadoc: describing code annotation and interface; performing automatic identification by adopting AST code analysis: identifying an input parameter, a return value type, a URL and abnormal data of the interface; and according to a definition of the interface and standard Javadoc, fully automatically generating an interface document. Through the AST code analysis technology, the back-end interface document can be fully automatically generated after all codes are changed in combination with the definition of the interface according to the Javadoc; and front-end codes can be generated according to interface data, so that the problem of desynchrony of the codes and the manually written interface document in the past is solved, the time for writing the interface document is saved, the situation of reworking caused by the problem of desynchrony of the interface document and the codes can be avoided, and the business system development efficiency is improved.

Description

technical field [0001] The invention relates to the field of information technology, in particular to a method and device for automatically generating back-end interface documents. Background technique [0002] In the traditional way, the service interface document is manually written, according to the interface definition, the interface information is manually extracted, the data relationship is manually sorted out, and then according to the interface definition information, one field is extracted and written on the document. Each field needs to indicate the field name, field type, whether the field can be empty, the default value of the field, the sample value of the field, the description of the field, etc. in the document. In addition, fields can be divided into basic data types and complex structures. Complex structures may have multiple layers of nesting, and the depth may be as many as several layers. Interface documentation also needs to include error codes for each...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/44
CPCG06F8/31
Inventor 谭海潮
Owner 珠海牛角科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products