CN115220697A - API development management method, device, vehicle and storage medium - Google Patents

API development management method, device, vehicle and storage medium Download PDF

Info

Publication number
CN115220697A
CN115220697A CN202210814206.2A CN202210814206A CN115220697A CN 115220697 A CN115220697 A CN 115220697A CN 202210814206 A CN202210814206 A CN 202210814206A CN 115220697 A CN115220697 A CN 115220697A
Authority
CN
China
Prior art keywords
document
api
database
target api
target
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.)
Pending
Application number
CN202210814206.2A
Other languages
Chinese (zh)
Inventor
闵峰瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Changan Automobile Co Ltd
Original Assignee
Chongqing Changan Automobile Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Chongqing Changan Automobile Co Ltd filed Critical Chongqing Changan Automobile Co Ltd
Priority to CN202210814206.2A priority Critical patent/CN115220697A/en
Publication of CN115220697A publication Critical patent/CN115220697A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/10Requirements analysis; Specification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/211Schema design and management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to an API development management method, device, vehicle and storage medium, wherein the method comprises the following steps: configuring an application programming adapter API specification document, a database specification document and a code generation document; generating a target API document based on the API standard document and a preset development requirement, and judging whether the target API document meets the API standard document; and if the target API document meets the API specification document, creating a database corresponding to the target API document based on the database specification document, and automatically generating a code corresponding to the target API document based on the code generation document and the database corresponding to the target API document. The API development management method controls the API through the online management platform, provides a method supporting configurability, dynamic and non-invasion, unifies documents and constructs projects, thereby ensuring the accuracy of the documents and codes, reducing the workload of technical personnel and improving the working efficiency.

Description

