A swagger-based data service management method, device and medium
By combining the Swagger specification and the Gateway extension gateway, the problems of low efficiency and difficulty in microservice integration in digital data service management are solved, realizing online interface integration and configuration, and improving management efficiency and processing capabilities.
Patent Information
- Application Number
- CN202411051350.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-08-01
AI Technical Summary
Existing digital data service management methods are inefficient, have poor processing capabilities, and cannot solve the problem of online integration of microservices.
Define interface data using Swagger specifications, generate interface definition documents and set document format, use Gateway extension gateway for document visualization, build interface service configuration gateway, scan and integrate online service interface pool to realize comprehensive service interfaces.
It enables online integration of service interfaces and online configuration of interface microservices, improving the efficiency and processing capacity of digital data service management.
Smart Images

Figure CN118984338B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of enterprise data management, and particularly relates to a data service management method, device and medium based on Swagger. BACKGROUND
[0002] With the advent of the digital era, various digital service systems emerge in an endless stream, and the interface interaction between systems becomes increasingly complex. The traditional interface management method has many shortcomings, such as scattered interface documents, chaotic version management, low interface test efficiency and the like, which seriously affects the development, test and maintenance efficiency of digital services.
[0003] Swagger, as a widely used API document generation tool, can automatically generate, update and display RESTful style Web service interface documents, greatly simplifying the writing and maintenance work of interface documents. However, under the micro-service architecture, since there are many services and they are distributed on different nodes, using Swagger alone for interface management has the problems of low efficiency and poor processing capacity. Each micro-service needs to be independently configured with Swagger, resulting in scattered interface documents, which is not conducive to centralized management and unified display, and the existing data service management method cannot solve the online integration of micro-services. SUMMARY
[0004] The embodiments of the present application provide a data service management method, device and medium based on Swagger, which solve the technical problems of low efficiency, poor processing capacity and inability to solve online integration of micro-services of the prior art digital data service management method.
[0005] In a first aspect, the embodiments of the present application provide a data service management method based on Swagger, characterized in that the method comprises: defining system data interfaces through interface data by a preset Swagger specification to obtain data service interfaces; generating corresponding interface definition documents based on the interface rules of the data service interfaces, and setting the document format of the interface definition documents to obtain online interface documents; performing document visualization on the online interface documents based on a preset Gateway extension gateway to obtain an interface service configuration gateway; obtaining an online service interface pool through interface parameter configuration according to the interface service configuration gateway and the online interface documents; and performing service integration on the data service interfaces in the online service interface pool to obtain a comprehensive service interface.
[0006] In the embodiment of the present application, the system data interface is defined by the pre-set Swagger specification, and a data service interface is obtained, specifically including: constructing a first data service interface based on the Swagger specification; constructing an interface configuration item of the first data service interface to obtain a second data service interface; wherein the interface configuration item includes: interface path, request method, interface parameter, and corresponding condition; configuring the second data service interface with the interface configuration item to obtain the data service interface.
[0007] In the embodiment of the present application, the interface definition document is generated based on the interface rule of the data service interface, specifically including: analyzing the interface rule of the data service interface to determine interface document generation parameters; the interface document generation parameters include: interface path parameters, request method parameters, interface parameters, and corresponding condition parameters; generating the interface definition document by the Swagger interface document based on the interface document generation parameters.
[0008] In the embodiment of the present application, the interface service configuration gateway is obtained by visualizing the online interface document based on the pre-set Gateway extension gateway, specifically including: extending the gateway configuration of the pre-set basic Gateway gateway to determine the visualized Gateway gateway; intercepting the service request of the online interface document based on the visualized Gateway gateway to obtain a service interface access portal; updating the service interface access portal to the visualized Gateway gateway to obtain the interface service configuration gateway.
[0009] In the embodiment of the present application, the online service interface pool is obtained by interface parameter configuration according to the interface service configuration gateway and the online interface document, specifically including: matching the online interface document by the interface service configuration gateway to determine an interface scanning strategy; scanning the registered interface of the pre-set service bus based on the interface scanning strategy to obtain the online service interface pool.
[0010] In the embodiment of the present application, the data service interface in the online service interface pool is integrated to obtain a comprehensive service interface, specifically including: determining service integration requirement data by business requirement configuration based on the online service interface pool; matching the corresponding data service interface according to the service integration requirement data to obtain an integrated data interface group; querying the integrated parameter adaptation degree of the integrated data interface group to determine the integration judgment result of the integrated data interface group; in the case that the integration judgment result is integrable, integrating the integrated data interface group to obtain the comprehensive service interface.
[0011] In the embodiments of the present application, after the registration interfaces of the preset service bus are scanned based on the interface scanning strategy to obtain the online service interface pool, the method further comprises: interface selection on the online service interface pool, service requirement configuration on the data service interface selected by the interface selection, to obtain data service interface update parameters; updating the data service interface update parameters to the data service interface, to obtain a data service interface update document.
[0012] In the embodiments of the present application, after the data service interface in the online service interface pool is integrated to obtain the comprehensive service interface, the method further comprises: service state monitoring on the preset data service management state based on the comprehensive service interface and the interface service configuration gateway; wherein the service state monitoring comprises: load monitoring, permission monitoring, log management, traffic monitoring, and exception monitoring; updating the data service management state according to the service state monitoring, and updating the management strategy of the data service management according to the updated data service management state.
[0013] In the second aspect, the embodiments of the present application also provide a data service management device based on Swagger, characterized in that the device comprises: at least one processor; and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: define the system data interface by interface data based on a preset Swagger specification, to obtain a data service interface; generate a corresponding interface definition document based on the interface rules of the data service interface, and set the format of the interface definition document, to obtain an online interface document; perform document visualization on the online interface document based on a preset Gateway extension gateway, to obtain an interface service configuration gateway; obtain an online service interface pool through interface parameter configuration based on the interface service configuration gateway and the online interface document; and integrate the data service interface in the online service interface pool, to obtain a comprehensive service interface.
[0014] In a third aspect, the embodiments of the present application further provide a nonvolatile computer storage medium for Swagger-based data service management, which stores computer executable instructions, and the computer executable instructions are configured to: define interface data of a system data interface through a preset Swagger specification to obtain a data service interface; generate a corresponding interface definition document based on an interface rule of the data service interface, and set a document format of the interface definition document to obtain an online interface document; perform document visualization on the online interface document based on a preset Gateway extension gateway to obtain an interface service configuration gateway; obtain an online service interface pool through interface parameter configuration according to the interface service configuration gateway and the online interface document; and integrate services of the data service interface in the online service interface pool to obtain a comprehensive service interface.
[0015] The embodiments of the present application provide a Swagger-based data service management method and device and medium, which solve the technical problems of low efficiency, poor processing capacity and inability to solve online integration of micro services in the prior art by online document visualization and integration of service interfaces in an interface pool, realize online integration of service interfaces and online configuration of interface micro services, and improve the efficiency and processing capacity of digital data service management. BRIEF DESCRIPTION OF DRAWINGS
[0016] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and serve to explain the principles of the application. In the drawings:
[0017] Figure 1 A Swagger-based data service management method flowchart is provided for the embodiments of the present application.
[0018] Figure 2 An internal structure schematic diagram of a Swagger-based data service management device is provided for the embodiments of the present application. DETAILED DESCRIPTION
[0019] To make the objectives, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be described below in conjunction with the embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0020] The embodiment of the application provides a data service management method, device and medium based on Swagger, which integrates service interfaces in an online document visualization and an interface pool, solves the technical problems of low efficiency, poor processing capacity and incapability of solving online integration of micro services of a digital data service management method in the prior art, realizes online integration of service interfaces and online configuration of interface micro services, and improves the efficiency and processing capacity of digital data service management.
[0021] The technical solutions provided by the embodiments of the application are described in detail below with reference to the drawings.
[0022] Figure 1 A data service management method based on Swagger provided by the embodiment of the application is shown in a flowchart. Figure 1 As shown in the figure, the data service management method based on Swagger provided by the embodiment of the application specifically includes the following steps:
[0023] Step 101, interface data definition of system data interfaces is performed through a preset Swagger specification, and a data service interface is obtained.
[0024] Specifically, the following steps are included: a first data service interface is constructed based on the Swagger specification; interface configuration items of the first data service interface are constructed to obtain a second data service interface; wherein the interface configuration items include an interface path, a request method, interface parameters and corresponding conditions; the second data service interface is configured with the interface configuration items to obtain the data service interface.
[0025] The application realizes automatic generation and online configuration of the data service interface by designing the Swagger specification and performing interface data definition of the system data interface to obtain the data service interface, and improves the generation efficiency of the data service interface in service management.
[0026] In the embodiment of the application, the following example 1 is used for detailed explanation.
[0027] Example 1: Swagger is an open source API specification and tool set, which can be used to define, construct and document RESTful style web services.
[0028] Swagger provides a unified way to describe and interact with service interfaces, and can automatically generate interface documents.
[0029] Data service, namely micro service, provides an API gateway technology, which can centrally manage and control all service requests and provide a unified access entry.
[0030] In step 102, an interface definition document corresponding to the interface rule of the data service interface is generated based on the interface rule of the data service interface, and the interface definition document is formatted to obtain an online interface document.
[0031] Specifically, the interface rule of the data service interface is parsed to determine interface document generation parameters; the interface document generation parameters include an interface path parameter, a request method parameter, an interface parameter, and a corresponding condition parameter; and the interface definition document is obtained through Swagger interface document generation based on the interface document generation parameters.
[0032] Based on the interface rule of the data service interface, the application generates an interface definition document corresponding to the interface rule, and formats the interface definition document to obtain an online interface document, thereby realizing online generation of the interface document and providing a data basis for business interface configuration.
[0033] In the embodiments of the application, example 2 is used for detailed explanation.
[0034] Example 2: The interface rule of the data service interface is parsed to determine interface document generation parameters, and an interface document is automatically generated according to the Swagger specification and using related tools and libraries.
[0035] These tools can parse Swagger specification files and generate documents according to the information defined in the specification, including detailed descriptions of the path, request method, parameters, and response of the interface.
[0036] The generated document can be presented in HTML, Markdown, or other formats, facilitating developers and users to check and understand the service interface.
[0037] In step 103, the online interface document is visualized based on a preset Gateway extension gateway to obtain an interface service configuration gateway.
[0038] Specifically, the preset basic Gateway gateway is configured and extended to determine a visualized Gateway gateway; the service request of the online interface document is intercepted based on the visualized Gateway gateway to obtain a service interface access portal; and the service interface access portal is updated to the visualized Gateway gateway to obtain the interface service configuration gateway.
[0039] Based on the preset Gateway extension gateway, the application visualizes the online interface document to obtain an interface service configuration gateway, thereby realizing visualization and online configuration of the interface service configuration and improving the efficiency of the interface service configuration.
[0040] In the embodiments of the application, example 3 is used for detailed explanation.
[0041] Example 3: Through the Gateway gateway technology, the access of the management and control data service is realized. The Gateway serves as an intermediate layer, intercepts all service requests, and provides a unified access portal.
[0042] The Gateway gateway can verify the legality of the request, conduct identity authentication and authorization, and realize the management of access permissions. At the same time, the Gateway can also provide load balancing, caching, flow limiting and other functions to enhance the reliability and performance of the service.
[0043] Since the inherent layer of the Gateway gateway cannot realize the visualization and online configuration of the interface service configuration on the user side, the Gateway gateway is extended in the application, and the visualization is realized through the addition of the gateway layer, that is, the interface service configuration gateway.
[0044] The client interface of the interface service configuration gateway is a list of service requests.
[0045] Step 104, according to the interface service configuration gateway and the online interface document, the online service interface pool is obtained through interface parameter configuration.
[0046] Specifically, the interface service configuration gateway matches the online interface document to determine the interface scanning strategy; based on the interface scanning strategy, the registered interface of the preset service bus is scanned to obtain the online service interface pool.
[0047] After the online service interface pool is obtained by scanning the registered interface of the preset service bus based on the interface scanning strategy, the method further comprises: selecting the interface of the online service interface pool, and configuring the service demand of the interface selected data service interface to obtain the data service interface update parameter; updating the data service interface update parameter to the data service interface to obtain the data service interface update document.
[0048] According to the interface service configuration gateway and the online interface document, the online service interface pool is obtained through interface parameter configuration in the application, which realizes the online configuration of the interface micro service of the business service, and improves the efficiency and processing capacity of the digital data service management.
[0049] In the embodiments of the application, the following example 4 is used for detailed explanation.
[0050] Example 4: The interface service configuration gateway matches the online interface document to determine the interface scanning strategy, scans the registered interface of the preset service bus, and obtains the online service interface pool. Through automatic scanning of the data interface registered on the service bus, the online interface pool is formed, and new data services can be formed according to the selected interface, and the parameters and return values are automatically filled to form a new service interface document.
[0051] Step 105, service integration is performed on the data service interface in the online service interface pool to obtain a comprehensive service interface.
[0052] Specifically, based on the online service interface pool, service integration demand data is determined through business demand configuration, corresponding data service interfaces are matched according to the service integration demand data to obtain an integrated data interface group, integration parameter adaptation degree query is performed on the integrated data interface group to determine an integration judgment result of the integrated data interface group, and in the case that the integration judgment result is integrable, the integrated data interface group is integrated to obtain a comprehensive service interface.
[0053] After the data service interface in the online service interface pool is integrated to obtain a comprehensive service interface, the method further comprises: based on the comprehensive service interface and the interface service configuration gateway, service state monitoring is performed on a preset data service management state; wherein the service state monitoring comprises: load monitoring, permission monitoring, log management, traffic monitoring, and exception monitoring; the data service management state is updated according to the service state monitoring, and the management strategy of the data service management is updated according to the updated data service management state.
[0054] The present application integrates the data service interface in the online service interface pool to obtain a comprehensive service interface and monitors the service state of the preset data service management state, realizes online integration of the service interface and online configuration of the interface micro service, and improves the efficiency and processing capacity of the digital data service management.
[0055] In the embodiments of the present application, the following example 5 is used for detailed explanation.
[0056] Example 5: based on the online service interface pool, service integration demand data is determined through business demand configuration, corresponding data service interfaces are matched according to the service integration demand data to obtain an integrated data interface group, integration parameter adaptation degree query is performed on the integrated data interface group to determine an integration judgment result of the integrated data interface group, and in the case that the integration judgment result is integrable, the integrated data interface group is integrated to obtain a comprehensive service interface.
[0057] Since the micro service takes a certain service as a starting point in the actual execution process, it is necessary to integrate the micro service to realize multifunctional micro service in the actual application process.
[0058] According to the parameters of the data service interface, whether the micro service that wants to be integrated can be integrated is judged through the internal parameters, parameter types and parameter sources in the parameter mapping.
[0059] It should be noted that the types of the Swagger interface document in the present application specifically include: standard data services, model achievement interfaces, enterprise portrait labels, and other interface modules.
[0060] The above is the method embodiment of the present application. Based on the same inventive concept, the present application embodiment also provides a Swagger-based data service management device, the structure of which is as shown in Figure 2 .
[0061] Figure 2 The above is the method embodiment of the present application. Based on the same inventive concept, the present application embodiment also provides a Swagger-based data service management device, the structure of which is as shown in Figure 2 .
[0062] at least one processor 201;
[0063] and a memory 202 in communication connection with the at least one processor;
[0064] The memory 202 stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor 201 to enable the at least one processor 201 to:
[0065] By the preset Swagger specification, the system data interface is defined for interface data to obtain a data service interface; based on the interface rules of the data service interface, a corresponding interface definition document is generated, and the interface definition document is set for document format to obtain an online interface document; based on the preset Gateway extension gateway, the online interface document is visualized for document to obtain an interface service configuration gateway; according to the interface service configuration gateway and the online interface document, an online service interface pool is obtained through interface parameter configuration; and the data service interface in the online service interface pool is integrated for service to obtain a comprehensive service interface.
[0066] The non-volatile computer storage medium provided by some embodiments of the present application for the Swagger-based data service management is stored with computer executable instructions, and the computer executable instructions are set to: Figure 1
[0067] The system data interface is defined by an interface data through a preset Swagger specification, and a data service interface is obtained; an interface definition document is generated based on an interface rule of the data service interface, and a document format of the interface definition document is set to obtain an online interface document; the online interface document is visualized based on a preset Gateway extension gateway to obtain an interface service configuration gateway; an online service interface pool is obtained through interface parameter configuration according to the interface service configuration gateway and the online interface document; and the data service interface in the online service interface pool is integrated to obtain a comprehensive service interface.
[0068] The embodiments in the present application are described in a progressive manner, and the same or similar parts of each embodiment can be referred to each other. Each embodiment mainly describes the difference from other embodiments. Especially, the IoT device and medium embodiments are basically similar to the method embodiments, and thus are described simply. The related parts can be referred to the description of the method embodiments.
[0069] The system and medium provided by the embodiments in the present application are one-to-one corresponding to the method, and thus have similar beneficial technical effects. The beneficial technical effects of the method have been described in detail above, and thus the beneficial technical effects of the system and medium are not described here.
[0070] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
[0071] The present application is described with reference to flowcharts and / or block diagrams according to the method, device (system), and computer program product of the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the computer or other programmable data processing devices produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The function of one flow or multiple flows and / or blocks Figure 1 The device that implements the function specified in one block or multiple blocks.
[0072] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the Figure 1 function specified in the flow or flows and / or blocks Figure 1 of the block or blocks.
[0073] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the Figure 1 function specified in the flow or flows and / or blocks Figure 1 of the block or blocks.
[0074] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0075] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory, non-volatile memory, such as read-only memory (ROM), EPROM, and / or flash memory, etc. The memory is an example of computer readable media.
[0076] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile discs (DVDs) or other optical storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.
[0077] It should also be noted that the terms "comprising", "comprises" or other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus.
[0078] The above embodiments are only used to illustrate the present application, but not to limit it. Instead of the above, various modifications and changes can be made to the application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the application shall fall into the scope of the claims of the application.
Claims
1. A method for managing Swagger-based data services, the method comprising: The method includes: By using the pre-defined Swagger specification, the system data interfaces are defined to obtain the data service interfaces; Based on the interface rules of the data service interface, a corresponding interface definition document is generated, and the document format of the interface definition document is set to obtain an online interface document; Based on the preset Gateway extension gateway, the online interface document is visualized to obtain the interface service configuration gateway; Based on the interface service configuration gateway and the online interface documentation, the online service interface pool is obtained through interface parameter configuration; The data service interfaces in the online service interface pool are integrated to obtain a comprehensive service interface; By defining the system data interfaces using the pre-defined Swagger specifications, the data service interfaces are obtained, which specifically include: Based on the Swagger specification, construct the first data service interface; The first data service interface is configured with interface configuration items to obtain the second data service interface; wherein, the interface configuration items include: interface path, request method, interface parameters, and corresponding conditions; Configure the interface configuration items of the second data service interface to obtain the data service interface; Based on the interface rules of the data service interface, a corresponding interface definition document is generated, specifically including: The data service interface is parsed to determine the interface document generation parameters; the interface document generation parameters include: interface path parameters, request method parameters, interface parameters, and corresponding condition parameters. Based on the interface document generation parameters, the interface definition document is obtained through Swagger interface document generation. Based on a preset Gateway extension gateway, the online interface documentation is visualized to obtain the interface service configuration gateway, specifically including: Extend the gateway configuration of the preset basic gateway to determine the visual gateway. Based on the visual gateway, the service request of the online interface document is intercepted to obtain the service interface access point; Update the service interface access entry to the visual Gateway to obtain the interface service configuration gateway.
2. The method of claim 1, wherein the Swagger-based data service management method is characterized by, Based on the interface service configuration gateway and the online interface documentation, the online service interface pool is obtained through interface parameter configuration, specifically including: The gateway is configured to match the online interface documentation through the interface service configuration to determine the interface scanning strategy. Based on the interface scanning strategy, the registration interfaces of the preset service bus are scanned to obtain the online service interface pool.
3. The method of claim 1, wherein the Swagger-based data service management method further comprises: The data service interfaces in the online service interface pool are integrated to obtain a comprehensive service interface, specifically including: Based on the online service interface pool, service integration requirement data is determined through business requirement configuration; Based on the service integration requirement data, the corresponding data service interface is matched to obtain the integrated data interface group; Perform an integration parameter compatibility query on the integrated data interface group to determine the integration judgment result of the integrated data interface group; In the case that the integration judgment result is integrable, the integration data interface groups are integrated to obtain the comprehensive service interface.
4. The method of claim 2, wherein the Swagger-based data service management method further comprises: After scanning the registered interfaces of the preset service bus based on the interface scanning strategy to obtain the online service interface pool, the method further comprises: performing interface selection on the online service interface pool and service demand configuration on the data service interface selected by the interface selection to obtain data service interface update parameters; updating the data service interface update parameters to the data service interface to obtain a data service interface update document.
5. The method of claim 1, wherein the Swagger-based data service management method further comprises: After performing service integration on the data service interfaces in the online service interface pool to obtain a comprehensive service interface, the method further comprises: based on the comprehensive service interface and the interface service configuration gateway, performing service state monitoring on the preset data service management state; wherein the service state monitoring comprises load monitoring, permission monitoring, log management, traffic monitoring, and exception monitoring; updating the data service management state according to the service state monitoring, and updating the management strategy of the data service management according to the updated data service management state. 6.A Swagger-based data service management device, characterized by, The device comprises: at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: define the system data interface by interface data based on a preset Swagger specification to obtain a data service interface; generate a corresponding interface definition document based on the interface rules of the data service interface, and set the format of the interface definition document to obtain an online interface document; based on a preset Gateway extension gateway, the online interface document is visualized to obtain an interface service configuration gateway; according to the interface service configuration gateway and the online interface document, an online service interface pool is obtained through interface parameter configuration; perform service integration on the data service interfaces in the online service interface pool to obtain a comprehensive service interface; define the system data interface by interface data based on a preset Swagger specification to obtain a data service interface, specifically comprising: based on the Swagger specification, a first data service interface is constructed; performing interface configuration item construction on the first data service interface to obtain a second data service interface; wherein the interface configuration item comprises: interface path, request method, interface parameter, and corresponding condition; configuring the second data service interface with the interface configuration item to obtain the data service interface; based on the interface rules of the data service interface, a corresponding interface definition document is generated, specifically comprising: performing interface rule analysis on the data service interface to determine interface document generation parameters; the interface document generation parameters comprise: interface path parameters, request method parameters, interface parameters, and corresponding condition parameters; based on the interface document generation parameters, the interface definition document is obtained through Swagger interface document generation. The online interface document is subjected to document visualization based on the preset Gateway extension gateway, and an interface service configuration gateway is obtained, specifically including: The preset basic Gateway gateway is subjected to gateway configuration extension, and a visualized Gateway gateway is determined; Based on the visualized Gateway gateway, a service request of the online interface document is intercepted, and a service interface access portal is obtained; The service interface access portal is updated to the visualized Gateway gateway, so as to obtain the interface service configuration gateway. 7.A non-transitory computer storage medium storing computer-executable instructions for Swagger-based data service management, the computer-executable instructions comprising: The computer executable instructions are set as: Through the preset Swagger specification, the system data interface is subjected to interface data definition, and a data service interface is obtained; Based on the interface rules of the data service interface, a corresponding interface definition document is generated, and the interface definition document is subjected to document format setting, so as to obtain an online interface document; Based on the preset Gateway extension gateway, the online interface document is subjected to document visualization, and an interface service configuration gateway is obtained; According to the interface service configuration gateway and the online interface document, an online service interface pool is obtained through interface parameter configuration; The data service interface in the online service interface pool is subjected to service integration, so as to obtain a comprehensive service interface; Through the preset Swagger specification, the system data interface is subjected to interface data definition, and a data service interface is obtained, specifically including: Based on the Swagger specification, a first data service interface is constructed; The first data service interface is subjected to interface configuration item construction, so as to obtain a second data service interface; wherein the interface configuration item includes: interface path, request method, interface parameter, and corresponding condition; The second data service interface is subjected to configuration of the interface configuration item, so as to obtain the data service interface; Based on the interface rules of the data service interface, a corresponding interface definition document is generated, specifically including: The data service interface is subjected to interface rule analysis, and interface document generation parameters are determined; the interface document generation parameters include: interface path parameters, request method parameters, interface parameters, and corresponding condition parameters; Based on the interface document generation parameters, the Swagger interface document is generated, so as to obtain the interface definition document; Based on the preset Gateway extension gateway, the online interface document is subjected to document visualization, and an interface service configuration gateway is obtained, specifically including: The preset basic Gateway gateway is subjected to gateway configuration extension, and a visualized Gateway gateway is determined; Based on the visualized Gateway gateway, a service request of the online interface document is intercepted, and a service interface access portal is obtained; The service interface access portal is updated to the visualized Gateway gateway, so as to obtain the interface service configuration gateway.
Citation Information
Patent Citations
Interface document generation method and system and storage medium
CN113641355A
Interface document generation method and device, nonvolatile storage medium and electronic equipment
CN116755768A