Interface metadata processing method, system and device, client and storage medium
By integrating plug-ins in the business system to automatically process interface metadata and uploading it to the interface document platform, the problem of front-end communication consumption is solved, and R&D efficiency and the accuracy and consistency of interface documents are improved.
Patent Information
- Application Number
- CN202510846379.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-06-24
AI Technical Summary
During the research and development of business systems, communication and docking between front and back-end development is serious, resulting in low R&D efficiency. Especially when multiple business systems are developed in parallel, front-end developers and testers need to spend a lot of time understanding the personalized data formats of each system.
By integrating the target plug-in in the business system, we automatically obtain and convert interface metadata into the format supported by the target interface document platform, and upload it to a centralized interface document management platform (such as the Blade Platform), generating a unified format interface document to reduce front-end and back-end communication.
It improves R&D efficiency, simplifies the management and maintenance of interface documents, enhances the accuracy and consistency of interface documents, reduces learning and communication costs, and provides strong support for the development of enterprise-level applications.
Smart Images

Figure CN120371302A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technologies, and more specifically, to a method, system, device, client, and storage medium for processing interface metadata in the field of Internet technologies. Background Art
[0002] In the research and development process of business systems, a front-end and back-end separation development method is often adopted. Specifically, the back-end is responsible for logic development, writing specific functional logics, and providing corresponding functional interfaces for the front-end to call. For example, back-end developers design interfaces, and front-end developers complete page data interaction and design based on the interfaces designed by back-end developers. However, defining APIs (Application Programming Interfaces) and the communication and docking between the front-end and back-end are often very time-consuming, resulting in extremely low R & D efficiency for front-end and back-end developers. Based on this, how to improve R & D efficiency in the R & D process has become a technical problem to be urgently solved. Summary of the Invention
[0003] This application provides a method, system, device, client, and storage medium for processing interface metadata, and this method can improve R & D efficiency in the R & D process.
[0004] In a first aspect, a method for processing interface metadata is provided. The method includes: obtaining interface metadata of a target interface of a business system, and converting a data format of the interface metadata to obtain interface metadata in a target format; where the target format is a format supported by a target interface document platform; uploading the interface metadata in the target format to the target interface document platform, so that the target interface document platform generates a target interface document based on the interface metadata in the target format and displays the target interface document.
[0005] In the above technical solution, the acquisition, format conversion, and upload of interface metadata are completed locally on the client side in an automated manner, reducing the communication cost between the front end and the back end and improving the R & D efficiency. Front-end developers and testers can directly work based on the target interface documents generated on the target interface document platform without having to communicate and confirm with back-end developers frequently. The formats of the data received by the target interface document platform are all the target formats supported by itself, enabling front-end developers and testers to only need to be familiar with one standard format, that is, the target format, without having to spend extra time understanding the personalized data formats of each business system. By introducing the target interface document platform and combining the automated acquisition, format conversion, and upload of interface metadata of the target interface locally on the client side, the problems of high communication cost and steep learning curve existing in the traditional front-end and back-end docking are effectively solved. This solution not only improves the R & D efficiency but also enhances the accuracy and consistency of the interface documents, providing strong support for the development of enterprise-level applications.
[0006] Combined with the first aspect, in some possible implementation manners, before acquiring the interface metadata of the target interface of the business system and converting the data format of the interface metadata to obtain the interface metadata in the target format, the method further includes: integrating a target plug-in in the business system; the acquiring the interface metadata of the target interface of the business system and converting the data format of the interface metadata to obtain the interface metadata in the target format includes: after the application corresponding to the business system is started, by loading the target plug-in, acquiring the interface metadata of the target interface of the business system and converting the data format of the interface metadata to obtain the interface metadata in the target format.
[0007] In the above technical solution, a specific target plug-in is integrated in the business system in advance. By loading the target plug-in locally in the business system, the acquisition and format conversion of interface metadata can be completed in the local environment of the client side. The localization process makes full use of the existing resources of the business system without the need to deploy additional dedicated servers or services to handle the acquisition and conversion of interface metadata, which not only simplifies the process of acquiring and converting interface metadata but also reduces the implementation cost and is more friendly to the target interface document platform.
[0008] Combined with the first aspect and the above implementation manners, in some possible implementation manners, the integrating the target plug-in in the business system includes: accessing the software package corresponding to the target plug-in in the business system; wherein, the software package includes attributes to be configured; acquiring the configuration information of the attributes to be configured; and configuring the software package based on the configuration information to integrate the target plug-in in the business system.
[0009] In the above technical solution, by accessing the software package corresponding to the target plug-in in the business system, obtaining the configuration information of the attributes to be configured in the software, and configuring the software package based on the configuration information to integrate the target plug-in in the business system, the behavior of the target plug-in can be flexibly adjusted according to different business requirements without modifying the core code, which is beneficial to efficiently integrating the target plug-in in the business system and flexibly configuring its behavior according to actual needs. This method not only simplifies the access process of the target plug-in but also improves the flexibility and maintainability of the target plug-in during use.
[0010] Combined with the first aspect and the above implementation, in some possible implementations, the attribute to be configured includes an enabling attribute for describing whether the target plug-in is allowed to take effect in the business system; after the application corresponding to the business system is started, by loading the target plug-in, obtaining the interface metadata of the target interface of the business system, and converting the data format of the interface metadata to obtain the interface metadata in the target format, which includes: after the application corresponding to the business system is started, identifying whether the target plug-in takes effect in the business system according to the enabling attribute; in the case where the target plug-in takes effect, by loading the target plug-in, obtaining the interface metadata of the target interface of the business system, and converting the data format of the interface metadata to obtain the interface metadata in the target format.
[0011] In the above technical solution, when it is identified that the target plug-in takes effect through the enabling attribute, it indicates that the target plug-in is explicitly enabled. Only at this time will the target plug-in be loaded, the interface metadata of the target interface of the business system be obtained, and the data format of the interface metadata be converted to obtain the interface metadata in the target format, avoiding unnecessary resource consumption and potential conflicts. The target plug-in can be easily enabled or disabled through simple configuration, which enables developers to quickly and flexibly adjust the behavior of the target plug-in according to different deployment environments.
[0012] Combined with the first aspect and the above implementation manners, in some possible implementation manners, the software package includes a target function group; before the application corresponding to the service system is started, the method further includes: initializing the target function group to configure the target function group as follows: after the application is started, scan the interfaces under a specified package path to obtain an interface scan result, store the interface scan result in the target function group, and name the target function group with a target name; after the application corresponding to the service system is started, by loading the target plug-in, obtain interface metadata of a target interface of the service system, including: after the application corresponding to the service system is started, load the target plug-in, obtain a set of interface resources of the service system; obtain the target function group with the target name from the set of interface resources, and obtain the interface metadata of the target interface of the service system from the target function group.
[0013] In the above implementation manners, the target function group, as an independent functional unit, can be initialized and configured before the application is started. Only by adjusting the configuration parameters can it adapt to different requirements. If it is necessary to add or change a new scan path, only the implementation of the target function group needs to be modified, rather than making large-scale changes to the entire service system. Assigning a specific target name to the target function group facilitates quickly locating and finding the function group with the target name from the set of interface resources subsequently, and extracting the interface metadata from it, simplifying the process of obtaining the interface metadata of the target interface and improving the obtaining efficiency.
[0014] Combined with the first aspect and the above implementation manners, in some possible implementation manners, the converting the data format of the interface metadata to obtain interface metadata in a target format includes: parsing the interface metadata to determine difference information between the format of the interface metadata and the target format supported by the target interface document platform; according to the difference information, convert the data format of the interface metadata to obtain interface metadata in a target format.
[0015] In a second aspect, a processing system for interface metadata is provided, including: a client and a target interface document platform; the client is configured to obtain interface metadata of a target interface of a service system, convert the data format of the interface metadata to obtain interface metadata in a target format, and upload the interface metadata in the target format to the target interface document platform; wherein the target format is a format supported by the target interface document platform; the target interface document platform is configured to generate a target interface document according to the interface metadata in the target format and display the target interface document.
[0016] In a third aspect, a processing device for interface metadata is provided. The device includes: a data processing module, configured to obtain the interface metadata of a target interface of a service system and convert the data format of the interface metadata to obtain the interface metadata in a target format, where the target format is a format supported by a target interface document platform; an upload module, configured to upload the interface metadata in the target format to the target interface document platform, so that the target interface document platform generates a target interface document based on the interface metadata in the target format and displays the target interface document.
[0017] In combination with the third aspect, in some possible implementation manners, the processing device for interface metadata further includes: a plugin integration module, configured to integrate a target plugin in the service system; the data processing module is specifically configured to: after the application corresponding to the service system is started, obtain the interface metadata of the target interface of the service system by loading the target plugin, and convert the data format of the interface metadata to obtain the interface metadata in the target format.
[0018] In combination with the third aspect and the above implementation manners, in some possible implementation manners, the plugin integration module is specifically configured to: access the software package corresponding to the target plugin in the service system, where the software package includes attributes to be configured; obtain the configuration information for the attributes to be configured; and configure the software package based on the configuration information to integrate the target plugin in the service system.
[0019] In combination with the third aspect and the above implementation manners, in some possible implementation manners, the attributes to be configured include an effective attribute for describing whether the target plugin is allowed to take effect in the service system; the data processing module is specifically configured to: after the application corresponding to the service system is started, identify whether the target plugin takes effect in the service system according to the effective attribute; and when the target plugin takes effect, obtain the interface metadata of the target interface of the service system by loading the target plugin, and convert the data format of the interface metadata to obtain the interface metadata in the target format.
[0020] Combined with the third aspect and the above implementation manners, in some possible implementation manners, the software package includes a target function group; the data processing module is specifically configured to: initialize the target function group to configure the target function group to: after the application is started, scan the interfaces in a specified package path to obtain an interface scan result, store the interface scan result in the target function group, and name the target function group with a target name; after the application corresponding to the service system is started, load the target plugin, obtain the interface resource set of the service system; obtain the target function group with the target name from the interface resource set, and obtain the interface metadata of the target interface of the service system from the target function group.
[0021] Combined with the third aspect and the above implementation manners, in some possible implementation manners, the data processing module is specifically configured to: analyze the interface metadata to determine the difference information between the format of the interface metadata and the target format supported by the target interface document platform; according to the difference information, convert the data format of the interface metadata to obtain the interface metadata in the target format.
[0022] In a fourth aspect, a client is provided, which includes: a memory for storing executable program code; a processor for calling and running the executable program code from the memory, so that the client executes the method in the first aspect or any one of the possible implementation manners of the first aspect.
[0023] In a fifth aspect, a computer program product is provided, which includes: computer program code, when the computer program code runs on a computer, the computer is caused to execute the method in the first aspect or any one of the possible implementation manners of the first aspect.
[0024] In a sixth aspect, a computer-readable storage medium is provided, which stores computer program code, when the computer program code runs on a computer, the computer is caused to execute the method in the first aspect or any one of the possible implementation manners of the first aspect. Description of the Drawings
[0025] Figure 1 is a schematic diagram of an application scenario of a method for processing interface metadata provided by an embodiment of the present application; Figure 2 is a schematic flowchart of a method for processing interface metadata provided by an embodiment of the present application; Figure 3 is an interaction schematic diagram of a method for processing interface metadata provided by an embodiment of the present application; Figure 4It is a schematic diagram of a display interface provided by a blade platform according to an embodiment of the present application; Figure 5 It is a schematic diagram of a processing system for interface metadata according to an embodiment of the present application; Figure 6 It is a schematic structural diagram of a processing device for interface metadata according to an embodiment of the present application; Figure 7 It is a schematic structural diagram of a client according to an embodiment of the present application. Detailed implementation manners
[0026] Next, the technical solutions in the present application will be clearly and elaborately described in conjunction with the accompanying drawings. Among them, in the description of the embodiments of the present application, unless otherwise specified, " / " means "or". For example, A / B may mean A or B. The "and / or" in the text is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B may mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.
[0027] Hereinafter, the terms "first" and "second" are only for descriptive purposes and cannot be construed as implying or suggesting relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features.
[0028] For the convenience of understanding the embodiments of the present application, the technical terms involved in the embodiments of the present application will be introduced first: Interface document: Focusing on the API document in the process of team collaborative development, it can improve the efficiency of software development and ensure the quality of software.
[0029] API interface: Application Programming Interface, which is a set of predefined functions. The purpose is to provide the ability for an application program and developers to access a set of routines based on a certain software or hardware, without the need to access the source code or understand the details of the internal working mechanism.
[0030] Swagger: An open-source API document solution. Swagger can automatically generate detailed API documents according to the comments in the code or configuration files. The API documents include information such as the request method, parameters, and response type of each API.
[0031] Blade Platform: mainly used to generate and manage API interface definitions for different branches or versions, capable of generating interface documents in a specific format, and belonging to a platform for generating interface documents. It can help developers maintain multiple versions of API definitions at different development stages (such as development, testing, production), and ensure that these definitions can accurately reflect the specific implementation of each version. Developers can access the Blade Platform through simple plugins without making intrusive modifications to the existing code. The Blade Platform supports seamless integration with the deployment process of Aone (continuous integration and continuous delivery platform), and also supports local builds, and the build results will be synchronized to the Blade Platform in real time. This can ensure that the states in the development environment and the Blade Platform are always consistent, facilitating debugging and verification.
[0032] Through research, it is found that in the R & D process of business systems, the front-end and back-end separation development method is often adopted. Specifically, the back-end is responsible for logic development, writing specific functional logics, and providing corresponding functional interfaces for the front-end to call. For example, back-end R & D personnel design API interfaces and describe these interfaces through interface documents. Front-end R & D personnel need to perform page data interaction and design based on these interface documents. However, due to the lack of unified standards and tool support, the communication and docking between the front-end and back-end become very time-consuming, resulting in low overall R & D efficiency. Moreover, in large enterprise-level applications, multiple business systems are usually developed in parallel, and each system has its own interface specifications and document formats. This decentralized management method increases the learning cost of front-end developers and testers because they need to be familiar with the personalized data formats of each business system, further affecting the development efficiency. Based on this, how to improve the R & D efficiency in the R & D process has become a technical problem to be solved urgently.
[0033] Considering that back-end R & D personnel are usually very familiar with the use of Swagger tools, and front-end R & D personnel are usually very familiar with the use of the Blade Platform, a lot of business code at the front-end interface level can be generated based on the Blade Platform. At the same time, the Blade Platform may be connected to multiple business systems. If the interface documents of different business systems can be centrally managed and maintained uniformly on the Blade Platform, the R & D efficiency of the front-end and back-end will be greatly improved.
[0034] Based on this, an embodiment of the present application provides a method for processing interface metadata, including: The client obtains the interface metadata of the target interface from the business system, performs format conversion on the obtained interface metadata locally on the client, and converts it into a target format supported by the target interface document platform (such as the Blade platform). This format conversion is transparent and automated, reducing the possibility of manual intervention. The interface metadata in the converted target format is automatically uploaded to the Blade platform. As a centralized and centered interface document management platform, the Blade platform can receive interface metadata from different clients and generate target interface documents in a unified format. The Blade platform automatically generates target interface documents based on the received interface metadata and provides a user interface for front-end developers and testers to view and use. The Blade platform can be docked with multiple business systems, and all interface documents are uniformly managed and maintained on the Blade platform. This not only improves the consistency and accuracy of the interface documents but also simplifies the work processes of front-end developers and testers. Even if the original interface metadata formats of different business systems are different, the interface documents displayed on the Blade platform after conversion follow the same standardized format, reducing the learning and usage threshold, thus facilitating the improvement of R & D efficiency.
[0035] Figure 1 It is a schematic diagram of an application scenario of a method for processing interface metadata provided by an embodiment of the present application.
[0036] Exemplarily, as Figure 1 shown, this application scenario includes a client 101 and a target interface document platform 102.
[0037] The client 101 actually refers to the server or backend system, which plays the role of a client relative to the target interface document platform 102. In a typical front-end and back-end separation architecture, the backend (server) is responsible for processing business logic, providing API interfaces, and generating interface metadata. The front-end then calls these API interfaces for data interaction and page display. To improve the collaboration efficiency between the front-end and back-end, this embodiment introduces the target interface document platform 102 as a unified interface document management tool.
[0038] A business system runs in the client 101, and this business system is a specific business logic module or service set running in the client 101. The business system implements specific API interfaces for front-end application programs to call. Each API interface has corresponding metadata describing its function and usage method.
[0039] The target interface document platform 102 can be understood as a centralized interface document management platform, responsible for generating and displaying interface documents in a unified format. The target interface document platform 102 can be the above-mentioned Blade platform.
[0040] Exemplarily, the client 101 includes n clients, where n is greater than or equal to 1. That is to say, the target interface document platform 102 can access multiple clients, and each client runs its own business system. Relative to the target interface document platform 102, these clients are all data providers. The target interface document platform 102 is a centralized interface document management platform used to receive interface metadata in the target format from each client and generate a target interface document in a unified format, enabling the target interface document platform 102 to uniformly manage and maintain the interface documents of multiple business systems. Each client can extract interface metadata from its internal business system, convert it into a format supported by the target interface document platform, and then upload it to the target interface document platform 102. In this way, the target interface document platform 102 can not only receive data from multiple clients but also generate interface documents in a unified format, greatly improving the efficiency and quality of front-end and back-end collaboration.
[0041] Figure 2 It is a schematic flowchart of a method for processing interface metadata provided by an embodiment of the present application.
[0042] Exemplarily, as Figure 2 shown, this method for processing interface metadata can be applied to Figure 1 any one of the clients, and the method includes: Step 201: Obtain the interface metadata of the target interface of the business system, and convert the data format of the interface metadata to obtain interface metadata in the target format; where the target format is the format supported by the target interface document platform.
[0043] Step 202: Upload the interface metadata in the target format to the target interface document platform, so that the target interface document platform generates a target interface document based on the interface metadata in the target format and displays the target interface document.
[0044] In Figure 2In the illustrated embodiment, the acquisition, format conversion, and upload of interface metadata are completed locally on the client side in an automated manner, reducing the communication cost between the front end and the back end and improving the R & D efficiency. Front-end developers and testers can directly work based on the target interface documents generated on the target interface document platform without having to frequently communicate and confirm with back-end developers. The formats of the data received by the target interface document platform are all the target formats supported by itself, enabling front-end developers and testers to only need to be familiar with one standard format, that is, the target format, without having to spend extra time understanding the personalized data formats of each business system. By introducing the target interface document platform and combining it with the local automation on the client side to acquire, format-convert, and upload the interface metadata of the target interface, this application effectively solves the problems of high communication cost and steep learning curve existing in traditional front-back end docking. This solution not only improves the R & D efficiency but also enhances the accuracy and consistency of interface documents, providing strong support for the development of enterprise-level applications.
[0045] The following will describe Figure 2 the specific implementation methods of each step in the illustrated embodiment: In step 201, the client first obtains the interface metadata of the target interface from the business system running internally. The target interface is an API interface involved in front-back end interaction, specifically referring to an API interface designed specifically for front-back end interaction. They are the function points exposed by the back-end service to the outside world and also the main entry for the front-end application to call the back-end service.
[0046] It can be understood that in the business system, the interfaces are not limited to the target interfaces involved in front-back end interaction, and there are also various other types of interfaces. These interfaces can be divided into different categories according to their uses and usage scenarios. For example, interfaces for data exchange with other third-party systems or partners, interfaces for managing and monitoring the business system, usually used by operation and maintenance personnel or administrators, and interfaces designed specifically for testing purposes to verify system functions or performance, etc. Although there are various types of interfaces in the business system, this embodiment particularly focuses on the target interfaces designed specifically for front-back end interaction. These interfaces are the core link for front-back end collaboration, responsible for transmitting data and functions between the two. By acquiring the interface metadata of the target interface, performing format conversion, and uploading it to the target interface document platform, front-back end developers do not need to frequently communicate and confirm interface details, and the detailed interface metadata information of the target interface is all centrally displayed on the target interface document platform, which is beneficial to improving the R & D efficiency of the front and back ends.
[0047] The interface metadata of the target interface includes information such as the interface name, request path, request method, parameter type, response format, etc. The interface name is the unique identifier of the interface and is usually a meaningful name given by the developer to the interface. The request path is the URL (Uniform Resource Locator) address of the interface, which is used to specify the access path of the interface. The request method refers to the HTTP methods supported by the interface, such as GET, POST, PUT, DELETE, etc. The parameter type refers to the input parameters required by the interface and their data types (such as strings, integers, boolean values, etc.), as well as whether they are required. The response format is the data format returned by the interface, usually JSON or XML, including field names, field types, and their meanings. The error code and description refer to the error codes that the interface may return and their corresponding meanings, which are convenient for the front end to handle exception situations.
[0048] In some embodiments, the interface metadata of the interfaces in the business system is Swagger interface metadata generated based on the Swagger tool. Among them, the interface metadata refers to the detailed description of the API interface, including information such as the interface name, request path, request method, parameter type, response format, etc. Swagger interface metadata refers to the interface metadata generated based on the Swagger tool and is represented in JSON data format.
[0049] The Swagger tool can be integrated into the business system. The Swagger tool can automatically generate detailed Swagger interface documents and describe the structure and functions of the API in a standardized format. The Swagger interface metadata of each interface in the business system can be generated through the Swagger tool. The Swagger tool can be understood as the Swagger native document service integrated in the business system, or understood as the Swagger native plugin. The target plugin in this embodiment can be understood as a new plugin designed based on the Swagger native plugin.
[0050] Exemplarily, the Swagger interface document usually contains the interface metadata of multiple interfaces, but not all interfaces are target interfaces (i.e., the interfaces involving front-end and back-end interactions). Based on this, the above-mentioned obtaining of the interface metadata of the target interface in the business system may include: screening out the Swagger interface metadata of the target interface from the Swagger interface metadata of each interface generated by the Swagger tool.
[0051] In some embodiments, the data format of the interface metadata is converted to obtain the interface metadata in the target format, including: parsing the interface metadata of the target interface to determine the difference information between the format of the interface metadata and the target format supported by the target interface document platform; and converting the data format of the interface metadata according to the difference information to obtain the interface metadata in the target format. That is to say, in the process of converting the interface metadata of the target interface to the data format of the target interface document platform (such as the Blade platform), the key lies in understanding the differences between the two formats and performing corresponding conversion operations based on these differences.
[0052] The following takes the interface metadata as the above-mentioned Swagger interface metadata and the target interface document platform as the above-mentioned Blade platform as an example to illustrate the above data format conversion process: Specifically, parse the Swagger interface metadata to determine its structure and content. The format of the Swagger interface metadata is usually in JSON format or YAML format that conforms to the OpenAPI specification, and contains input and output parameter information at the interface level, but does not contain class original information and class relationships. The Blade platform obtains data based on the reflection mechanism, and the data objects in the beans and javadoc fields in the description file both contain the interface class original information and the description relationships of class inheritance / interface implementation. Then, compare the difference information between the format of the Swagger interface metadata and the target format supported by the target interface document platform. Based on the above introduction of the format of the Swagger interface metadata and the format supported by the target interface document platform, the determined difference information may include: the presence or absence of class original information and class relationships. In specific implementation, there may be other dimensions of differences in the difference information determined by comparison. For example, the format supported by the target interface document platform contains target fields that do not exist in the Swagger interface metadata. This embodiment does not specifically limit the finally determined difference information.
[0053] After obtaining the difference information, according to this difference information, the Swagger interface metadata is converted to conform to the format supported by the target interface document platform (such as the Blade platform). For example, the Swagger interface metadata is parsed into the JSON data format, and the Swagger interface metadata is converted into the data of the target fields required by the Blade platform (such as fields like data, service, alias, etc.). Finally, all the converted data is combined into a whole to form the interface metadata in the target format that the Blade platform can directly use. Among them, converting the Swagger interface metadata into the data of the target fields required by the Blade platform can be understood as: adjusting the data structure of the Swagger interface metadata to adapt to the data structure of the Blade platform, and the data objects at the interface level can be reorganized into the data of target fields such as data, service, alias, etc. Since the Swagger interface metadata lacks class original information compared with the data format supported by the Blade platform, during the format conversion process, these class original information and class relationships can also be supplemented through predefined mapping rules or external configuration files, so that the converted interface metadata contains class original information and class relationships.
[0054] In some embodiments, before the above step 201, it further includes: integrating a target plug-in in the business system. On this basis, the implementation manner of the above step 201 can be: after the application corresponding to the business system is started, by loading the target plug-in, the interface metadata of the target interface of the business system is obtained, and the data format of the interface metadata is converted to obtain the interface metadata in the target format.
[0055] Specifically, a target plug-in can be pre-integrated in the business system accessing the target interface document platform. The main function of this target plug-in is to automatically complete the following tasks: the target plug-in can extract the interface metadata of the target interface from within the business system. For a system integrating the Swagger tool, the target plug-in can directly read the API document generated by the Swagger tool and extract the interface metadata of the target interface. The target plug-in can also identify the differences between the Swagger interface metadata and the format required by the target interface document platform, and perform corresponding format conversion operations according to these differences, which include but are not limited to supplementing class original information, establishing class relationships, adding detailed annotations and descriptions, etc.
[0056] Exemplarily, each business system corresponds to its own application, where the application refers to a software program that carries business logic and provides service functions. The application corresponding to the business system can be understood as: a specific software entity that directly implements business logic and service functions, which can be an independently running program or a set of microservices that work together. After the application is started, it will automatically load the pre-configured target plug-in, obtain the interface metadata of the target interface of the business system, and convert the data format of the interface metadata to obtain the interface metadata in the target format.
[0057] In the above implementation method, a specific target plug-in is pre-integrated in the business system. By loading the target plug-in locally in the business system, the acquisition and format conversion of interface metadata can be completed in the local environment of the client. The localization process makes full use of the existing resources of the business system, and there is no need to deploy additional dedicated servers or services to handle the acquisition and conversion of interface metadata of the target interface. This not only simplifies the process of acquiring and converting interface metadata but also reduces the implementation cost, which is more friendly to the target interface document platform.
[0058] In some embodiments, integrating the target plug-in in the business system includes the following S11 to S13: S11: Access the software package corresponding to the target plug-in in the business system; wherein, the software package includes properties to be configured.
[0059] Specifically, the software package corresponding to the target plug-in can be made first. The software logic required to implement the functions required by the target plug-in is encapsulated in the software package. The software package can include: the core code of the target plug-in, the dependency library, and the default values or placeholders of the properties to be configured. After the software package corresponding to the target plug-in is made, the software package is accessed to the business system. If the business system is developed based on Java, the software package can be a maven package, and the maven package can be added to the project file of the business system.
[0060] Exemplarily, a component package corresponding to the target plugin can be made based on Swagger. The properties to be configured in this component package can include: an enabling property (denoted as Swagger.doc.enable) for describing whether the target plugin is allowed to take effect in the business system, an attribution property (denoted as Swagger.doc.groupId) for describing the organization or project group to which the target plugin belongs, an identification property (denoted as Swagger.doc.artifactId) for describing the target plugin itself, a version property (denoted as Swagger.doc.version) for describing the version of the target plugin, a branch property (denoted as Swagger.doc.branch) for describing the associated code branch of the target plugin, a name property (denoted as Swagger.doc.appName) for describing the name of the application corresponding to the business system integrated by the target plugin, an environment property (denoted as Swagger.doc.scmProject) for describing the development environment corresponding to the target plugin, a path property (denoted as Swagger.doc.apiPackages) for describing the specified package path scanned by the target plugin, etc. The artifactId is usually the name of the target plugin, which is used to uniquely identify the target plugin itself to ensure that the target plugin will not be confused with other plugins under the same groupId.
[0061] S12: Obtain the configuration information for the properties to be configured.
[0062] Exemplarily, the configuration information for each property to be configured can be determined according to the actual business requirements. That is to say, the specific configuration values for each property to be configured can be determined according to the actual business requirements. For example, if the target plugin is currently required to take effect in the business system, the above enabling property can be set to take effect (denoted as True). If the target plugin is not currently needed, the above enabling property can be set to not take effect (denoted as False). Considering that in this embodiment, the interface metadata of the target interface needs to be obtained and its data format needs to be converted, in order to quickly and accurately obtain the interface metadata of the target interface through the target plugin subsequently, for the path property Swagger.doc.apiPackages, it can be configured as the specific package path where the target interface is located to ensure that the target plugin can accurately scan the interface metadata of the required target interface.
[0063] Exemplarily, the configuration information for each property to be configured can be referred to in Table 1 below: Table 1
[0064] It should be noted that the configuration information of the properties to be configured in Table 1 above is only an example for easy understanding, and is not limited thereto in specific implementations. Moreover, the configuration information of each property to be configured can also be adjusted according to actual needs, enhancing the flexibility of the target plugin during use.
[0065] S13: Configure the software package based on the configuration information to integrate the target plugin in the business system.
[0066] Read and parse the above configuration information in the business system, and initialize the target plugin according to the parsed configuration information to ensure that the plugin operates according to the expected behavior.
[0067] In the above implementation method, by accessing the software package corresponding to the target plugin in the business system, obtaining the configuration information of the properties to be configured in the software, and configuring the software package based on the configuration information to integrate the target plugin in the business system, the behavior of the target plugin can be flexibly adjusted according to different business requirements without modifying the core code, which is beneficial to efficiently integrating the target plugin in the business system and flexibly configuring its behavior according to actual needs. This method not only simplifies the access process of the target plugin, but also improves the flexibility and maintainability of the target plugin during use.
[0068] In some embodiments, the property to be configured includes an enabling property used to describe whether the target plugin is allowed to take effect in the business system; after the application corresponding to the business system is started, by loading the target plugin, obtaining the interface metadata of the target interface of the business system, and converting the data format of the interface metadata to obtain the interface metadata in the target format, including: after the application corresponding to the business system is started, identifying whether the target plugin takes effect in the business system according to the enabling property; in the case where the target plugin takes effect, by loading the target plugin, obtaining the interface metadata of the target interface of the business system, and converting the data format of the interface metadata to obtain the interface metadata in the target format.
[0069] In this embodiment, the attributes to be configured include an enabling attribute (such as the above-mentioned Swagger.doc.enable) for describing whether the target plug-in is allowed to take effect in the business system. The enabling attribute determines whether the target plug-in will be loaded and executed after the application corresponding to the business system is started. After the application corresponding to the business system is started, the configuration information of the enabling attribute can be read, and according to the configuration information of the enabling attribute, it is determined whether the target plug-in takes effect in the business system. If the configuration information of the enabling attribute is true, which indicates enabling, it is determined that the target plug-in takes effect in the business system. If the configuration information of the enabling attribute is false, which indicates disabling, it is determined that the target plug-in does not take effect in the business system. Then, when it is determined that the target plug-in takes effect, by loading the target plug-in, the interface metadata of the target interface of the business system is obtained, and the data format of the interface metadata is converted to obtain the interface metadata in the target format. If it is determined that the target plug-in does not take effect, the target plug-in will not be loaded.
[0070] In the above implementation, when it is recognized through the enabling attribute that the target plug-in takes effect, it means that the target plug-in is explicitly enabled. Only at this time will the target plug-in be loaded, the interface metadata of the target interface of the business system be obtained, and the data format of the interface metadata be converted to obtain the interface metadata in the target format, avoiding unnecessary resource consumption and potential conflicts. When the target plug-in does not take effect, it means that the target plug-in is explicitly disabled, and relevant resources (such as memory, CPU, etc.) will not be occupied, thus ensuring that the business system can run other critical tasks more efficiently. The target plug-in can be easily enabled or disabled through simple configuration, which enables developers to quickly adjust the behavior of the target plug-in according to different deployment environments (such as development, testing, production).
[0071] In some embodiments, the above software package includes a target function group. The target function group is used to scan each class under the specified package path. The attributes to be configured include a path attribute for configuring the specified package path. Before the application corresponding to the business system is started, it further includes: initializing the target function group to configure the target function group to: after the application is started, scan the interfaces under the specified package path to obtain an interface scan result, store the interface scan result in the target function group, and name the target function group the target name. The above-mentioned obtaining the interface metadata of the target interface of the business system by loading the target plug-in after the application corresponding to the business system is started includes: after the application corresponding to the business system is started, loading the target plug-in to obtain the interface resource set of the business system; obtaining the target function group with the target name from the interface resource set, and obtaining the interface metadata of the target interface of the business system from the target function group.
[0072] Exemplarily, obtaining the interface metadata of the target interface of the business system by loading the target plug-in includes the following S21 to S23: S21: Initialize the target function group to configure the target function group to: after the application starts, scan the interfaces under the specified package path to obtain the interface scan results, store the interface scan results in the target function group, and name the target function group as the target name.
[0073] Among them, the software package provides a default target function group. Initialize this target function group to configure the scanning behavior of the target plugin and store the scan results in this target function group. This target function group is named the target name, and this scan result is the above-mentioned interface scan interface.
[0074] Specifically, when initializing the target function group, it is equivalent to configuring this target function group so that after the application corresponding to the business system starts, this target function group will automatically scan all classes under the specified package path according to the configured path attribute. During the scanning process, extract all interface information with the API annotation and store this information as the interface scan results in the target function group. Finally, name the target function group as the target name for subsequent search and reference.
[0075] Exemplarily, when the software package is made based on Swagger, this target function group can be called the Swagger interface scan document function group. Initialize this Swagger interface scan document function group. This Swagger interface scan document function group will automatically scan all classes under the configured path attribute (such as the Swagger.doc.apiPackages package) after the application starts, obtain the interface scan results, store the interface scan results in the target function group, and name the target function group as the target name (such as SwaggerDocPlus).
[0076] S22: After the application corresponding to the business system starts, load the target plugin and obtain the interface resource set of the business system.
[0077] Specifically, after the application corresponding to the business system starts, it will automatically load the target plugin and obtain the set of interface resources, that is, the set of SwaggerResource. Loading the target plugin means activating the function of this target plugin so that it can access and operate the internal structure of the business system, thereby being able to identify and extract interface resources. The interface resource set includes several interface resources in the business system. Different interfaces correspond to different interface resources. For example, when accessing website a, it has different interfaces, and different interfaces correspond to different resources.
[0078] As described above, the target function group is configured to: after the application corresponding to the business system is started, scan the interfaces under the specified package path to obtain the interface scan results, store the interface scan results in the target function group, and name the target function group the target name. That is to say, the target function group will automatically scan the specified package path after the application is started, collect relevant interface information, and these interface information (i.e., interface metadata) will be organized and stored in the target function group. Therefore, the interface resource set of the business system includes the target function group with the target name. It can be understood that the Swagger native document service is also integrated in the business system. Therefore, after the application corresponding to the business system is started, the Swagger native document service will also scan all the interfaces in the business system and generate corresponding interface metadata, and these interface metadata generated by the Swagger native document service will also be integrated into the interface resource set. That is to say, the interface resource set of the business system includes the target function group with the target name and the interface metadata of each interface generated by the Swagger native document service.
[0079] S23: Obtain the target function group with the target name from the interface resource set, and obtain the interface metadata of the target interface of the business system from the target function group.
[0080] As described above, the interface resource set includes the target function group with the target name and the interface metadata of each interface generated by the Swagger native document service. Based on this, the target function group with the target name can be obtained from the interface resource set, and the corresponding interface metadata can be obtained from the target function group. The interface metadata in the target function group is the interface metadata of the target interface.
[0081] Specifically, the target name can be used as an identifier to search for the corresponding target function group in the interface resource set. Once the matching function group is found, the detailed interface metadata can be obtained from it as the interface metadata of the target interface.
[0082] Exemplarily, in combination with the above example, the interface resource set is the SwaggerResource set. Obtain the function group named SwaggerDocPlus from the SwaggerResource set, and obtain the Swagger interface metadata in the function group named SwaggerDocPlus as the interface metadata of the target interface to prepare the data for the subsequent conversion to the metadata format supported by the Blade platform.
[0083] In the above example, the target function group, as an independent functional unit, can be initialized and configured before the application starts. By simply adjusting the configuration parameters, it can adapt to different requirements. If new scan paths need to be added or changed, only the implementation of the target function group needs to be modified, without making large-scale changes to the entire business system. Assigning a specific target name to the target function group facilitates quickly locating and searching for the function group with the target name from the interface resource collection and extracting interface metadata therefrom, simplifying the process of obtaining the interface metadata of the target interface and improving the acquisition efficiency.
[0084] In step 202, the client pushes the interface metadata in the target format obtained by conversion to the target interface document platform, so that the target interface document platform generates a target interface document based on the interface metadata in the target format and displays the target interface document. For example, the interface metadata in the target format can be uploaded to the target interface document platform through an HTTP POST request. Or, the interface metadata in the target format is saved as a file (such as Swagger.json or Swagger.yaml), and then pushed to the target interface document platform through file upload.
[0085] After receiving the uploaded interface metadata, the target interface document platform will parse it. For example, it verifies whether the format of the interface metadata conforms to the specification and parses information such as paths, methods, parameters, and responses. Then, the target interface document platform generates a target interface document based on the parsed interface metadata. The target interface document platform can provide a visual interface and display the target interface document on this visual interface. In a specific implementation, the generated target interface document can be displayed in the form of a web page, and R & D personnel or testers can access it through a browser.
[0086] Exemplarily, the target interface document platform can have a preset display template, and the target interface document can be obtained by filling the parsed interface metadata into the preset display template.
[0087] Figure 3 It is an interaction schematic diagram of a method for processing interface metadata provided by an embodiment of the present application.
[0088] Exemplarily, as shown in 3, the method for processing the interface metadata includes: Step 301: The client detects the start of the application.
[0089] The above application can be understood as the application corresponding to the business system running in the client.
[0090] Step 302: It is recognized that the target plug-in becomes effective.
[0091] Step 303: Initialize the target plug-in.
[0092] Step 304: Generate interface metadata in Swagger format.
[0093] Among them, the interface metadata in Swagger format can be generated based on the Swagger tool, which can be understood as Figure 3 The Swagger native documentation service in .
[0094] Step 305: Load the target plug-in.
[0095] Step 306: Obtain interface metadata of the target interface in Swagger format.
[0096] Step 307: Convert the interface metadata in the Swagger format into the interface metadata in the target format.
[0097] Step 308: Push the interface metadata in the target format to the target interface document platform.
[0098] Among them, steps 301 to 308 are executed on the client side, and the following steps 309 and 310 are executed on the target interface document platform.
[0099] Step 309: Store the interface metadata in the target format in the target interface document platform through the data storage service.
[0100] The target interface document platform provides a data storage service to store the interface metadata in the target format in the target interface document platform through the data storage service. The target interface document platform generates a target interface document according to the received interface metadata in the target format.
[0101] Step 310: Read the target interface document through the data reading service.
[0102] The target interface document platform also provides data reading services, through which front-end developers or testers can view the target interface document. Front-end and back-end developers can communicate and conduct research and development based on the target interface document, thereby improving research and development efficiency and reducing communication and research and development costs. Figure 3 The centralized interface document service can be understood as the general term for the services provided by the target interface document platform. The centralized interface document service can include the above-mentioned data storage service and data reading service.
[0103] In the above embodiment, by pre-integrating the target plug-in in the business system, the functions of automatically acquiring the interface metadata, converting the format, and uploading it to the target interface document platform are realized, which not only simplifies the logic and reduces the cost, but also enhances the compatibility and user experience of the target interface document platform. It provides an efficient, accurate and flexible solution for front-end and back-end collaboration, which helps to improve the development efficiency and quality of the entire project.
[0104] To further facilitate the understanding of the embodiments of this application, the following takes the electronic signature management background application as an example to show how to access the target plug-in and generate a sample of the target interface document on the Blade platform: The first step: Access the software package corresponding to the target plug-in in the application project of the electronic signature management background application. This software package can be a maven package. This software package contains all the necessary components for implementing the functions of collecting, converting, and pushing Swagger interface metadata, and integrating this software package into the project dependencies provides a technical basis for the subsequent steps.
[0105] The second step: Obtain the configuration information of the target plug-in and configure the software package based on the configuration information to integrate the target plug-in in the business system. The configuration information can refer to Table 1 above.
[0106] The third step: After the electronic signature management background application is started, if the target plug-in has taken effect, it will automatically obtain the Swagger interface metadata of the target interface, convert the Swagger interface metadata into the Blade platform centralized metadata (i.e., the interface metadata in the target format), and push it to the Blade platform for integration to generate a centralized interface document and display it. The Blade platform receives and parses these interface metadata, generates an intuitive and easy-to-use target interface document, and provides an access entry for users. Front-end and back-end R & D personnel can communicate and collaborate based on this target interface document, significantly improving the R & D efficiency and reducing the communication costs and errors caused by inconsistent interface understanding.
[0107] Figure 4 It is a schematic diagram of a display interface provided by the Blade platform in the embodiments of this application.
[0108] Exemplarily, as Figure 4 shown, this display interface includes: a first display area 401, a second display area 402, and a third display area 403.
[0109] Among them, the first display area 401 is used to display the application name of the application corresponding to the business system (schematically shown as "electronic signature management background application" in the figure). The second display area 402 is used to display the list 4021 corresponding to the target interface and the search box 4022. The list 4021 includes the list of interface names corresponding to the target interface and the list of data types.
[0110] When it is detected that the user (a R & D personnel or a tester) swipes the list 4021 and selects a certain interface name therein, control the third display area 403 to display the detailed content of the interface metadata corresponding to the selected interface name by the user. When it is detected that the user inputs an interface keyword in the search box 4022, control the third display area 403 to display the detailed content of the interface metadata corresponding to the interface keyword. When it is detected that the user inputs a data type keyword in the search box 4022, control the third display area 403 to display the description information corresponding to the data type keyword.
[0111] Exemplarily, as Figure 4 shown, the detailed content of the interface metadata displayed in the third display area 403 includes: the interface name (exemplarily shown as createBasic in the figure), the description information of the interface (exemplarily shown as adding basic information in the figure), the input parameters of the interface and the data view. Among them, the input parameters of the interface include the name (exemplarily shown as createBasicReqDTO in the figure) and the type (exemplarily shown as TypeScript in the figure). The data view can be a JSON view, and the content of the data view is used to describe the types and corresponding description explanations of the respective fields related to createBasicReqDTO, so as to facilitate the user to understand the meanings of the respective fields.
[0112] Figure 5 is a schematic diagram of a processing system for interface metadata provided by an embodiment of the present application.
[0113] Exemplarily, as Figure 5 shown, the processing system for the interface metadata includes: a client 101 and a target interface document platform 102; The client 101 is used to obtain the interface metadata of the target interface of the business system, convert the data format of the interface metadata to obtain the interface metadata in the target format, and upload the interface metadata in the target format to the target interface document platform; wherein, the target format is the format supported by the target interface document platform.
[0114] The target interface document platform 102 is used to generate a target interface document according to the interface metadata in the target format and display the target interface document.
[0115] In a possible implementation manner, the client 101 is specifically used to integrate a target plugin in the business system, and after the application corresponding to the business system is started, obtain the interface metadata of the target interface of the business system by loading the target plugin, and convert the data format of the interface metadata to obtain the interface metadata in the target format.
[0116] In a possible implementation, the client 101 is specifically configured to access the software package corresponding to the target plug-in in the business system; wherein, the software package includes attributes to be configured; obtain configuration information for the attributes to be configured; and configure the software package based on the configuration information to integrate the target plug-in in the business system.
[0117] In a possible implementation, the attributes to be configured include an activation attribute for describing whether the target plug-in is allowed to take effect in the business system. The client 101 is specifically configured to initialize the target function group before the application corresponding to the business system is started, so as to configure the target function group to: scan the interfaces under the specified package path after the application is started to obtain an interface scan result, store the interface scan result in the target function group, and name the target function group with a target name; after the application corresponding to the business system is started, load the target plug-in, obtain the interface resource set of the business system; obtain the target function group with the target name from the interface resource set, and obtain the interface metadata of the target interface of the business system from the target function group.
[0118] In a possible implementation, the software package includes a target function group. The client 101 is configured to initialize the target function group, so that the target function group scans the interfaces under the specified package path to obtain an interface scan result, store the interface scan result in the target function group, and name the target function group with a target name; load the target plug-in, obtain the interface resource set of the business system; obtain the target function group with the target name from the interface resource set to obtain the interface metadata of the target interface of the business system.
[0119] In a possible implementation, the client 101 is specifically configured to parse the interface metadata to determine the difference information between the format of the interface metadata and the target format supported by the target interface document platform; and convert the data format of the interface metadata according to the difference information to obtain the interface metadata in the target format.
[0120] Figure 6 It is a schematic structural diagram of a device for processing interface metadata provided by an embodiment of the present application.
[0121] Exemplarily, such as Figure 6As shown in the figure, the processing device 600 for interface metadata includes: a data processing module 601, configured to obtain the interface metadata of a target interface of a service system and convert the data format of the interface metadata to obtain interface metadata in a target format; wherein the target format is a format supported by the target interface document platform; an upload module 602, configured to upload the interface metadata in the target format to the target interface document platform, so that the target interface document platform generates a target interface document based on the interface metadata in the target format and displays the target interface document.
[0122] In a possible implementation manner, the processing device for interface metadata further includes: a plugin integration module, configured to integrate a target plugin in the service system; the data processing module 601 is specifically configured to: after the application corresponding to the service system is started, obtain the interface metadata of the target interface of the service system by loading the target plugin, and convert the data format of the interface metadata to obtain interface metadata in a target format.
[0123] In a possible implementation manner, the plugin integration module is specifically configured to: access the software package corresponding to the target plugin in the service system; wherein the software package includes attributes to be configured; obtain the configuration information for the attributes to be configured; and configure the software package based on the configuration information to integrate the target plugin in the service system.
[0124] In a possible implementation manner, the attributes to be configured include an effective attribute for describing whether the target plugin is allowed to take effect in the service system; the data processing module 601 is specifically configured to: after the application corresponding to the service system is started, identify whether the target plugin takes effect in the service system according to the effective attribute; and when the target plugin takes effect, obtain the interface metadata of the target interface of the service system by loading the target plugin, and convert the data format of the interface metadata to obtain interface metadata in a target format.
[0125] In a possible implementation, the software package includes a target function group, which is used to scan each class under a specified package path, and the attribute to be configured includes a path attribute for configuring the specified package path; specifically, the data processing module 601 is configured to: before the application corresponding to the service system is started, initialize the target function group to configure the target function group to: after the application is started, scan the interfaces under the specified package path to obtain an interface scan result, store the interface scan result in the target function group, and name the target function group with a target name; after the application corresponding to the service system is started, load the target plugin, obtain the interface resource set of the service system; obtain the target function group with the target name from the interface resource set, and obtain the interface metadata of the target interface of the service system from the target function group.
[0126] In a possible implementation, the data processing module 601 is specifically configured to: analyze the interface metadata to determine the difference information between the format of the interface metadata and the target format supported by the target interface document platform; according to the difference information, convert the data format of the interface metadata to obtain the interface metadata in the target format.
[0127] Figure 7 It is a schematic structural diagram of a client provided by an embodiment of the present application.
[0128] Exemplarily, as Figure 7 shown, the client 101 includes: a memory 701 and a processor 702, wherein, an executable program code 7011 is stored in the memory 701, and the processor 702 is configured to call and execute the executable program code 7011 to execute a method for processing interface metadata.
[0129] In addition, an embodiment of the present application also protects a device, which may include a memory and a processor, wherein, an executable program code is stored in the memory, and the processor is configured to call and execute the executable program code to execute a method for processing interface metadata provided by an embodiment of the present application.
[0130] In this embodiment, the device may be divided into functional modules according to the above method examples. For example, each functional module may correspond, or two or more functions may be integrated into one processing module, and the above integrated module may be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is illustrative, only a logical function division, and there may be other division methods in actual implementation.
[0131] In the case of dividing each functional module corresponding to each function, the device may further include a data processing module, an upload module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be cited in the function description of the corresponding functional module, and will not be elaborated here.
[0132] It should be understood that the device provided in this embodiment is used to execute the above method for processing interface metadata, so the same effect as the above implementation method can be achieved.
[0133] In the case of adopting an integrated unit, the device may include a processing module and a storage module. Among them, when the device is applied to a client, the processing module can be used to control and manage the actions of the client. The storage module can be used to support the client to execute relevant program codes, etc.
[0134] Among them, the processing module can be a processor or a controller, which can implement or execute various exemplary logic blocks, modules and circuits shown in combination with the disclosure of the present application. The processor can also be a combination that realizes computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module can be a memory.
[0135] In addition, the device provided in the embodiment of the present application can specifically be a chip, a component or a module. The chip may include a connected processor and a memory; among them, the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute the method for processing interface metadata provided in the above embodiment.
[0136] This embodiment also provides a computer-readable storage medium, in which computer program code is stored. When the computer program code runs on a computer, the computer is enabled to execute the above relevant method steps to implement the method for processing interface metadata provided in the above embodiment.
[0137] This embodiment also provides a computer program product. When the computer program product runs on a computer, the computer is enabled to execute the above relevant steps to implement the method for processing interface metadata provided in the above embodiment.
[0138] Among them, the device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be elaborated here.
[0139] Through the description of the above embodiments, those skilled in the art can understand that for the convenience and brevity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0140] In the embodiments provided in the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical functional division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in electrical, mechanical or other forms.
[0141] The above content is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present application can easily think of changes or substitutions, which should all be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for processing interface metadata, characterized in that, The method includes: Obtaining interface metadata of a target interface of a business system, and converting the data format of the interface metadata to obtain interface metadata in a target format; wherein, the target format is a format supported by a target interface document platform; Uploading the interface metadata in the target format to the target interface document platform, so that the target interface document platform generates a target interface document based on the interface metadata in the target format and displays the target interface document.
2. The method according to claim 1, wherein Before obtaining interface metadata of a target interface of a business system and converting the data format of the interface metadata to obtain interface metadata in a target format, the method further includes: Integrating a target plugin into the business system; The obtaining interface metadata of a target interface of a business system and converting the data format of the interface metadata to obtain interface metadata in a target format includes: After the application corresponding to the business system is started, by loading the target plugin, obtaining interface metadata of a target interface of the business system and converting the data format of the interface metadata to obtain interface metadata in a target format.
3. The method according to claim 2, wherein The integrating a target plugin into the business system includes: Connecting a software package corresponding to the target plugin in the business system; wherein, the software package includes attributes to be configured; Obtaining configuration information for the attributes to be configured; Configuring the software package based on the configuration information to integrate the target plugin into the business system.
4. The method according to claim 3, characterized in that, The attributes to be configured include an enabling attribute for describing whether the target plugin is allowed to take effect in the business system; After the application corresponding to the business system is started, by loading the target plugin, obtaining interface metadata of a target interface of the business system and converting the data format of the interface metadata to obtain interface metadata in a target format includes: After the application corresponding to the business system is started, identifying whether the target plugin takes effect in the business system according to the enabling attribute; In the case where the target plugin takes effect, by loading the target plugin, obtaining interface metadata of a target interface of the business system and converting the data format of the interface metadata to obtain interface metadata in a target format.
5. The method according to claim 3, characterized in that, The software package includes a target function group; before the application corresponding to the business system is started, the method further includes: Initializing the target function group to configure the target function group to: scan interfaces under a specified package path after the application is started to obtain an interface scan result, store the interface scan result in the target function group, and name the target function group with a target name; After the application corresponding to the business system is started, by loading the target plugin, obtaining interface metadata of a target interface of the business system includes: After the application corresponding to the business system is started, loading the target plugin to obtain a set of interface resources of the business system; Obtaining the target function group with the target name from the set of interface resources and obtaining interface metadata of a target interface of the business system from the target function group.
6. The method according to claim 1, wherein Converting the data format of the interface metadata to obtain interface metadata in a target format includes: Parsing the interface metadata to determine the difference information between the format of the interface metadata and the target format supported by the target interface document platform; Converting the data format of the interface metadata according to the difference information to obtain interface metadata in a target format.
7. A processing system for interface metadata, characterized in that, It includes: A client and a target interface document platform; The client is used to obtain the interface metadata of the target interface of the business system, convert the data format of the interface metadata to obtain interface metadata in a target format, and upload the interface metadata in the target format to the target interface document platform; wherein, the target format is the format supported by the target interface document platform; The target interface document platform is used to generate a target interface document based on the interface metadata in the target format and display the target interface document.
8. A processing device for interface metadata, characterized in that, The device includes: A data processing module, which is used to obtain the interface metadata of the target interface of the business system, and convert the data format of the interface metadata to obtain interface metadata in a target format; wherein, the target format is the format supported by the target interface document platform; An upload module, which is used to upload the interface metadata in the target format to the target interface document platform, so that the target interface document platform generates a target interface document based on the interface metadata in the target format and displays the target interface document.
9. A client, characterized in that, The client includes: A memory for storing executable program code; A processor for calling and running the executable program code from the memory, so that the client executes the method described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed, the method described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Interface document generation method and device, machine readable medium and equipment
CN113031925A
Interface document display method and device, storage medium and electronic equipment
CN113961239A
Editing assisting method and system for code editor and electronic equipment
CN118502735A
Back-end interface document generation method and device, electronic equipment and storage medium
CN119829123A