API development management method, device, vehicle and storage medium
Technical Field
The present disclosure relates to the field of computer software development technologies, and in particular, to a method and an apparatus for developing and managing an Application Programming Interface (API), a vehicle, and a storage medium.
Background
With the continuous development of the electric business in the internet industry, people are more and more exposed to the application in the process of ordinary commodity selection purchasing and consumption, and the requirement of continuous development and perfection of the application to meet the requirement of users is also implied. In the face of internet users and the increasing frequency of the internet users, the development code corresponding to the application is overlapped continuously.
In the related art, there are techniques for automatic code generation and API interface development management methods based on API documents, but there are cases where API documents do not correspond to project codes, and each time the demand changes, it is necessary to maintain the API or change the database structure parameters at each node.
However, after the front and back ends are separately developed, operations such as changing the API and continuously reworking the API, modifying the database parameters, etc. are still required, which consumes labor and physical costs, and easily causes missing requirements or API errors, and thus improvement is needed.
The method for generating the database table and the codes under the control of the API documents is provided, so that the code writing of developers is reduced, the developers are more concentrated on service codes rather than troublesome code building and modifying work, and the problem that the API documents are inconsistent with project codes is solved.
Disclosure of Invention
The application provides an API development management method, device, vehicle and storage medium, and aims to solve the problems that developers are difficult to perform complicated code construction and modification work due to inconsistency between an API document and a project code, the requirements are easily omitted, the project handover is difficult, or API errors occur.
An embodiment of a first aspect of the present application provides an API development management method, including the following steps: configuring an application programming adapter API specification document, a database specification document and a code generation document; generating a target API document based on the API specification document and a preset development requirement, and judging whether the target API document meets the API specification document; and if the target API document meets the API specification document, creating a database corresponding to the target API document based on the database specification document, and automatically generating a code corresponding to the target API document based on the code generation document and the database corresponding to the target API document.
According to the technical means, the accuracy of the document and the codes is guaranteed, the workload of technical personnel is reduced, the document editing is simplified into relatively simple document editing, and the working efficiency is improved.
Further, in an embodiment of the present application, the configuring API specification document, the database specification document, and the code generation document include: judging whether a document configuration instruction of a user is received; if the document configuration instruction is received, configuring the API specification document, the database specification document and the code generation document according to the document configuration instruction; otherwise, configuring the API specification document, the database specification document and the code generation document based on a preset document configuration instruction.
According to the technical means, the documents are configured according to the target instructions, and the accuracy of project handover is improved.
Further, in an embodiment of the present application, the creating a database corresponding to the target API document based on the database specification document includes: comparing the database table structure document structure parameters in the database specification document with the data table document structure parameters in the initial database corresponding to the target API document to obtain the missing part of the data table document structure parameters in the initial database corresponding to the target API document; and modifying the missing part of the structure parameter of the data table document in the database corresponding to the target API document according to the missing part to obtain the database corresponding to the target API document.
According to the technical means, the situations of document deficiency and unclear functions are improved.
Further, in an embodiment of the present application, the automatically generating a code corresponding to the target API document based on the code generation document and the database corresponding to the target API document includes: based on a preset code template, converting database table structure document structure parameters in a database corresponding to the target API document into a template file for generating a code by an automatic code generation plug-in; and inputting the template file into the automatic code generation plug-in, and constructing a basic attribute object and a code template to obtain a code corresponding to the target API document.
According to the technical means, the accuracy of the document and the code is guaranteed, the workload of technical personnel is reduced, and the working efficiency is improved.
Further, in an embodiment of the present application, after the target API document meets the API specification document, the method further includes: and visually publishing the target API document to a developer on line through a webpage.
According to the technical means, the API is controlled through the online management platform, and the project handover efficiency is improved.
An embodiment of a second aspect of the present application provides an API development management apparatus, including: the configuration module is used for configuring an application programming adapter API specification document, a database specification document and a code generation document; the judging module is used for generating a target API document based on the API specification document and a preset development requirement and judging whether the target API document meets the API specification document; and the generating module is used for creating a database corresponding to the target API document based on the database specification document if the target API document meets the API specification document, and automatically generating a code corresponding to the target API document based on the code generating document and the database corresponding to the target API document.
Further, in an embodiment of the present application, the configuration module includes: the judging unit is used for judging whether a document configuration instruction of a user is received or not; if the document configuration instruction is received, configuring the API specification document, the database specification document and the code generation document according to the document configuration instruction; otherwise, configuring the API specification document, the database specification document and the code generation document based on a preset document configuration instruction.
Further, in an embodiment of the present application, the generating module includes: a comparing unit, configured to compare the database table structure document structure parameter in the database specification document with the data table document structure parameter in the initial database corresponding to the target API document, to obtain a missing part of the data table document structure parameter in the initial database corresponding to the target API document; and the acquisition unit is used for modifying the missing part of the data table document structure parameter in the database corresponding to the target API document according to the missing part to obtain the database corresponding to the target API document.
Further, in an embodiment of the present application, the generating module includes: the conversion unit is used for converting the database table structure document structure parameters in the database corresponding to the target API document into a template file for automatically generating the plug-in generation code by the code generation plug-in based on a preset code template; and the construction unit is used for inputting the template file into the automatic code generation plug-in, constructing a basic attribute object and a code template and obtaining a code corresponding to the target API document.
Further, in an embodiment of the application, after the target API document meets the API specification document, the generating module further includes: and the visualization unit is used for visually publishing the target API document to a developer on line through a webpage.
An embodiment of a third aspect of the present application provides a vehicle, comprising: the system comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the API development management method according to the embodiment.
A fourth aspect of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the API development management method according to the foregoing embodiment.
According to the method and the device for generating the API files, the API standard files, the database standard files and the code generation files of the application programming adapter are configured, the target API files are generated based on the API standard files and preset development requirements, whether the API standard files are met or not is judged, if yes, the database corresponding to the target API files is created based on the database standard files, and codes corresponding to the target API files are automatically generated by combining the code generation files. Therefore, the problems that due to the fact that the API documents are inconsistent with the project codes, developers are difficult to perform complicated code building and modifying work, the requirements are easily omitted, project handover is difficult, or API errors occur are solved.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a flowchart of an API development management method according to an embodiment of the present application;
FIG. 2 is a diagram of a canonical configuration framework provided according to one embodiment of the present application;
FIG. 3 is a configuration diagram of an API specification provided according to an embodiment of the present application;
FIG. 4 is a flow diagram of API document operation database fields provided according to one embodiment of the present application;
FIG. 5 is a flow diagram for automatic generation of database operation codes according to an embodiment of the present application;
FIG. 6 is a flow diagram of project construction provided according to an embodiment of the present application;
FIG. 7 is an exemplary diagram of an API development management apparatus according to an embodiment of the application;
fig. 8 is a schematic structural diagram of a vehicle according to an embodiment of the present application.
Reference numerals are as follows: 10-API development management means; 100-configuration module, 200-judgment module and 300-generation module.
Detailed Description
Reference will now be made in detail to the embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
An API development management method, apparatus, vehicle, and storage medium according to embodiments of the present application are described below with reference to the accompanying drawings. In the method, an API specification document, a database specification document and a code generation document of an application programming adapter are configured, a target API document is generated based on the API specification document and preset development requirements, whether the API specification document is met is judged, if yes, a database corresponding to the target API document is created based on the database specification document, and codes corresponding to the target API document are automatically generated by combining the code generation document, so that the accuracy of the document and the codes is ensured, the workload of technical personnel is reduced, and the working efficiency is improved. Therefore, the problems that due to the fact that the API documents are inconsistent with the project codes, developers are difficult in complicated code building and modifying work, missing requirements are easily caused, project handover is difficult, or API errors occur are solved.
Specifically, fig. 1 is a schematic flowchart of an API development management method according to an embodiment of the present disclosure.
The specific process can include the following 5 aspects, which are respectively: specification configuration, designing API documents, document association management, modifying databases, and code automatic generation, as described in detail below with respect to specific embodiments.
As shown in fig. 1, the API development management method includes the steps of:
in step S101, an application programming adapter API specification document, a database specification document, and a code generation document are configured.
Further, in one embodiment of the present application, configuring the API specification document, the database specification document, and the code generation document includes: judging whether a document configuration instruction of a user is received; if a document configuration instruction is received, configuring an API standard document, a database standard document and a code generation document according to the document configuration instruction; otherwise, configuring the API specification document, the database specification document and the code generation document based on the preset document configuration instruction.
Specifically, in the embodiment of the present application, during the process of performing the specification configuration, a manager logs in the online management platform and enters a configuration page of the configuration management. As shown in fig. 2, the specification configuration mainly includes 3 parts, which are an API specification configuration document, a database specification configuration document, and a code generation configuration document, respectively. The API specification configuration document comprises mandatory filling API parameters, an output return format, a return code description and the like; the database specification configuration document comprises a naming specification, a type specification, an index specification, an SQL (Structured Query Language) specification and the like; code generation profiles include using corresponding configuration files, or custom global configuration, data source configuration, output file path configuration, file policy configuration, and the like.
It should be noted that, if the standard configuration is not performed, the default configuration is used, and the configuration document may be edited online, or edited by uploading a file corresponding to the template, which is not specifically limited herein.
In step S102, a target API document is generated based on the API specification document and the preset development requirement, and it is determined whether the target API document satisfies the API specification document.
Specifically, in the embodiment of the present application, when a requirement is extracted from a functional requirement document, the requirement specifies an item, a requirement type, a priority, and a requirement precondition to which the requirement belongs, and different APIs are designed when different requirements are met, as shown in fig. 3, a complete target API design includes an interface responsibility, a protocol specification, a path rule, a request manner and parameter, a domain name, a cross-domain consideration, an API version, filter information, a return data format, an authority definition, a return code, and the like, and after the design of all target API documents is completed, it is determined whether the target API documents meet the API specification document.
In step S103, if the target API document meets the API specification document, a database corresponding to the target API document is created based on the database specification document, and a code corresponding to the target API document is automatically generated based on the code generation document and the database corresponding to the target API document.
Further, in an embodiment of the present application, after the target API document satisfies the API specification document, the method further includes: and publishing the target API document to the developer online through webpage visualization.
Specifically, as shown in fig. 4, after the design of all target API documents is completed, the designed target API documents are uploaded to the online document management platform, and when receiving the target API documents transmitted by the front end, the gateway verifies whether the target API documents meet the specifications through configuration information of the API development specifications, and if not, returns information to the front end to notify personnel to modify, and uploads again after meeting the specifications; and if the API document meets the specification, storing the API document into an online management platform, and generating a database corresponding to the target API document.
Therefore, target API documents which are not in accordance with the specification cannot be allowed to be uploaded to the management platform, and in order to reduce the problem of document consistency, the target API documents can be modified and released only through verification when being changed in the life cycle of the project. After the target API document is uploaded, the platform can automatically read the target API document information, visually and online release the document information to a developer through a webpage, and implement updating, so that the developer does not need to search and switch the document during development, and the efficiency is improved.
Optionally, the online management platform is also responsible for open management of the integrated API, and the open management of the integrated API is to perform authority control and call control on the API, so that the API authority management is conveniently realized.
Further, in an embodiment of the present application, creating a database corresponding to the target API document based on the database specification document includes: comparing the database table structure document structure parameters in the database specification document with the data table document structure parameters in the initial database corresponding to the target API document to obtain the missing part of the data table document structure parameters in the initial database corresponding to the target API document; and modifying the missing part of the structure parameter of the data table document in the database corresponding to the target API document according to the missing part to obtain the database corresponding to the target API document.
Specifically, as shown in fig. 4, in the embodiment of the present application, the database configuration information is connected to the target database, the database table structure document in the initial database corresponding to the target API document is analyzed, the missing part of the database table structure document structure parameter in the initial database corresponding to the database table structure document and the target API document is compared, and the missing part of the database table structure parameter in the database corresponding to the target API document is modified according to the missing part. For example, the field name and description in the table are added or modified, and the online management platform automatically generates an SQL statement according to the updated field name and description; if the data table document structure field in the initial database corresponding to the target API document exists, the data table document structure field is not modified, if the data table document structure field does not exist, an SQL statement for modifying the database field is generated, and the statement is automatically executed to modify the database field.
Further, in an embodiment of the present application, automatically generating a code corresponding to the target API document based on the code generation document and the database corresponding to the target API document includes: based on a preset code template, converting database table structure document structure parameters in a database corresponding to a target API document into a template file for generating a code by an automatic code generation plug-in; and inputting the template file into an automatic code generation plug-in, and constructing a basic attribute object and a code template to obtain a code corresponding to the target API document.
Specifically, as shown in fig. 5, connection information and structure parameters of the database are obtained, and the technology types configured in the configuration file are obtained. Because of the different project requirements, different databases, such as relational databases and non-relational databases, need to be connected.
For example, if a relational database is selected, the connection information includes a database name, a database address, an access port, a type, and the like; the structure parameters include table structure and basic field information, such as display name, field name, whether empty, data field, data type, length, decimal digit, default value, description, etc.
Further, in the configured API specification document database table, using the configuration file data specification to determine the database in the database according to default parameters at the unconfigured part; the configured technical types comprise different frames of a database written in different languages or user-defined frames, if a frame of an existing template is used, such as JAVA language, a DAO (Data Access Object) layer can directly perform matching by using a MyBatis-Plus frame; if the user-defined framework is used, the structural parameters of the target database need to be converted into a user-defined template for automatically generating the plug-in for the code, constructing a basic attribute object and a code template, and generating a basic code which is automatically generated aiming at the database, so that the code corresponding to the target API document is obtained. The part comprises basic operations such as data adding, deleting, modifying and checking and the like and corresponding project paths in a target API document, and is applied to common frameworks such as Spring boots and the like.
In summary, the following detailed description is provided with reference to fig. 6 to facilitate a clear understanding of the implementation process of the embodiments of the present application.
S601, configuring in a standard mode.
And S602, function requirement documents.
S603, API documents.
S604, judging whether the standard is met, if so, executing S605, otherwise, returning to the step of executing S603.
S605, managing the platform on line.
S606, creating a database.
S607, a code is generated.
In summary, after the embodiment of the application is configured according to the specification, the target API document reproduction codes are generated according to the development requirements, and the API can be controlled through the online management platform, so that the problems of unclear functions, difficult project handover and the like of documents in the related technology are solved, the accuracy of the documents and the codes is ensured, the document editing is simplified into relatively simple document editing, the workload of technicians is reduced, and the working efficiency is improved.
According to the API development management method provided by the embodiment of the application, the API specification document, the database specification document and the code generation document of the application programming adapter are configured, the target API document is generated based on the API specification document and the preset development requirement, whether the API specification document is met or not is judged, if the API specification document is met, the database corresponding to the target API document is established based on the database specification document, and the code corresponding to the target API document is automatically generated by combining the code generation document, so that the accuracy of the document and the code is ensured, the workload of technicians is reduced, and the working efficiency is improved. Therefore, the problems that due to the fact that the API documents are inconsistent with the project codes, developers are difficult to perform complicated code building and modifying work, the requirements are easily omitted, project handover is difficult, or API errors occur are solved.
Next, an API development management apparatus proposed according to an embodiment of the present application is described with reference to the drawings.
Fig. 7 is a block diagram illustrating an API development management apparatus according to an embodiment of the present application.
As shown in fig. 7, the API development management apparatus 10 includes: a configuration module 100, a judgment module 200 and a generation module 300.
The configuration module 100 is configured to configure an application programming adapter API specification document, a database specification document, and a code generation document;
the judging module 200 is configured to generate a target API document based on the API specification document and a preset development requirement, and judge whether the target API document meets the API specification document; and
the generating module 300 is configured to, if the target API document meets the API specification document, create a database corresponding to the target API document based on the database specification document, and automatically generate a code corresponding to the target API document based on the code generation document and the database corresponding to the target API document.
Further, in one embodiment of the present application, the configuration module 100 includes:
and the judging unit is used for judging whether a document configuration instruction of a user is received.
If a document configuration instruction is received, configuring an API standard document, a database standard document and a code generation document according to the document configuration instruction; otherwise, configuring the API specification document, the database specification document and the code generation document based on the preset document configuration instruction.
Further, in one embodiment of the present application, the generating module 300 includes: the device comprises a comparison unit and an acquisition unit.
The comparison unit is used for comparing the database table structure document structure parameters in the database specification document with the data table document structure parameters in the initial database corresponding to the target API document to obtain the missing part of the data table document structure parameters in the initial database corresponding to the target API document.
And the acquisition unit is used for modifying the missing part of the structure parameter of the data table document in the database corresponding to the target API document according to the missing part to obtain the database corresponding to the target API document.
Further, in one embodiment of the present application, the generating module 300 includes: a conversion unit and a construction unit.
The conversion unit is used for converting the database table structure document structure parameters in the database corresponding to the target API document into a template file for automatically generating the plug-in generation code by the code generation plug-in based on a preset code template.
And the construction unit is used for inputting the template file into the automatic code generation plug-in, constructing the basic attribute object and the code template and obtaining the code corresponding to the target API document.
Further, in an embodiment of the present application, after the target API document meets the API specification document, the generating module 300 further includes:
and the visualization unit is used for visually publishing the target API document to the developer on line through a webpage.
According to the API development management device provided by the embodiment of the application, the API specification document, the database specification document and the code generation document of the application programming adapter are configured, the target API document is generated based on the API specification document and the preset development requirement, whether the API specification document is met or not is judged, if the API specification document is met, the database corresponding to the target API document is established based on the database specification document, and the code corresponding to the target API document is automatically generated by combining the code generation document, so that the accuracy of the document and the code is ensured, the workload of technicians is reduced, and the working efficiency is improved. Therefore, the problems that due to the fact that the API documents are inconsistent with the project codes, developers are difficult in complicated code building and modifying work, missing requirements are easily caused, project handover is difficult, or API errors occur are solved.
Fig. 8 is a schematic structural diagram of a vehicle according to an embodiment of the present application. The vehicle may include:
a memory 801, a processor 802, and a computer program stored on the memory 801 and executable on the processor 802.
The processor 802 implements the API development management method provided in the above-described embodiments when executing a program.
Further, the vehicle further includes:
a communication interface 803 for communicating between the memory 801 and the processor 802.
A memory 801 for storing computer programs operable on the processor 802.
The Memory 801 may include a high-speed RAM (Random Access Memory) Memory, and may also include a non-volatile Memory, such as at least one disk Memory.
If the memory 801, the processor 802, and the communication interface 803 are implemented independently, the communication interface 803, the memory 801, and the processor 802 may be connected to each other via a bus and perform communication with each other. The bus may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 8, but this is not intended to represent only one bus or type of bus.
Optionally, in a specific implementation, if the memory 801, the processor 802, and the communication interface 803 are integrated on one chip, the memory 801, the processor 802, and the communication interface 803 may complete communication with each other through an internal interface.
The processor 802 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present Application.
Embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the API development management method as above.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or N embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "N" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more N executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present application.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a programmable gate array, a field programmable gate array, or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware that is related to instructions of a program, and the program may be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (10)

