API document generation method and device, storage medium and computer equipment

A technology of computer equipment and computer programs, applied in the fields of methods and devices for generating API documents, storage media and computer equipment, can solve problems such as forgetting to update API documents, outdated actual functions, and API document descriptions that do not conform to existing API definitions, etc.

Inactive Publication Date: 2019-11-19
SHENZHEN SHUWEI MEDIA TECH CO LTD
View PDF3 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] Embodiments of the present invention provide a method and device for generating API documents, a storage medium, and computer equipment to solve the following problems in the prior art: since the API documents and their corresponding codes are separated, the management of API documents requires a dedicated person. To maintain, but in the development proces

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
  • API document generation method and device, storage medium and computer equipment
  • API document generation method and device, storage medium and computer equipment
  • API document generation method and device, storage medium and computer equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0024] see figure 1 , figure 1 It is an implementation flowchart of the method for generating an API document in the embodiment of the present invention. combine figure 2 It can be obtained that the method for generating an API document in the embodiment of the present invention includes the following steps:

[0025] Step S101: Obtain the target API code written by the developer, the target code comment and synchronization script corresponding to the target API code. Wherein, the synchronization script is a program that can be executed.

[0026] Step S102: Generate a target API document corresponding to the target API code according to the target code annotation and the synchronization script.

[0027] Wherein, the target API code, the target code comment and the synchronization script are written by the developer and stored in the target code database.

[0028] In this embodiment, optionally, generating a corresponding target API document according to the target code an...

Embodiment 2

[0037] see figure 2 , figure 2 It is a partial structural framework diagram of the device for generating API documents in the embodiment of the present invention. combine figure 2 It can be obtained that an API document generation device 100 according to the embodiment of the present invention includes:

[0038] The acquisition module 110 is configured to acquire the target API code written by the developer, the target code comment and the synchronization script corresponding to the target API code. Wherein, the synchronization script is a program that can be executed.

[0039] The generation module 120 is configured to generate a target API document corresponding to the target API code according to the target code annotation and the synchronization script.

[0040] Wherein, the target API code, the target code comment and the synchronization script are written by the developer and stored in the target code database.

[0041] In this embodiment, optionally, an executio...

Embodiment 3

[0045] see image 3 ,refer to image 3 It can be seen that a storage medium 10 in the embodiment of the present invention, the storage medium 10, such as: ROM / RAM, magnetic disk, optical disk, etc., has a computer program 11 stored thereon, and when the computer program 11 is executed Realize the method for generating API documents as described in the first embodiment. Since the method for generating the API document has been described in detail in Embodiment 1, the description will not be repeated here.

[0046] The API document generation method realized by the embodiment of the present invention obtains the target API code written by the developer, the target code comment corresponding to the target API code and the synchronization script, and according to the target code comment and the synchronization script The script generates the target API document corresponding to the target API code, which solves the following problems in the prior art: since the API document and ...

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 an API document generation method, a device, a storage medium and computer equipment. The API document generation method comprises the steps of acquiring a target API code compiled by a developer, a target code annotation corresponding to the target API code and a synchronization script; and generating a target API document corresponding to the target API code according tothe target code annotation and the synchronization script. According to the invention, the following problems in the prior art are solved. The API document is separated from the corresponding code. The management of API documents needs to be specially maintained by people. However, in the development process, we need to frequently modify the definition of the API and require the API document to besynchronously updated, but we often forget to update the API document. Therefore, the description of the API document does not accord with the definition of the existing API. The description of the API document falls behind the actual function of the current API.

Description

technical field [0001] The invention relates to the technical field of WEB application development, in particular to a method and device for generating an API document, a storage medium and computer equipment. Background technique [0002] API (Application Programming Interface, application programming interface) are some predefined functions, the purpose is to provide applications and developers with the ability to access a set of routines based on a piece of software or hardware, without having to access the source code, or understand the inner workings Mechanism details. The existing API document management method is: developers create API documents themselves, and write information such as API definitions and parameters. The specific implementation method of the prior art is: 1. Create a word document file; 2. Write the API definition, including the project name, the description of the API, the url address of the API, the parameters of the API and the response value of ...

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
IPC IPC(8): G06F8/73G06F16/178
CPCG06F8/73G06F16/178
Inventor 黄兴鲁
Owner SHENZHEN SHUWEI MEDIA TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products