CN109032663A - Generation method, device, computer equipment and the storage medium of interface document - Google Patents
Generation method, device, computer equipment and the storage medium of interface document Download PDFInfo
- Publication number
- CN109032663A CN109032663A CN201810746699.4A CN201810746699A CN109032663A CN 109032663 A CN109032663 A CN 109032663A CN 201810746699 A CN201810746699 A CN 201810746699A CN 109032663 A CN109032663 A CN 109032663A
- Authority
- CN
- China
- Prior art keywords
- information
- interface
- record sheet
- entity class
- annotation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/73—Program documentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/169—Annotation, e.g. comment data or footnotes
Abstract
The invention discloses a kind of generation method of interface document, device, computer equipment and storage mediums, this method comprises: obtaining the corresponding code file of genealogical classification name;It scans the Controller interface in the code file and obtains the annotation information of the entity class to obtain the entity class in the interface recalls information and annotation information and the code file of the Controller interface;Interface, which is generated, according to the interface recalls information and annotation information records information;Obtain entering to join information and entering to join the return information of information in response to described for the Controller interface;Information is recorded based on the interface, is generated according to the annotation information for entering to join information and the entity class of the Controller interface into ginseng information record sheet, and return information record sheet is generated according to the annotation information of the return information and the entity class;Enter to join information record sheet and return information record sheet generation interface document according to described.The communication for thereby facilitating the developer of front and back end improves the development efficiency of software systems.
Description
Technical field
The present invention relates to Internet technical fields more particularly to a kind of generation method of interface document, device, computer to set
Standby and storage medium.
Background technique
Currently, with the development of mobile internet and the demand of client, Internet enterprises need to provide support
The multiple clients such as Android, IOS, Web, mobile phone Wap and wechat provide service for user, therefore front and back end separation is opened
Hair mode becomes the development mode of mainstream.The development mode of front and back end separation is more advantageous to the cooperation of large software system exploitation
The division of labor, improve development rate, but also bring multiple users (front end developer, backstage developer and tester) it
Between communication it is inconvenient.How to guarantee the developer at different ends or accuracy and communication efficiency that tester links up, becomes
Most of Internet company's urgent need to solve the problems.It is above-mentioned to solve it is therefore desirable to provide a kind of generation method of interface document
Problem.
Summary of the invention
The present invention provides a kind of generation method of interface document, device, computer equipment and storage mediums, it is intended to improve
The efficiency of software development.
The present invention provides a kind of generation methods of interface document comprising:
Obtaining the corresponding code file of genealogical classification name, the code file includes Controller interface and entity class,
The Controller interface and entity class include preset annotation information;
The Controller interface in the code file is scanned to obtain the interface of Controller interface calling
Information and annotation information, and the entity class in the code file is scanned to obtain the annotation information of the entity class;
Interface, which is generated, according to the interface recalls information and annotation information records information;
Obtain entering to join information and entering to join the return information of information in response to described for the Controller interface;
Information is recorded based on the interface, according to the note for entering to join information and the entity class of the Controller interface
It releases information to generate into ginseng information record sheet, and is generated according to the annotation information of the return information and the entity class and return to letter
Cease record sheet;
Enter to join information record sheet and return information record sheet generation interface document according to described.
The present invention provides a kind of generating means of interface document comprising:
File obtaining unit, for obtaining the corresponding code file of genealogical classification name, the code file includes
Controller interface and entity class, the Controller interface and entity class include preset annotation information;
Acquiring unit is scanned, is obtained for scanning the Controller interface in the code file described
Entity class in the interface recalls information and annotation information of Controller interface, and the scanning code file is to obtain
State the annotation information of entity class;
Information generating unit records information for generating interface according to the interface recalls information and annotation information;
Information acquisition unit, for obtain the Controller interface enter to join information and in response to it is described enter ginseng believe
The return information of breath;
Record sheet generation unit enters ginseng according to the Controller interface for recording information based on the interface
Information and the annotation information of the entity class are generated into ginseng information record sheet, and according to the return information and the entity class
Annotation information generate return information record sheet;
Document structure tree unit generates interface document for entering to join information record sheet and return information record sheet according to.
The present invention also provides a kind of computer equipments comprising memory, processor and is stored on the memory
And the computer program that can be run on the processor, the processor realize provided by the invention when executing described program
The step of generation method of the interface document for embodiment of anticipating.
The present invention also provides a kind of storage mediums, wherein the storage medium is stored with computer program, the calculating
Machine program make when being executed by processor the processor execute any embodiment provided by the invention interface document generation side
The step of method.
The embodiment of the invention provides the generation method of interface document, device, computer equipment and storage mediums, by obtaining
Take the corresponding code file of genealogical classification name, the code file includes Controller interface and entity class, described
Controller interface and entity class include preset annotation information;Scan the Controller interface in the code file
To obtain the entity in the interface recalls information and annotation information of the Controller interface, and the scanning code file
Class is to obtain the annotation information of the entity class;Interface, which is generated, according to the interface recalls information and annotation information records information;
Obtain entering to join information and entering to join the return information of information in response to described for the Controller interface;Based on the interface
Information is recorded, is generated according to the annotation information for entering to join information and the entity class of the Controller interface into ginseng information note
Table is recorded, and return information record sheet is generated according to the annotation information of the return information and the entity class;According to it is described enter
Join information record sheet and return information record sheet generates interface document.The interface document that this method generates facilitates opening for front and back end
The communication of hair personnel which thereby enhances the development efficiency of software systems.
Detailed description of the invention
Technical solution in order to illustrate the embodiments of the present invention more clearly, below will be to needed in embodiment description
Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, general for this field
For logical technical staff, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of schematic flow diagram of the generation method for interface document that one embodiment of the invention provides;
Fig. 2 be another embodiment of the present invention provides a kind of interface document generation method schematic flow diagram;
Fig. 3 is a kind of schematic flow diagram of the generation method for interface document that further embodiment of this invention provides;
Fig. 4 is a kind of schematic block diagram of the generating means for interface document that one embodiment of the invention provides;
Fig. 5 is a kind of schematic block diagram for computer equipment that one embodiment of the invention provides.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair
Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, shall fall within the protection scope of the present invention.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " and "comprising" instruction
Described feature, entirety, step, operation, the presence of element and/or component, but one or more of the other feature, whole is not precluded
Body, step, operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this description of the invention merely for the sake of description specific embodiment
And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on
Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is
Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
Referring to Fig. 1, Fig. 1 is a kind of exemplary flow of the generation method for interface document that one embodiment of the invention provides
Figure.The generation method of the interface document can be applied in server, as shown in Figure 1, the generation method include step S101~
S106。
S101, the corresponding code file of genealogical classification name is obtained, the code file includes Controller interface and reality
Body class, the Controller interface and entity class include preset annotation information.
In the present embodiment, title corresponding to the system software of the entitled User Exploitation of the genealogical classification, for example authenticate
Service software, the corresponding entitled authentication service of genealogical classification.The authentication service software will include code file, the code file
It is stored in micro services system.Wherein the code file includes Controller interface and entity class, and the Controller connects
Mouth and entity class include preset annotation information, and preset annotation information is the parameter letter that developer adds on entity class
Breath annotation and the interface message annotation added on Controller interface.
For example, parameter information annotation can be added when developer writes the code of entity class on entity category code, it should
Parameter information annotation includes the meaning description of each attribute and is discussed in detail, such as: the user type attribute in account information can
To add annotation information :@ApiField (name=" user type ", remark=" 1: ordinary user, 2:client ").It indicates
Meaning of parameters is user type, which kind user type remark information includes.
Again for example, interface message annotation can be added in Controller interface code, interface message annotation indicates
The description information and remark information of interface.Such as:
@RequestMapping("/login")
@ApiMethod (name=" login ", requires={ " userId ", " password ", " type " }, open=
true)
publicAccessToken login(@RequestBodyUserAccountuser)
Logging in and adding ApiMethod annotation expression interface function in interface Controller interface code is login system,
User account, password, type are required item.
In one embodiment, before the corresponding code file of the acquisition genealogical classification name, further includes: receive terminal hair
The document structure tree instruction sent, document structure tree instruction finger generated for the genealogical classification name that the terminal is inputted according to user
It enables.Specifically, can display interface document interface in the terminal, include systematic name input frame in the interface document interface, when with
Family automatically generates document control in click in the systematic name input frame input system systematic name, such as after input " authentication service "
Document structure tree instruction is then generated according to the genealogical classification name when part and is sent to server.The document that server receiving terminal is sent is raw
At instruction, genealogical classification name is obtained from document structure tree instruction, and obtains the corresponding code text of the genealogical classification name
Part.
Wherein, terminal obtains the genealogical classification name that user inputs in systematic name input frame;And according to the genealogical classification name
Obtain System describe information, such as Service name and description etc.;Document is generated according to the genealogical classification name and System describe information
Generation task, display the document generate task, wherein include edit control, automatic document generation space in the document generation task
With remove document control etc., thus facilitate user to handle by interface document of the terminal to generation, which thereby enhance user
Experience.
S102, the Controller interface in the code file is scanned to obtain the interface of the Controller interface
Recalls information and annotation information, and the entity class in the code file is scanned to obtain the annotation information of the entity class.
In the present embodiment, specifically the Controller in the code file is scanned according to the first preset keyword to connect
Mouthful to obtain the interface recalls information and annotation information of the Controller interface;And it is scanned according to the second preset keyword
Entity class in the code file is to obtain the annotation information of the entity class.Wherein, first preset keyword is such as
For@ApiField;Second preset keyword is such as@ApiMethod, naturally it is also possible to use other customized keys
Word.Wherein, the interface recalls information is specially URL link address, for example is /oauth-service/menu/update.Institute
The annotation information for stating Controller interface is that the interface message that developer adds on Controller interface annotates.It is described
The annotation information of entity class is the parameter information annotation that developer adds on entity class.
S103, interface record information is generated according to the interface recalls information and annotation information.
In the present embodiment, the interface recalls information is specially URL link address, according to the interface recalls information and
Annotation information generates interface and records information, and interface record information includes URL link address and interface message description etc..
In one embodiment, described that interface record information is generated according to the interface recalls information and annotation information, specifically
It include: that key message is determined from the annotation information of Controller interface;According to determining key message and the URL link
Address generates interface message record, which records such as are as follows: modification menu POST/oauth2-service/menu/
update.Certain interface record information further includes URL link address and interface message description etc..
S104, entering to join information and entering to join the return of information and believe in response to described for the Controller interface is obtained
Breath.
In the present embodiment, user is obtained for the required parameter of Controller interface input and to the request
What parameter was responded returns the result.User is directed to the required parameter of Controller interface input, such as login system
User's name, login password or identifying code of input etc. return the result user's name and login password including inputting to user
Verification result is carried out, which includes authentication failed and be proved to be successful.
S105, information is recorded based on the interface, enters to join information and the entity according to the Controller interface
The annotation information of class is generated into ginseng information record sheet, and is generated according to the annotation information of the return information and the entity class
Return information record sheet.
In the present embodiment, the interface recalls information includes URL link address, is based on the URL link address, according to
The annotation information of the Controller interface, the annotation information generation and the URL link for entering to join information and the entity class
Address is corresponding to enter to join information record sheet, and according to the annotation information of the return information and the entity class generate with it is described
The corresponding return information record sheet in URL link address.
Specifically, it is determined that the first preset recording table;It will be corresponding the URL link address will to be accessed by Controller interface
The annotation information for entering to join information and entity class be indexed to the relevant position of the first preset recording table;And it will be described
The annotation information of Controller interface is indexed to the first preset recording table, and to generate, the URL link address is corresponding to enter to join letter
Record sheet is ceased, it is as shown in table 1 that this enters to join information record sheet.Determine the second preset recording table;Enter to join information in response to described by logical
Return information and the annotation information of entity class be indexed to the relevant position of the second preset recording table;And it will be described
The annotation information of Controller interface is indexed to the first preset recording table to generate return corresponding with the URL link address
Information record sheet, the return information record sheet are as shown in table 2.
1, menu POST/oauth2-service/menu/update is modified
Table 1 is into joining information record sheet
Table 2 is return information record sheet
Wherein, the interface recalls information may include multiple URL link addresses, it is possible thereby to generate and URL link address
It is corresponding to enter to join information record sheet and return information record sheet, such as table 3 and table 4.Thus the interface document may include multiple
Join information record sheet and return information record sheet.
2, client user interface permission is deleted based on Id
POST/oauth2-service/useraccounturl/deletebyid
Table 3 is into joining information record sheet
Table 4 is return information record sheet
S106, enter to join information record sheet and return information record sheet generation interface document according to.
In the present embodiment, enter to join information record sheet and the preservation of return information record sheet in the same document by described
Generate interface document.It is understood that the interface document may include it is multiple enter join information record sheet and return information record
Table.
The method of above-described embodiment is by obtaining the corresponding code file of genealogical classification name;It scans in the code file
Controller interface is to obtain the interface recalls information and annotation information of the Controller interface, and scans the generation
Entity class in code file is to obtain the annotation information of the entity class;It is generated according to the interface recalls information and annotation information
Interface records information;Obtain the Controller interface enter to join information and in response to it is described enter join information return believe
Breath;Information is recorded based on the interface, is believed according to the annotation for entering to join information and the entity class of the Controller interface
Breath is generated into ginseng information record sheet, and generates return information note according to the annotation information of the return information and the entity class
Record table;Enter to join information record sheet and return information record sheet generation interface document according to described.The interface document that this method generates
The communication for facilitating the developer of front and back end which thereby enhances the development efficiency of software systems.
Referring to Fig. 2, Fig. 2 be another embodiment of the present invention provides a kind of interface document generation method exemplary flow
Figure.As shown in Fig. 2, the generation method includes step S201~S209.Wherein step S201~S206 in the present embodiment with it is upper
Step S101~S106 the completion for stating embodiment is identical, in order to illustrate the terseness of book, is not described in detail herein.
S201, the corresponding code file of the genealogical classification name is obtained, the code file includes Controller interface
And entity class, the Controller interface and entity class include preset annotation information.
S202, the Controller interface in the code file is scanned to obtain the interface of the Controller interface
Recalls information and annotation information, and the entity class in the code file is scanned to obtain the annotation information of the entity class.
S203, interface record information is generated according to the interface recalls information and annotation information.
S204, entering to join information and entering to join the return of information and believe in response to described for the Controller interface is obtained
Breath.
S205, information is recorded based on the interface, enters to join information and the entity according to the Controller interface
The annotation information of class is generated into ginseng information record sheet, and is generated according to the annotation information of the return information and the entity class
Return information record sheet.
S206, enter to join information record sheet and return information record sheet generation interface document according to.
In the present embodiment, after entering to join information record sheet and return information record sheet generation interface text according to,
Further include: shelves save the interface document into preset cache database, and the presetting database includes MongoDB system.
The response speed that the generation of document can be improved by preset cache database which thereby enhances the experience of user.
S207, receiving interface debugging instruction, the interface debugging instruction includes genealogical classification name.
In the present embodiment, an interface debugging interface can be shown by terminal, interface debugging Interface classification name input
Frame and inquiry control, when user has input genealogical classification name in the systematic name input frame, for example the genealogical classification inputted is entitled
" authentication service ", and click inquiry control, then interface debugging instruction is generated, and interface debugging instruction is sent to server.
S208, corresponding interface document is searched according to the genealogical classification name, phase is obtained according to the interface document found
The URL link address answered.
In the present embodiment, interface corresponding with the genealogical classification name is searched according to the genealogical classification name of user's input
Document, for example find authentication service interface document, then obtain the URL link address in authentication service interface document.
S209, the URL link address and the interface document are sent to terminal, so that described in the terminal shows
The URL link address that URL link address and user choose it is corresponding enter join information record sheet and return information record sheet so as to
The user carries out interface debugging.
In the present embodiment, the URL link address obtained from the interface document found and the interface document are sent
To terminal, enter to join information so that the terminal shows that URL link address that the URL link address and user are chosen is corresponding
Record sheet and return information record sheet, so that the user enters to join information record sheet according to this and return information record sheet connects
Mouth debugging.
In addition, on the basis of the above embodiments, such as scheming to record debugging result and the real-time update interface document
It further include step S211 and S212 shown in 3.Wherein, the debugging result information that S211, the reception terminal are fed back, the debugging
Result information includes label information;S212, the interface document according to the debugging result information update, and according to the label
Updated interface document is marked in information.So that subsequent user is checked.
Fig. 4 is a kind of schematic block diagram of the generating means of interface document provided in an embodiment of the present invention.As shown in figure 4,
Corresponding to the generation method of the above interface document, the present invention also provides a kind of generating means of interface document.The interface document
Generating means include the unit for executing the generation method of above-mentioned interface document, which can be configured in server.
As shown in figure 4, the generating means 400 include: the first receiving unit 401, file obtaining unit 402, scanning acquiring unit 403,
Information generating unit 404, information acquisition unit 405, record sheet generation unit 406, document structure tree unit 407, second receive single
Member 408 searches acquiring unit 409, sends display unit 410, feedback reception unit 411 and update mark unit 412.
First receiving unit 401, for receiving the document structure tree instruction of terminal transmission, the document structure tree instruction is described
Genealogical classification name that terminal is inputted according to user and the instruction generated.
File obtaining unit 402, for obtaining the corresponding code file of genealogical classification name, the code file includes
Controller interface and entity class, the Controller interface and entity class include preset annotation information.
Acquiring unit 403 is scanned, is obtained for scanning the Controller interface in the code file described
Entity class in the interface recalls information and annotation information of Controller interface, and the scanning code file is to obtain
State the annotation information of entity class.
Information generating unit 404 records information for generating interface according to the interface recalls information and annotation information.
Information acquisition unit 405, for obtain the Controller interface enter to join information and in response to it is described enter
Join the return information of information.
Record sheet generation unit 406, for recording information based on the interface, according to entering for the Controller interface
Ginseng information and the annotation information of the entity class are generated into ginseng information record sheet, and according to the return information and the entity
The annotation information of class generates return information record sheet.
Document structure tree unit 407 generates interface text for entering to join information record sheet and return information record sheet according to
Shelves.
Second receiving unit 408 is used for receiving interface debugging instruction, and the interface debugging instruction includes genealogical classification name.
Acquiring unit 409 is searched, for searching corresponding interface document according to the genealogical classification name, according to what is found
Interface document obtains corresponding URL link address.
Display unit 410 is sent, for the URL link address and the interface document to be sent to terminal, so that institute
State that URL link address that terminal shows that the URL link address and user are chosen is corresponding to enter to join information record sheet and return
Information record sheet carries out interface debugging so as to the user.
Feedback reception unit 411, for receiving the debugging result information of the terminal feedback, the debugging result packet
Include label information.
Update mark unit 412 is used for the interface document according to the debugging result information update, and according to the mark
Updated interface document is marked in label information.
It is apparent to those skilled in the art that for convenience of description and succinctly, foregoing description connects
The mouth generating means of document and the specific work process of unit, can refer to corresponding processes in the foregoing method embodiment, herein
It repeats no more.
Referring to Fig. 5, Fig. 5 is a kind of schematic block diagram of computer equipment provided in an embodiment of the present invention.The computer
Equipment 500 can be server.
Referring to Fig. 5, which includes processor 520, memory and the net connected by system bus 510
Network interface 550, wherein memory may include non-volatile memory medium 530 and built-in storage 540.
The non-volatile memory medium 530 can storage program area 531 and computer program 532.The computer program 532
It is performed, processor 520 may make to execute the generation method of any one interface document.
The processor 520 supports the operation of entire computer equipment 500 for providing calculating and control ability.
The built-in storage 540 provides environment for the operation of the computer program 532 in non-volatile memory medium 530, should
When computer program 532 is executed by processor 520, processor 520 may make to execute the generation method of any one interface document.
The network interface 550 such as sends the task dispatching of distribution for carrying out network communication.Those skilled in the art can manage
It solves, structure shown in Fig. 5, only the block diagram of part-structure relevant to the present invention program, is not constituted to present invention side
The restriction for the computer equipment 500 that case is applied thereon, specific computer equipment 500 may include more than as shown in the figure
Or less component, perhaps combine certain components or with different component layouts.Wherein, the processor 520 is for transporting
Row program code stored in memory, to realize following steps:
Obtaining the corresponding code file of genealogical classification name, the code file includes Controller interface and entity class,
The Controller interface and entity class include preset annotation information;Scan the Controller in the code file
Interface is to obtain the interface recalls information and annotation information of the Controller interface, and scans in the code file
Entity class is to obtain the annotation information of the entity class;Interface record letter is generated according to the interface recalls information and annotation information
Breath;Obtain entering to join information and entering to join the return information of information in response to described for the Controller interface;Based on described
Interface records information, is generated according to the annotation information for entering to join information and the entity class of the Controller interface into ginseng letter
Record sheet is ceased, and return information record sheet is generated according to the annotation information of the return information and the entity class;According to institute
It states and generates interface document into ginseng information record sheet and return information record sheet.
In one embodiment, the processor 520 is swept described in program code realization stored in memory for running
The Controller interface in the code file is retouched to obtain the interface recalls information and annotation of the Controller interface
Information, when scanning annotation information of the entity class in the code file to obtain the entity class, step specific as follows:
It is described to obtain to scan the Controller interface in the code file according to the first preset keyword
The interface recalls information and annotation information of Controller interface;And the code file is scanned according to the second preset keyword
In entity class to obtain the annotation information of the entity class.
In one embodiment, the processor 520 obtains described in program code realization stored in memory for running
Before taking the corresponding code file of genealogical classification name, also perform the steps of
The document structure tree instruction that terminal is sent is received, the document structure tree instruction is according to what user inputted for the terminal
System systematic name and the instruction that generates.
In one embodiment, the interface recalls information includes URL link address;The processor 520 is deposited for running
The program code of storage in memory is based on interface record information described in realizing, according to entering for the Controller interface
Ginseng information and the annotation information of the entity class are generated into ginseng information record sheet, and according to the return information and the entity
When the annotation information of class generates return information record sheet, step specific as follows:
Based on the URL link address, according to the annotation information of the Controller interface, enter to join information and the reality
The annotation information generation of body class is corresponding with the URL link address to be entered to join information record sheet, and according to the return information
Return information record sheet corresponding with the URL link address is generated with the annotation information of the entity class.
In one embodiment, the processor 520 realizes described for running program code stored in memory
Enter to join after information record sheet and return information record sheet generate interface document according to described, also realization following steps:
Receiving interface debugging instruction, the interface debugging instruction includes genealogical classification name;It is looked into according to the genealogical classification name
Corresponding interface document is looked for, corresponding URL link address is obtained according to the interface document found;By the URL link address
It is sent to terminal with the interface document, so that the terminal shows the URL link that the URL link address and user are chosen
Address is corresponding to enter to join information record sheet and return information record sheet so that the user carries out interface debugging.
In one embodiment, the processor 520 realizes described incite somebody to action for running program code stored in memory
The URL link address and the interface document are sent to after terminal, also realization following steps:
The debugging result information of the terminal feedback is received, the debugging result information includes label information;According to described
Interface document described in debugging result information update, and updated interface document is marked according to the label information.
In one embodiment, the processor 520 realizes described for running program code stored in memory
Enter to join after information record sheet and return information record sheet generate interface document according to described, also realization following steps:
The interface document is saved into preset cache database, the presetting database includes MongoDB system.
It should be appreciated that in embodiments of the present invention, processor 520 can be central processing unit (Central
ProcessingUnit, CPU), which can also be other general processors, digital signal processor (Digital
Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit,
ASIC), ready-made programmable gate array (Field-Programmable GateArray, FPGA) or other programmable logic devices
Part, discrete gate or transistor logic, discrete hardware components etc..Wherein, general processor can be microprocessor or
The processor is also possible to any conventional processor etc..
It will be understood by those skilled in the art that 500 structure of computer equipment shown in Fig. 5 is not constituted and is set to computer
Standby 500 restriction may include perhaps combining certain components or different component cloth than illustrating more or fewer components
It sets.
Those of ordinary skill in the art will appreciate that be realize above-described embodiment method in all or part of the process, be
Relevant hardware can be instructed to complete by computer program, computer program can be stored in a storage medium, this is deposited
Storage media is computer readable storage medium.In the embodiment of the present invention, which can be stored in computer system
It in storage medium, and is executed by least one processor in the computer system, includes the reality such as above-mentioned each method with realization
Apply the process step of example.
The computer readable storage medium can be magnetic disk, CD, USB flash disk, mobile hard disk, read-only memory (ROM, Read-
Only Memory), the various media that can store program code such as magnetic or disk.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware
With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This
A little functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Specially
Industry technical staff can use different methods to achieve the described function each specific application, but this realization is not
It is considered as beyond the scope of this invention.
In several embodiments provided by the present invention, it should be understood that the generating means of disclosed interface document and
Method may be implemented in other ways.For example, the generating means embodiment of interface document described above is only to show
Meaning property.For example, the division of each unit, only a kind of logical function partition, can there is other division in actual implementation
Mode.Such as multiple units or components can be combined or can be integrated into another system, or some features can be ignored, or
It does not execute.
The steps in the embodiment of the present invention can be sequentially adjusted, merged and deleted according to actual needs.
Unit in the device of that embodiment of the invention can be combined, divided and deleted according to actual needs.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, is also possible to two or more units and is integrated in one unit.It is above-mentioned integrated
Unit both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product,
It can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention substantially or
Person says that all or part of the part that contributes to existing technology or the technical solution can body in the form of software products
Reveal and, which is stored in a storage medium, including some instructions are with so that a computer is set
Standby (can be personal computer, terminal or the network equipment etc.) execute each embodiment the method for the present invention whole or
Part steps.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in various equivalent modifications or replace
It changes, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right
It is required that protection scope subject to.
Claims (10)
1. a kind of generation method of interface document characterized by comprising
Obtain the corresponding code file of genealogical classification name, the code file includes Controller interface and entity class, described
Controller interface and entity class include preset annotation information;
The Controller interface in the code file is scanned to obtain the interface recalls information of the Controller interface
And annotation information, and the entity class in the code file is scanned to obtain the annotation information of the entity class;
Interface, which is generated, according to the interface recalls information and annotation information records information;
Obtain entering to join information and entering to join the return information of information in response to described for the Controller interface;
Information is recorded based on the interface, is believed according to the annotation for entering to join information and the entity class of the Controller interface
Breath is generated into ginseng information record sheet, and generates return information note according to the annotation information of the return information and the entity class
Record table;
Enter to join information record sheet and return information record sheet generation interface document according to described.
2. the generation method of interface document according to claim 1, which is characterized in that in the scanning code file
Controller interface to obtain the interface recalls information and annotation information of the Controller interface, scan the code
Entity class in file is to obtain the annotation information of the entity class, comprising:
The Controller interface in the code file is scanned according to the first preset keyword to obtain the Controller
The interface recalls information and annotation information of interface;And
The entity class in the code file is scanned according to the second preset keyword to obtain the annotation information of the entity class.
3. the generation method of interface document according to claim 1, which is characterized in that right in the acquisition genealogical classification name
Before the code file answered, further includes:
The document structure tree instruction that terminal is sent is received, the document structure tree instruction is the system point that the terminal is inputted according to user
Class name and the instruction generated.
4. the generation method of interface document according to claim 1, which is characterized in that the interface recalls information includes
URL link address;It is described that information is recorded based on the interface, enter to join information and the reality according to the Controller interface
The annotation information of body class is generated into ginseng information record sheet, and raw according to the annotation information of the return information and the entity class
At return information record sheet, comprising:
Based on the URL link address, according to the annotation information of the Controller interface, enter to join information and the entity class
Annotation information generate it is corresponding with the URL link address enter to join information record sheet, and according to the return information and institute
The annotation information for stating entity class generates return information record sheet corresponding with the URL link address.
5. the generation method of interface document according to claim 4, which is characterized in that enter to join information according to described
Record sheet and return information record sheet generate after interface document, further includes:
Receiving interface debugging instruction, the interface debugging instruction includes genealogical classification name;
Corresponding interface document is searched according to the genealogical classification name, corresponding URL chain is obtained according to the interface document found
It is grounded location;
The URL link address and the interface document are sent to terminal, so that the terminal shows the URL link address
And the URL link address chosen of user is corresponding enters to join information record sheet and return information record sheet so as to user progress
Interface debugging.
6. the generation method of interface document according to claim 5, which is characterized in that described by the URL link address
It is sent to after terminal with the interface document, further includes:
The debugging result information of the terminal feedback is received, the debugging result information includes label information;
According to interface document described in the debugging result information update, and according to the label information to updated interface document
It is marked.
7. the generation method of interface document according to claim 1, which is characterized in that enter to join information according to described
Record sheet and return information record sheet generate after interface document, further includes:
The interface document is saved into preset cache database, the presetting database includes MongoDB system.
8. a kind of generating means of interface document characterized by comprising
File obtaining unit, for obtaining the corresponding code file of genealogical classification name, the code file includes Controller
Interface and entity class, the Controller interface and entity class include preset annotation information;
Acquiring unit is scanned, is connect for scanning the Controller interface in the code file with obtaining the Controller
The interface recalls information and annotation information of mouth, and the entity class in the code file is scanned to obtain the note of the entity class
Release information;
Information generating unit records information for generating interface according to the interface recalls information and annotation information;
Information acquisition unit, for obtaining entering to join information and entering to join information in response to described for the Controller interface
Return information;
Record sheet generation unit enters to join information for recording information based on the interface according to the Controller interface
It generates with the annotation information of the entity class into ginseng information record sheet, and the note according to the return information and the entity class
It releases information and generates return information record sheet;
Document structure tree unit generates interface document for entering to join information record sheet and return information record sheet according to.
9. a kind of computer equipment, which is characterized in that including memory, processor and be stored on the memory and can be in institute
The computer program run on processor is stated, the processor is realized when executing the computer program as in claim 1 to 7
The step of any one the method.
10. a kind of storage medium, which is characterized in that the storage medium is stored with computer program, the computer program quilt
Processor executes the processor such as the step of claim 1 to 7 any one the method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810746699.4A CN109032663A (en) | 2018-07-09 | 2018-07-09 | Generation method, device, computer equipment and the storage medium of interface document |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810746699.4A CN109032663A (en) | 2018-07-09 | 2018-07-09 | Generation method, device, computer equipment and the storage medium of interface document |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109032663A true CN109032663A (en) | 2018-12-18 |
Family
ID=64640644
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810746699.4A Withdrawn CN109032663A (en) | 2018-07-09 | 2018-07-09 | Generation method, device, computer equipment and the storage medium of interface document |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109032663A (en) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110196733A (en) * | 2019-06-06 | 2019-09-03 | 深圳市伊欧乐科技有限公司 | A kind of default API document structure tree method, apparatus, equipment and storage medium |
CN110245030A (en) * | 2019-05-29 | 2019-09-17 | 北京字节跳动网络技术有限公司 | A kind of data service providing method, device, medium and electronic equipment |
CN110308930A (en) * | 2019-06-18 | 2019-10-08 | 广州华多网络科技有限公司 | Interface document generation method, device, computer equipment and storage medium |
CN110333847A (en) * | 2019-05-07 | 2019-10-15 | 重庆天蓬网络有限公司 | A kind of integrated approach that back end interface automatic document generates |
CN110968323A (en) * | 2019-11-27 | 2020-04-07 | 中国银行股份有限公司 | Method and system for automatically generating APP function code list of mobile terminal |
CN111309304A (en) * | 2020-02-11 | 2020-06-19 | 北京字节跳动网络技术有限公司 | Method, device, medium and electronic equipment for generating IDL file |
CN111414161A (en) * | 2020-03-27 | 2020-07-14 | 北京字节跳动网络技术有限公司 | Method, device, medium and electronic equipment for generating ID L file |
CN111767237A (en) * | 2019-04-25 | 2020-10-13 | 北京京东尚科信息技术有限公司 | Inter-module communication method and device |
WO2020215680A1 (en) * | 2019-04-25 | 2020-10-29 | 平安科技(深圳)有限公司 | Method and apparatus for automatically generating pojo class, and storage medium and computer device |
CN112783551A (en) * | 2021-01-21 | 2021-05-11 | 中信银行股份有限公司 | Interface document generation method of micro-service framework, electronic equipment and storage medium |
WO2021218976A1 (en) * | 2020-04-30 | 2021-11-04 | 华为技术有限公司 | Application processing method and apparatus, cloud environment, medium, and program product |
CN113760359A (en) * | 2020-06-29 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Data processing method, device, equipment and computer readable storage medium |
-
2018
- 2018-07-09 CN CN201810746699.4A patent/CN109032663A/en not_active Withdrawn
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020215680A1 (en) * | 2019-04-25 | 2020-10-29 | 平安科技(深圳)有限公司 | Method and apparatus for automatically generating pojo class, and storage medium and computer device |
CN111767237B (en) * | 2019-04-25 | 2022-11-08 | 北京京东尚科信息技术有限公司 | Inter-module communication method and device |
CN111767237A (en) * | 2019-04-25 | 2020-10-13 | 北京京东尚科信息技术有限公司 | Inter-module communication method and device |
CN110333847A (en) * | 2019-05-07 | 2019-10-15 | 重庆天蓬网络有限公司 | A kind of integrated approach that back end interface automatic document generates |
CN110245030A (en) * | 2019-05-29 | 2019-09-17 | 北京字节跳动网络技术有限公司 | A kind of data service providing method, device, medium and electronic equipment |
CN110245030B (en) * | 2019-05-29 | 2021-11-12 | 北京字节跳动网络技术有限公司 | Data service providing method, device, medium and electronic equipment |
CN110196733A (en) * | 2019-06-06 | 2019-09-03 | 深圳市伊欧乐科技有限公司 | A kind of default API document structure tree method, apparatus, equipment and storage medium |
CN110308930A (en) * | 2019-06-18 | 2019-10-08 | 广州华多网络科技有限公司 | Interface document generation method, device, computer equipment and storage medium |
CN110968323A (en) * | 2019-11-27 | 2020-04-07 | 中国银行股份有限公司 | Method and system for automatically generating APP function code list of mobile terminal |
CN110968323B (en) * | 2019-11-27 | 2023-06-20 | 中国银行股份有限公司 | Automatic generation method and system for APP function code list of mobile terminal |
CN111309304A (en) * | 2020-02-11 | 2020-06-19 | 北京字节跳动网络技术有限公司 | Method, device, medium and electronic equipment for generating IDL file |
CN111414161A (en) * | 2020-03-27 | 2020-07-14 | 北京字节跳动网络技术有限公司 | Method, device, medium and electronic equipment for generating ID L file |
CN111414161B (en) * | 2020-03-27 | 2023-05-12 | 北京字节跳动网络技术有限公司 | Method, device, medium and electronic equipment for generating IDL file |
WO2021218976A1 (en) * | 2020-04-30 | 2021-11-04 | 华为技术有限公司 | Application processing method and apparatus, cloud environment, medium, and program product |
CN113760359A (en) * | 2020-06-29 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Data processing method, device, equipment and computer readable storage medium |
WO2022002030A1 (en) * | 2020-06-29 | 2022-01-06 | 北京沃东天骏信息技术有限公司 | Data processing method, apparatus, and device, and computer readable storage medium |
CN112783551A (en) * | 2021-01-21 | 2021-05-11 | 中信银行股份有限公司 | Interface document generation method of micro-service framework, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109032663A (en) | Generation method, device, computer equipment and the storage medium of interface document | |
US11921873B1 (en) | Authenticating data associated with a data intake and query system using a distributed ledger system | |
US20200175223A1 (en) | Animating Edits to Documents | |
US7139761B2 (en) | Dynamic association of electronically stored information with iterative workflow changes | |
US8195714B2 (en) | Context instantiated application protocol | |
US8539346B2 (en) | Associating annotations with document families | |
US6832366B2 (en) | Application generator | |
US8838679B2 (en) | Providing state service for online application users | |
US9420068B1 (en) | Log streaming facilities for computing applications | |
US20050027803A1 (en) | Autonomic e-mail processing system and method | |
WO2019228034A1 (en) | Method and apparatus for data synchronization | |
CN111736775A (en) | Multi-source storage method, device, computer system and storage medium | |
US10372512B2 (en) | Method and apparatus for automatic processing of service requests on an electronic device | |
WO2018148926A1 (en) | Card-based information management method and system | |
US9876776B2 (en) | Methods for generating and publishing a web site based on selected items and devices thereof | |
WO2016154159A1 (en) | Providing interactive preview of content within communication | |
CN103049448A (en) | File management method and file management system | |
US9652739B2 (en) | User interface (UI) control for attestation process | |
US11620541B1 (en) | Custom use case framework in computer analytics system | |
US20180349269A1 (en) | Event triggered data retention | |
CN107948242A (en) | More service number template message sending methods and system | |
JP4847517B2 (en) | Automatic intranet service disclosure and service access | |
JP4454358B2 (en) | System monitoring work support system and support program | |
JP4630468B2 (en) | E-mail access system compatible with WWW browser and computer program used therefor | |
JP2023031223A (en) | Apparatus and method for supporting source code generation of software and program therefor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20181218 |