1. An API development management method is characterized by comprising the following steps:
configuring an application programming adapter API specification document, a database specification document and a code generation document;
generating a target API document based on the API standard document and a preset development requirement, and judging whether the target API document meets the API standard document; and
and if the target API document meets the API specification document, creating a database corresponding to the target API document based on the database specification document, and automatically generating a code corresponding to the target API document based on the code generation document and the database corresponding to the target API document.
2. The method of claim 1, wherein the configuration API specification document, database specification document, and code generation document comprise:
judging whether a document configuration instruction of a user is received;
if the document configuration instruction is received, configuring the API specification document, the database specification document and the code generation document according to the document configuration instruction; otherwise, configuring the API specification document, the database specification document and the code generation document based on a preset document configuration instruction.
3. The method of claim 1, wherein creating the database corresponding to the target API document based on the database specification document comprises:
comparing the database table structure document structure parameters in the database specification document with the data table document structure parameters in the initial database corresponding to the target API document to obtain the missing part of the data table document structure parameters in the initial database corresponding to the target API document;
and modifying the missing part of the structure parameter of the data table document in the database corresponding to the target API document according to the missing part to obtain the database corresponding to the target API document.
4. The method of claim 1, wherein automatically generating code corresponding to the target API document based on the code generation document and the database corresponding to the target API document comprises:
based on a preset code template, converting database table structure document structure parameters in a database corresponding to the target API document into a template file for generating a code by an automatic code generation plug-in;
and inputting the template file into the automatic code generation plug-in, and constructing a basic attribute object and a code template to obtain a code corresponding to the target API document.
5. The method of claim 1, further comprising, after the target API document satisfies the API specification document:
and visually publishing the target API document to a developer on line through a webpage.
6. An API development management apparatus, comprising:
the configuration module is used for configuring an application programming adapter API specification document, a database specification document and a code generation document;
the judging module is used for generating a target API document based on the API specification document and a preset development requirement and judging whether the target API document meets the API specification document; and
and the generating module is used for creating a database corresponding to the target API document based on the database specification document if the target API document meets the API specification document, and automatically generating a code corresponding to the target API document based on the code generating document and the database corresponding to the target API document.
7. The apparatus of claim 6, wherein the configuration module comprises:
the judging unit is used for judging whether a document configuration instruction of a user is received;
if the document configuration instruction is received, configuring the API specification document, the database specification document and the code generation document according to the document configuration instruction; otherwise, configuring the API specification document, the database specification document and the code generation document based on a preset document configuration instruction.
8. The apparatus of claim 6, wherein the generating module comprises:
a comparing unit, configured to compare the database table structure document structure parameter in the database specification document with the data table document structure parameter in the initial database corresponding to the target API document, to obtain a missing part of the data table document structure parameter in the initial database corresponding to the target API document;
and the acquisition unit is used for modifying the missing part of the data table document structure parameter in the database corresponding to the target API document according to the missing part to obtain the database corresponding to the target API document.
9. A vehicle, characterized by comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the program to implement the API development management method of any one of claims 1-5.
10. A computer-readable storage medium on which a computer program is stored, the program being executable by a processor for implementing the API development management method according to any one of claims 1 to 5.
CN202210814206.2A 2022-07-11 2022-07-11 API development management method, device, vehicle and storage medium Pending CN115220697A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210814206.2A CN115220697A (en) 2022-07-11 2022-07-11 API development management method, device, vehicle and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210814206.2A CN115220697A (en) 2022-07-11 2022-07-11 API development management method, device, vehicle and storage medium

