Multi-language SDK generation method and system supporting OpenAPI gateway interface, terminal and medium
By configuring and using intermediate language templates, SDK codes for different programming languages are automatically generated, which solves the complexity of multilingual SDK development and maintenance in the existing technology, and achieves the effect of simplifying the development process and reducing maintenance costs.
Patent Information
- Application Number
- CN202411929228.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-05-06
AI Technical Summary
During the development of existing OpenAPI gateway interface software, developers need to write SDKs for different programming languages, and whenever OpenAPI interface is updated, all SDKs need to be updated synchronously, resulting in increased maintenance complexity and cost.
By configuring intermediate language templates and determining intermediate language parameters, the target intermediate language is built based on intermediate language templates, and the SDK code in multiple languages is generated by parsing the generated parameters.
It simplifies the development process, improves interface docking efficiency, and reduces maintenance difficulty and cost.
Smart Images

Figure CN119937998A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of software development, and in particular relates to a multi-language SDK generation method, system, terminal and medium supporting an OpenAPI gateway interface. Background Art
[0002] With the accelerated development of digital transformation, the demand for integration between systems is increasing. As a standardized, machine-readable API description specification, OpenAPI has become an important bridge for many companies to open service interfaces to the outside world. However, the existing OpenAPI gateway interface software development process has the following problems. With the diversified development of technology, the programming languages used by client applications are becoming increasingly diverse, from traditional Java and C# to modern JavaScript, Python, Go, etc. Each language has its own unique syntax and best practices. When developers write SDKs for different languages, they need to have a deep understanding of the characteristics and frameworks of each language. This is not only a time-consuming task, but also every time the OpenAPI interface is updated, all SDKs need to be updated synchronously. Developers need to rewrite and maintain SDKs for each language, which greatly increases the complexity and cost of maintenance. Summary of the invention
[0003] To solve the above problems, the present invention provides a multi-language SDK generation method, system, terminal and medium that supports OpenAPI gateway interface, which automatically generates SDK codes in different programming languages according to the OpenAPI gateway interface, simplifies the development process, improves interface docking efficiency, and reduces maintenance difficulty and cost.
[0004] In a first aspect, the technical solution of the present invention provides a method for generating a multi-language SDK supporting an OpenAPI gateway interface, comprising the following steps: Configure the intermediate language template and define the data types and control statements of different data formats in the intermediate language template; Obtain the HTTP basic model of the current OpenAPI gateway interface, and obtain the data format of the current OpenAPI gateway interface according to the HTTP basic model; Determine the intermediate language parameters according to the data format of the current OpenAPI gateway interface, including the corresponding data types and control statements; According to the determined intermediate language parameters, construct the target intermediate language based on the intermediate language template; The target intermediate language is parsed to obtain generation parameters, and SDK generators in various languages are used to generate SDK codes in multiple languages based on the generation parameters.
[0005] In an optional implementation, obtaining the data format of the current OpenAPI gateway interface according to the HTTP basic model specifically includes: Get the HTTP request of the current OpenAPI gateway interface; Parsing the HTTP request to obtain request header information; Serialize or deserialize the parameters contained in the request header information into the corresponding data format.
[0006] In an optional implementation, after the target intermediate language is constructed based on the intermediate language template, the following steps are further included: Perform lexical verification on the target intermediate language according to pre-configured lexical rules; Perform grammar checking on the target intermediate language according to pre-configured grammar rules; Perform semantic verification on the target intermediate language according to pre-configured semantic rules.
[0007] In an optional implementation, the target intermediate language is parsed to obtain generation parameters, and SDK generators in various languages are used to generate SDK codes in multiple languages based on the generation parameters, specifically including: Perform lexical, grammatical and semantic analysis on the target intermediate language to obtain generation parameters, including lexical parameters, grammatical parameters and semantic parameters; Extract the target parameters of each SDK generator from the generation parameters; Enter the target parameters into the corresponding SDK generator to generate SDK code in the corresponding language.
[0008] In a second aspect, the technical solution of the present invention provides a multi-language SDK generation system supporting the OpenAPI gateway interface, including: An intermediate language template configuration module is used to configure the intermediate language template and define data types and control statements of different data formats in the intermediate language template; A data format acquisition module is used to obtain the HTTP basic model of the current OpenAPI gateway interface, and obtain the data format of the current OpenAPI gateway interface according to the HTTP basic model; The intermediate language parameter determination module is used to determine the intermediate language parameters according to the data format of the current OpenAPI gateway interface, including the corresponding data types and control statements; A target intermediate language construction module is used to construct the target intermediate language based on the intermediate language template according to the determined intermediate language parameters; The SDK code generation module is used to parse the target intermediate language to obtain generation parameters, and use SDK generators in various languages to generate SDK codes in multiple languages based on the generation parameters.
[0009] In an optional implementation, the data format acquisition module acquires the data format of the current OpenAPI gateway interface according to the HTTP basic model, specifically including: Get the HTTP request of the current OpenAPI gateway interface; Parsing the HTTP request to obtain request header information; Serialize or deserialize the parameters contained in the request header information into the corresponding data format.
[0010] In an optional implementation, after the target intermediate language construction module constructs the target intermediate language based on the intermediate language template, it is further configured to: Perform lexical verification on the target intermediate language according to pre-configured lexical rules; Perform grammar checking on the target intermediate language according to pre-configured grammar rules; Perform semantic verification on the target intermediate language according to pre-configured semantic rules.
[0011] In an optional implementation, the SDK code generation module parses the target intermediate language to obtain generation parameters, and generates SDK codes in multiple languages using SDK generators in various languages based on the generation parameters, specifically including: Perform lexical, grammatical and semantic analysis on the target intermediate language to obtain generation parameters, including lexical parameters, grammatical parameters and semantic parameters; Extract the target parameters of each SDK generator from the generation parameters; Enter the target parameters into the corresponding SDK generator to generate SDK code in the corresponding language.
[0012] In a third aspect, the technical solution of the present invention provides a terminal, including: A memory device for storing a multi-language SDK generation program that supports the OpenAPI gateway interface; A processor is used to implement the steps of the multi-language SDK generation method supporting the OpenAPI gateway interface as described in any of the above items when executing the multi-language SDK generation program supporting the OpenAPI gateway interface.
[0013] In a fourth aspect, the technical solution of the present invention provides a computer-readable storage medium, on which is stored a multi-language SDK generation program that supports the OpenAPI gateway interface. When the multi-language SDK generation program that supports the OpenAPI gateway interface is executed by a processor, the steps of the multi-language SDK generation method that supports the OpenAPI gateway interface as described in any of the above items are implemented.
[0014] The present invention provides a multi-language SDK generation method, system, terminal and medium supporting OpenAPI gateway interface, which has the following beneficial effects compared with the prior art: firstly, an intermediate language template is constructed and configured, an intermediate language is generated for the OpenAPI gateway interface according to the intermediate language template, the intermediate language is parsed to obtain generation parameters, and then SDK codes in different languages are generated according to the generation parameters. According to the OpenAPI gateway interface, the present invention automatically obtains generation parameters based on the intermediate language template, and then automatically generates SDK codes in different programming languages according to the generation parameters, thereby simplifying the development process, improving the efficiency of interface docking, and reducing the difficulty and cost of maintenance. BRIEF DESCRIPTION OF THE DRAWINGS In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0015] Figure 1 A flowchart of a method for generating a multi-language SDK supporting an OpenAPI gateway interface is provided in accordance with an embodiment of the present invention.
[0016] Figure 2 A schematic block diagram of the structure of a multi-language SDK generation system supporting an OpenAPI gateway interface provided by an embodiment of the present invention.
[0017] Figure 3 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0018] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in this specific embodiment. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of them. Based on the embodiments in this patent, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this patent.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0020] The key terms appearing in the present invention are explained below.
[0021] SDK: Software Development Kit, software development kit.
[0022] Figure 1 A schematic diagram of a multi-language SDK generation method supporting an OpenAPI gateway interface provided by an embodiment of the present invention. Figure 1 The execution subject may be a multi-language SDK generation system supporting the OpenAPI gateway interface. The multi-language SDK generation method supporting the OpenAPI gateway interface provided in the embodiment of the present invention is executed by a computer device, and accordingly, the multi-language SDK generation system supporting the OpenAPI gateway interface runs in the computer device. According to different requirements, the order of the steps in the flowchart can be changed, and some can be omitted.
[0023] like Figure 1 As shown, the method includes the following steps.
[0024] S1, configure the intermediate language template and define the data types and control statements of different data formats in the intermediate language template.
[0025] This embodiment constructs an intermediate language template for establishing consistent expressions between OpenAPI gateway interfaces of different styles. Users define data types and control statements of different data formats based on the intermediate language template. The data types include basic data types and composite data types. The intermediate language of this embodiment is the template code of the OpenAPI gateway interface in different languages. Through this intermediate language, different types of API calls are ensured to be semantically unified, which is convenient for subsequent SDK generation.
[0026] S2, obtain the HTTP basic model of the current OpenAPI gateway interface, and obtain the data format of the current OpenAPI gateway interface according to the HTTP basic model.
[0027] Regardless of the structure of the interface parameters provided by the OpenAPI gateway interface, communication is based on the HTTP protocol. The HTTP model is as follows.
[0028] { protocol: string, port: number, host: string, request: { method: string, pathname: string, query: map[string]string, headers: map[string]string, body:readable }, response: { statusCode: number, statusMessage: string, headers: map[string]string, body:readable }, } This embodiment analyzes the OpenAPI gateway interface to separate the parameter representation of the interface from the data structure, serialization and deserialization process. Different OpenAPI styles refer to different data formats for serialized transmission. Commonly used data formats for transmission include XML, JSON, etc. This embodiment serializes or deserializes the request parameters into corresponding data formats based on the OpenAPI request header information. Specifically, the HTTP request of the current OpenAPI gateway interface is obtained, the HTTP request is parsed, the request header information is obtained, and the parameters contained in the request header information are serialized or deserialized into corresponding data formats. This embodiment standardizes the definitions of different API interfaces through the HTTP basic module to ensure that OpenAPI gateway interfaces of different styles can be expressed consistently.
[0029] S3, determine the intermediate language parameters according to the data format of the current OpenAPI gateway interface, including the corresponding data types and control statements.
[0030] This embodiment predefines data types and control statements of different data formats. The purpose of this step is to determine the corresponding data types and control statements according to the specific data format of the current OpenAPI gateway interface during the actual execution process, and then build the target intermediate language of the current OpenAPI gateway interface based on the intermediate language template.
[0031] S4, constructing a target intermediate language based on the intermediate language template according to the determined intermediate language parameters.
[0032] This embodiment determines the intermediate language parameters of the current OpenAPI gateway interface through the above steps, and then builds the target intermediate language based on the pre-built intermediate language template. In order to improve the accuracy of SDK code generation, the intermediate language has independent lexical, grammatical and semantic rules. After building the target intermediate language, this embodiment automatically verifies the target intermediate language through a verification mechanism before generating the target SDK code.
[0033] The automatic verification of the target intermediate language in this embodiment includes lexical verification of the target intermediate language according to pre-configured lexical rules, grammatical verification of the target intermediate language according to pre-configured grammatical rules, and semantic verification of the target intermediate language according to pre-configured semantic rules. The verification content includes but is not limited to naming conflict checking, grammatical error detection, and consistency verification of code logic to ensure that the generated code is correct and highly maintainable.
[0034] S5, parsing the target intermediate language to obtain generation parameters, and using SDK generators of various languages to generate SDK codes in multiple languages based on the generation parameters.
[0035] This embodiment automatically parses the target intermediate language to obtain generation parameters, and then uses SDK generators in various languages to generate SDK codes in multiple languages according to the generation parameters, which specifically includes the following steps.
[0036] S5.1, perform lexical, grammatical and semantic analysis on the target intermediate language to obtain generation parameters, including lexical parameters, grammatical parameters and semantic parameters.
[0037] S5.2, extracting target parameters of each SDK generator from the generation parameters.
[0038] S5.3, input the target parameters into the corresponding SDK generator to generate SDK code in the corresponding language.
[0039] This embodiment parses lexical parameters, grammatical parameters, and semantic parameters from the target intermediate language. At the same time, each language has its own SDK generator implementation. In order to adapt to different SDK generators, the corresponding target parameters required by each SDK generator are obtained from the parsed parameters, and then the SDK code of the corresponding programming language is generated according to the target parameters. The programming language includes but is not limited to mainstream languages such as Java, Python, and JavaScript. The SDK code generated by this embodiment contains complete API call logic, parameter processing, signature verification, and authentication mechanism, and automatically integrates error handling and interface retry functions to simplify the development difficulty of clients in different languages.
[0040] The above describes in detail an embodiment of a multi-language SDK generation method that supports the OpenAPI gateway interface. Based on the multi-language SDK generation method that supports the OpenAPI gateway interface described in the above embodiment, an embodiment of the present invention also provides a multi-language SDK generation system that supports the OpenAPI gateway interface corresponding to the method.
[0041] Figure 2The present invention provides a schematic block diagram of a multi-language SDK generation system supporting the OpenAPI gateway interface. In this embodiment, the multi-language SDK generation system 200 supporting the OpenAPI gateway interface can be divided into multiple functional modules according to the functions performed. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can perform fixed functions, which are stored in a memory.
[0042] The intermediate language template configuration module 210 is used to configure the intermediate language template and define data types and control statements of different data formats in the intermediate language template.
[0043] The data format acquisition module 220 is used to obtain the HTTP basic model of the current OpenAPI gateway interface, and obtain the data format of the current OpenAPI gateway interface according to the HTTP basic model.
[0044] The intermediate language parameter determination module 230 is used to determine the intermediate language parameters according to the data format of the current OpenAPI gateway interface, including corresponding data types and control statements.
[0045] The target intermediate language construction module 240 is used to construct the target intermediate language based on the intermediate language template according to the determined intermediate language parameters.
[0046] The SDK code generation module 250 is used to parse the target intermediate language to obtain generation parameters, and generate SDK codes in multiple languages using SDK generators in various languages based on the generation parameters.
[0047] In an optional implementation, the data format acquisition module 220 acquires the data format of the current OpenAPI gateway interface according to the HTTP basic model, specifically including: Get the HTTP request of the current OpenAPI gateway interface; Parsing the HTTP request to obtain request header information; Serialize or deserialize the parameters contained in the request header information into the corresponding data format.
[0048] In an optional implementation, after the target intermediate language construction module 240 constructs the target intermediate language based on the intermediate language template, it is further configured to: Perform lexical verification on the target intermediate language according to pre-configured lexical rules; Perform grammar checking on the target intermediate language according to pre-configured grammar rules; Perform semantic verification on the target intermediate language according to pre-configured semantic rules.
[0049] In an optional implementation, the SDK code generation module 250 parses the target intermediate language to obtain generation parameters, and generates SDK codes in multiple languages using SDK generators in various languages based on the generation parameters, specifically including: Perform lexical, grammatical and semantic analysis on the target intermediate language to obtain generation parameters, including lexical parameters, grammatical parameters and semantic parameters; Extract the target parameters of each SDK generator from the generation parameters; Enter the target parameters into the corresponding SDK generator to generate SDK code in the corresponding language.
[0050] The multi-language SDK generation system supporting the OpenAPI gateway interface of this embodiment is used to implement the aforementioned multi-language SDK generation method supporting the OpenAPI gateway interface. Therefore, the specific implementation method of the system can be seen in the embodiment part of the multi-language SDK generation method supporting the OpenAPI gateway interface in the previous text. Therefore, its specific implementation method can refer to the description of the corresponding embodiments of each part, which will not be introduced in detail here.
[0051] In addition, since the multi-language SDK generation system supporting the OpenAPI gateway interface of this embodiment is used to implement the aforementioned multi-language SDK generation method supporting the OpenAPI gateway interface, its function corresponds to that of the above method and will not be repeated here.
[0052] Figure 3 A schematic diagram of the structure of a terminal 300 provided in an embodiment of the present invention includes: a processor 310, a memory 320 and a communication unit 330. The processor 310 is used to implement the following steps when a multi-language SDK generation program supporting an OpenAPI gateway interface stored in the memory 320 is implemented: Configure the intermediate language template and define the data types and control statements of different data formats in the intermediate language template; Obtain the HTTP basic model of the current OpenAPI gateway interface, and obtain the data format of the current OpenAPI gateway interface according to the HTTP basic model; Determine the intermediate language parameters according to the data format of the current OpenAPI gateway interface, including the corresponding data types and control statements; According to the determined intermediate language parameters, construct the target intermediate language based on the intermediate language template; The target intermediate language is parsed to obtain generation parameters, and SDK generators in various languages are used to generate SDK codes in multiple languages based on the generation parameters. The terminal 300 includes a processor 310, a memory 320 and a communication unit 330. These components communicate via one or more buses. It can be understood by those skilled in the art that the structure of the server shown in the figure does not constitute a limitation of the present invention, and it can be a bus structure or a star structure, and can also include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0053] The memory 320 can be used to store the execution instructions of the processor 310, and the memory 320 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 320 are executed by the processor 310, the terminal 300 can perform some or all of the steps in the following method embodiments.
[0054] The processor 310 is the control center of the storage terminal, and uses various interfaces and lines to connect various parts of the entire electronic terminal. It runs or executes software programs and / or modules stored in the memory 320, and calls data stored in the memory to perform various functions of the electronic terminal and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 310 can only include a central processing unit (CPU). In the embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.
[0055] The communication unit 330 is used to establish a communication channel so that the storage terminal can communicate with other terminals, receive user data sent by other terminals or send user data to other terminals.
[0056] The present invention also provides a computer storage medium, wherein the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0057] The computer storage medium stores a multi-language SDK generation program that supports the OpenAPI gateway interface. When the multi-language SDK generation program that supports the OpenAPI gateway interface is executed by the processor, the following steps are implemented: Configure the intermediate language template and define the data types and control statements of different data formats in the intermediate language template; Obtain the HTTP basic model of the current OpenAPI gateway interface, and obtain the data format of the current OpenAPI gateway interface according to the HTTP basic model; Determine the intermediate language parameters according to the data format of the current OpenAPI gateway interface, including the corresponding data types and control statements; According to the determined intermediate language parameters, construct the target intermediate language based on the intermediate language template; The target intermediate language is parsed to obtain generation parameters, and SDK generators in various languages are used to generate SDK codes in multiple languages based on the generation parameters. Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention, in essence or in other words, the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, including several instructions for enabling a computer terminal (which can be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention.
[0058] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0059] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0060] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0061] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for generating a multi-language SDK supporting an OpenAPI gateway interface, characterized in that: The following steps are involved: Configure the intermediate language template and define the data types and control statements of different data formats in the intermediate language template; Obtain the HTTP basic model of the current OpenAPI gateway interface, and obtain the data format of the current OpenAPI gateway interface according to the HTTP basic model; Determine the intermediate language parameters according to the data format of the current OpenAPI gateway interface, including the corresponding data types and control statements; According to the determined intermediate language parameters, construct the target intermediate language based on the intermediate language template; The target intermediate language is parsed to obtain generation parameters, and SDK generators in various languages are used to generate SDK codes in multiple languages based on the generation parameters.
2. The method for generating a multi-language SDK supporting an OpenAPI gateway interface according to claim 1, characterized in that: According to the HTTP basic model, the data format of the current OpenAPI gateway interface is obtained, including: Get the HTTP request of the current OpenAPI gateway interface; Parsing the HTTP request to obtain request header information; Serialize or deserialize the parameters contained in the request header information into the corresponding data format.
3. The method for generating a multi-language SDK supporting an OpenAPI gateway interface according to claim 1, characterized in that: After the target intermediate language is built based on the intermediate language template, the following steps are also included: Perform lexical verification on the target intermediate language according to pre-configured lexical rules; Perform grammar checking on the target intermediate language according to pre-configured grammar rules; Perform semantic verification on the target intermediate language according to pre-configured semantic rules.
4. The method for generating a multi-language SDK supporting an OpenAPI gateway interface according to claim 3, characterized in that: Parse the target intermediate language to obtain generation parameters, and use SDK generators in various languages to generate SDK codes in multiple languages based on the generation parameters, including: Perform lexical, grammatical and semantic analysis on the target intermediate language to obtain generation parameters, including lexical parameters, grammatical parameters and semantic parameters; Extract the target parameters of each SDK generator from the generation parameters; Enter the target parameters into the corresponding SDK generator to generate SDK code in the corresponding language.
5. A multi-language SDK generation system supporting OpenAPI gateway interface, characterized in that: include: An intermediate language template configuration module is used to configure the intermediate language template and define data types and control statements of different data formats in the intermediate language template; A data format acquisition module is used to obtain the HTTP basic model of the current OpenAPI gateway interface, and obtain the data format of the current OpenAPI gateway interface according to the HTTP basic model; The intermediate language parameter determination module is used to determine the intermediate language parameters according to the data format of the current OpenAPI gateway interface, including the corresponding data types and control statements; A target intermediate language construction module is used to construct the target intermediate language based on the intermediate language template according to the determined intermediate language parameters; The SDK code generation module is used to parse the target intermediate language to obtain generation parameters, and use SDK generators in various languages to generate SDK codes in multiple languages based on the generation parameters.
6. The multi-language SDK generation system supporting OpenAPI gateway interface according to claim 5, characterized in that: The data format acquisition module obtains the data format of the current OpenAPI gateway interface according to the HTTP basic model, specifically including: Get the HTTP request of the current OpenAPI gateway interface; Parsing the HTTP request to obtain request header information; Serialize or deserialize the parameters contained in the request header information into the corresponding data format.
7. The multi-language SDK generation system supporting OpenAPI gateway interface according to claim 5, characterized in that: After the target intermediate language building module builds the target intermediate language based on the intermediate language template, it is also used to: Perform lexical verification on the target intermediate language according to pre-configured lexical rules; Perform grammar checking on the target intermediate language according to pre-configured grammar rules; Perform semantic verification on the target intermediate language according to pre-configured semantic rules.
8. The multi-language SDK generation system supporting OpenAPI gateway interface according to claim 7, characterized in that: The SDK code generation module parses the target intermediate language to obtain generation parameters, and uses SDK generators in various languages to generate SDK codes in multiple languages based on the generation parameters, including: Perform lexical, grammatical and semantic analysis on the target intermediate language to obtain generation parameters, including lexical parameters, grammatical parameters and semantic parameters; Extract the target parameters of each SDK generator from the generation parameters; Enter the target parameters into the corresponding SDK generator to generate SDK code in the corresponding language.
9. A terminal, characterized in that: include: A memory device for storing a multi-language SDK generation program that supports the OpenAPI gateway interface; A processor, used to implement the steps of the method for generating a multi-language SDK supporting an OpenAPI gateway interface as described in any one of claims 1 to 4 when executing the multi-language SDK generation program supporting an OpenAPI gateway interface.
10. A computer-readable storage medium, characterized in that: The readable storage medium stores a multi-language SDK generation program that supports the OpenAPI gateway interface. When the multi-language SDK generation program that supports the OpenAPI gateway interface is executed by the processor, the steps of the multi-language SDK generation method that supports the OpenAPI gateway interface as described in any one of claims 1-4 are implemented.