Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Browser end interface document automation type generation method and system

A browser and type technology, applied in the field of computer gateways, can solve the problems of interface document type generation, writing errors, and low accuracy of interface documents, and achieve the effect of accurate and high-efficiency generated results

Pending Publication Date: 2022-01-28
北京东方金信科技股份有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Among them, the back-end developers manually write the language type of the client to realize the type verification of the business code. The manual entry efficiency is low, which increases the writing cost of the front-end and back-end, and the manual entry is prone to writing errors, resulting in low accuracy of the interface document.
For example, in the ApolloGraphQL tool, although the front-end and back-end two-way document verification is guaranteed at runtime, it does not automatically generate types for the pre-run interface documents, and developers still need to manually generate types

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Browser end interface document automation type generation method and system
  • Browser end interface document automation type generation method and system
  • Browser end interface document automation type generation method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0023] This embodiment discloses a browser-side interface document automatic type generation method, such as figure 1 , 2 , 3, including the following steps:

[0024] S1 inputs the server-side language interface type document, parses different servers, and outputs a type scalar, which is used to map and convert the basic types of the client and the server, where the basic type includes: the scalar unit name and its corresponding client The client type, the client type field, the client field and the unknown type not represented by the server, identify the mapping type and conversion value through the scalar unit name. Among them, the value of unknown type is identified by "any". Basic type fields include but not limited to string (character string), number (value), bigint (large value), boolean (Boolean value) and null (empty value).

[0025] S2 judges whether the input client language is a basic type, if it is a basic type of the client, then it is scalar type, and the typ...

Embodiment 2

[0028] Based on the same inventive concept, this embodiment discloses a browser-side interface document automation type generation system, including:

[0029] The language conversion module is used to input the language interface type document of the server, analyze different servers, and output the type scalar;

[0030] The type judgment module is used to judge whether the input client language is a basic type, if so, add its type scalar to the type queue to be output, and add its type name and type value to the type queue to be output, otherwise enter Next step;

[0031] The new type generation module is used to generate a new type, count all new types, and add the attribute of the upward connection type. The key name of the new type is the field name, and the value is the original basic type inherited by the backend interface;

[0032] The statistical merging module is used to merge all types in the type queue to be output, and add them to the output type queue, add non-em...

Embodiment 3

[0035] Based on the same inventive concept, this embodiment discloses a computer-readable storage medium storing one or more programs, one or more programs include instructions, and the instructions, when executed by a computing device, cause the computing device to execute any one of the above-mentioned The browser-side interface document automation type generation method for the item.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention belongs to the technical field of computer gateways, and relates to a browser end interface document automatic type generation method and system, a medium and equipment. The method comprises the following steps: inputting a server end language interface type document, analyzing different server ends, and outputting a type scalar; judging whether the input client language is of a basic type, if so, adding a type scalar of the input client language into a type queue to be output, and adding a type name and a type value of the input client language into the type queue to be output, and if not, entering the next step; generating a new type, counting all the new types, and adding attributes of upward connection types; and combining all types in the to-be-output type queue, adding the to-be-output type queue into an output type queue, adding non-empty attribute identifiers to the types and corresponding fields, and outputting a final converted type set. According to the scheme, the client language type can be automatically generated, the generation result is more accurate, and the efficiency is higher.

Description

technical field [0001] The invention relates to a browser-end interface document automation type generation method, system, medium and equipment, and belongs to the technical field of computer gateways. Background technique [0002] Most of the resource business systems in the existing network are implemented by distributed micro-services, which are composed of multiple back-end service modules. These back-end service modules all require a unified gateway for external output to complete basic functions such as authentication, flow control, and fuse. In the front-end and back-end collaborative development, developers gradually use data association and structured browser client query data mode to replace the traditional data interface based on hypertext transfer protocol and following the standardized architecture. Among them, the back-end developers manually write the language type of the client to realize the type verification of the business code. The efficiency of manual ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F8/73G06F8/36
CPCG06F8/73G06F8/36
Inventor 康旭王伟哲
Owner 北京东方金信科技股份有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products