Publications (1)

Publication Number Publication Date
CN115220697A true CN115220697A (en) 2022-10-21

Family

ID=83612347

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210814206.2A Pending CN115220697A (en) 2022-07-11 2022-07-11 API development management method, device, vehicle and storage medium

Country Status (1)

Country Link
CN (1) CN115220697A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115562641A (en) * 2022-10-27 2023-01-03 中电金信软件有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN116028026A (en) * 2023-03-24 2023-04-28 广州嘉为科技有限公司 Research and development process management method and device based on plug-in and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115562641A (en) * 2022-10-27 2023-01-03 中电金信软件有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN115562641B (en) * 2022-10-27 2024-05-10 中电金信软件有限公司 Data processing method, device, electronic equipment and computer readable storage medium
CN116028026A (en) * 2023-03-24 2023-04-28 广州嘉为科技有限公司 Research and development process management method and device based on plug-in and storage medium

Similar Documents

Publication Publication Date Title
US6996589B1 (en) System and method for database conversion
CN115220697A (en) API development management method, device, vehicle and storage medium
CN102722372B (en) Method and system for automatically generating codes through classification and configuration
US7082386B2 (en) Generalized software modeling tool
CN107678736A (en) A kind of business Page Template shows method, system and computer installation
CN102664746B (en) For the configuration management sound and consistent in the overall situation of each component of distributive data center
CN102542382A (en) Method and device for managing business rule
CN108762743A (en) Data table operation code generation method and device
US8527254B2 (en) Simulator engine development system and simulator engine development method
CN109977099A (en) Database portion arranging method, user equipment, storage medium and device
WO2023051125A1 (en) Structured data version management method, apparatus, and related device
US20060047723A1 (en) Custom database system and method of building the same
WO2023130933A1 (en) Model processing method and apparatus, code aquisition method and apparatus, and electronic device
US20100011018A1 (en) Custom database system and method of building the same
JP2011248852A (en) System cooperation apparatus
US7716653B2 (en) Configurable importers and resource writers for converting data into another format
CN113918627A (en) Data conversion method, device and readable storage medium
KR101818745B1 (en) Drawing and product management system, and Controlling method therefor
CN112596703B (en) Method, system and storage medium for realizing demand development inheritance
CN114860689A (en) Method and system for migrating data objects between heterogeneous databases
CN114048194A (en) Data management method and device and electronic equipment
CN114124977A (en) Cross-tenant data sharing method and device and electronic equipment
CN113010489A (en) Data migration method and system
CN111008018A (en) CAN signal unpacking processing method and system
US11816424B2 (en) Conditional save of draft enabled business objects

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