Method and device for interface document generation, computer device, and storage medium

A document generation and interface technology, which is applied in the computer field, can solve the problems of low efficiency, time-consuming and labor-intensive interface documents, and the inability to realize automatic collection, etc., and achieve the effect of improving generation efficiency

CN108932122APending Publication Date: 2018-12-04WEIKUN (SHANGHAI) TECH SERVICE CO LTD
4 Cites 15 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Publication Date
2018-12-04

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention relates to a method and a device for interface document generation, a computer device, and a storage medium. The method comprises: obtaining a code file, traversing classes of a plurality of interfaces recorded in the code file, and obtaining code annotation information corresponding to the currently traversed classes; finding a global parameter in the currently traversed class, andobtaining global parameter information from definition of the global parameter in the class and the code annotation information corresponding to the class; by traversing class methods in the classes,reflecting all interfaces contained in the classes, obtaining interface information of each interface from a method body corresponding to the traversed class method and the code annotation informationcorresponding to the class; adding the global parameter information to the interface information of all interfaces and writing the obtained interface information to an interface document. The methodcan automatically collect interface information and effectively improve generation efficiency of the interface documents.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The present application relates to the field of computer technology, in particular to a method, device, computer equipment and storage medium for generating an interface document. Background technique

[0002] In the process of system development and system upgrade development, developers need to pre-agree on interface specifications and reflect the interface specifications in the form of interface documents. The traditional ways of generating interface documents include the following:

[0003] Manual writing: Developers manually write interface documents during the development process. Obviously, this method of manually writing and modifying interface documents is time-consuming and poorly standardized.

[0004] With the help of tools: The generation of interface documents with the help of tools usually provides standardized formats for the tools. Users input interface information into the tools, and the tools generate standardized documents based o...

Examples

Embodiment Construction

[0046] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be described in further detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not intended to limit the present application.

[0047] The interface document generation method provided by this application can be applied to such as figure 1 shown in the application environment. Wherein, the terminal 102 communicates with the server 104 through the network. The terminal 102 is used to provide a user operation interface, and sends an interface document generation request to the server 104. The server 104 pulls the source code file of the system for analysis, collects source code annotation information, obtains all interfaces and global parameters contained in the source code file by traversing clas...