CN112783837B - API document searching method - Google Patents
API document searching method Download PDFInfo
- Publication number
- CN112783837B CN112783837B CN202110038672.1A CN202110038672A CN112783837B CN 112783837 B CN112783837 B CN 112783837B CN 202110038672 A CN202110038672 A CN 202110038672A CN 112783837 B CN112783837 B CN 112783837B
- Authority
- CN
- China
- Prior art keywords
- api
- api document
- document
- documents
- list
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 238000007689 inspection Methods 0.000 claims abstract description 6
- 230000004931 aggregating effect Effects 0.000 claims description 3
- 238000012544 monitoring process Methods 0.000 claims description 3
- 238000004891 communication Methods 0.000 abstract description 5
- 238000011161 development Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 235000006719 Cassia obtusifolia Nutrition 0.000 description 2
- 235000014552 Cassia tora Nutrition 0.000 description 2
- 244000201986 Cassia tora Species 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012827 research and development Methods 0.000 description 2
- 230000002776 aggregation Effects 0.000 description 1
- 238000004220 aggregation Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000001939 inductive effect Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 230000002688 persistence Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 239000007858 starting material Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/14—Details of searching files based on file metadata
- G06F16/148—File search processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/14—Details of searching files based on file metadata
- G06F16/144—Query formulation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
Abstract
The invention discloses an API document searching method, which relates to the technical field of computers, and comprises the steps of configuring the domain name of a server where each API document is located through an nginx tool, generating a uniform URL address according to the domain name of the server where each API document is located, acquiring a corresponding API document list from a Euroke registry according to the URL address, traversing each API document in the API document list and acquiring the inspection path of each API document, acquiring the name and address of each API document according to the inspection path of each API document, searching specific API documents according to the name and address of each API document, and finding newly-increased API documents in time, thereby improving the API document viewing efficiency and team communication efficiency.
Description
Technical Field
The invention relates to the technical field of computers, in particular to an API document searching method.
Background
Due to the complexity and persistence of the software development process itself and the necessity of communication between the inside and outside of the team under the current micro-service architecture, the application program interfaces (Application Programming Interface, API) need to be documented and standardized between different development roles (such as app development, h5 development, back-end development).
Most of the prior art schemes simply introduce a springbox tool and a swagger tool into a single API document, and because different documents exist in the scheme and are scattered in each micro-service project, related research and development personnel need multiple steps to check a specific API document. Firstly, a developer needs to communicate whether an API document is provided or not in advance and locate the environment where the API document is located, secondly, the developer needs to locate the IP address and the port of a server where the API document is located in a specific environment, and thirdly, the developer needs to pass through the IP address and the port of the specific server, so that the whole process is complicated, the searching efficiency of the API document is affected, the updating of the API document is not timely, and the team communication efficiency is affected.
Disclosure of Invention
In order to solve the defects in the prior art, the embodiment of the invention provides an API document searching method, which comprises the following steps:
configuring domain names of servers where all API documents are located through an nginx tool;
generating a unified URL address according to the domain name of the server where each API document is located;
acquiring a corresponding API document list from a Euroke registry according to the URL address;
traversing each API document in the API document list and acquiring a checking path heatcheckurl of each API document;
acquiring the names and addresses of the API documents according to the inspection path heatcheckUrl of the API documents;
based on the name and address of the respective API documents,
and searching a specific API document according to the name and the address of each API document.
Preferably, before configuring the domain name of the server where each API document is located by the rginx tool, the method further comprises:
and (5) aggregating all the API documents acquired from the Euroke registry in real time by utilizing a swagger tool.
Preferably, after obtaining the corresponding API document list from the Eurake registry according to the URL address, the method further comprises:
and using an http protocol, requesting cross-domain editing of one or more API documents of the API document list.
Preferably, after obtaining the corresponding API document list from the Eurake registry according to the URL address, the method further comprises:
and setting each API document in the API document list to be in a valid state or an invalid state by using a monitoring configuration center.
The API document searching method provided by the embodiment of the invention has the following beneficial effects:
by utilizing the swagger tool, all API documents acquired from the Eutake registry are aggregated together in real time and the entry of the API documents is unified, so that newly added API documents can be found in time, and the API document viewing efficiency and team communication efficiency are improved.
Detailed Description
The present invention will be specifically described with reference to the following specific examples.
The API document searching method provided by the embodiment of the invention comprises the following steps:
s101, configuring domain names of servers where all API documents are located through an nginx tool.
S102, generating a unified URL address according to the domain name of the server where each API document is located.
Through the URL address, a research and development user can directly reach the first page of the aggregation platform through a unified entrance by adopting a browser. And adopting html, css, boostrap, ace and other languages to carry out layout and typesetting rendering, adopting jquery frames and related plug-ins and other javascript technologies to support the skip, search event, click event processing, highlighting and the like of each environment in the page.
S103, acquiring a corresponding API document list from the Euroke registry according to the URL address.
For each API document, v2/API-docs interfaces in corresponding services are accessed in a cross-domain manner through an http protocol, interface information data (json format) in the current API document is obtained, the current API document is saved to a local storage after being analyzed, and a local searching function of a certain pair of API documents is supported.
The method comprises the steps of obtaining information data in an interface v2/API-docs in an API document from a web interface identified through a swagger annotation by utilizing springbox analysis, finally packaging the web interface into a corresponding java bean component by scanning and reflecting the web interface, and then converting the java bean component into json format and returning the json format.
S104, traversing each API document in the API document list and acquiring a checking path healthCheckUrl of each API document.
S105, acquiring the name and address of each API document according to the checking path heatcheckUrl of each API document.
S106, searching for specific API documents according to the names and addresses of the API documents.
Optionally, before configuring the domain name of the server where each API document is located by the rginx tool, the method further includes:
and (5) aggregating all the API documents acquired from the Euroke registry in real time by utilizing a swagger tool.
Optionally, after obtaining the corresponding API document list from the Eurake registry according to the URL address, the method further comprises:
using the http protocol, the cross-domain request performs online editing of one or more API documents of the API document list.
As a specific example, one or more API documents of the API document list are edited online via an ajax web page development technique.
Optionally, after obtaining the corresponding API document list from the Eurake registry according to the URL address, the method further comprises:
and setting each API document in the API document list to be in a valid state or an invalid state by using the monitoring configuration center.
As a specific embodiment, based on the automatic configuration mechanism of the springboot, a corresponding xxx-starter. Jar package is provided in a mode of a pon file of a maven project object model to support target application non-inductive access under a springgroup mode micro-service architecture, and whether an application is effective in API documents under different environments is controlled by utilizing a configuration item gofun. Swagger. Enable in an @ conditional on property listening configuration center.
According to the API document searching method provided by the embodiment of the invention, the domain name of the server where each API document is located is configured through the nginx tool, the unified URL address is generated according to the domain name of the server where each API document is located, the corresponding API document list is obtained from the Euroke registry according to the URL address, each API document in the API document list is traversed, the inspection path of each API document is obtained, the name and the address of each API document are obtained according to the inspection path of each API document, the specific API document is searched according to the name and the address of each API document, the newly added API document can be found in time, and the API document viewing efficiency and team communication efficiency are improved.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
It should also be noted that the terms "comprises," "comprising," or any other variation 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 may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.
Claims (5)
1. An API document searching method, comprising:
configuring domain names of servers where all API documents are located through an nginx tool;
generating a unified URL address according to the domain name of the server where each API document is located;
acquiring a corresponding API document list from a Euroke registry according to the URL address;
traversing each API document in the API document list and acquiring a checking path heatcheckurl of each API document;
acquiring the names and addresses of the API documents according to the inspection path heatcheckUrl of the API documents;
and searching a specific API document according to the name and the address of each API document.
2. The API document lookup method as claimed in claim 1, wherein prior to configuring the domain name of the server at which each API document resides by the rginx tool, the method further comprises:
and (5) aggregating all the API documents acquired from the Euroke registry in real time by utilizing a swagger tool.
3. The API document lookup method as claimed in claim 1, further comprising, after retrieving a corresponding API document list from a Eurake registry in accordance with the URL address:
and using an http protocol, requesting cross-domain editing of one or more API documents of the API document list.
4. The API document lookup method as claimed in claim 1, further comprising, after retrieving a corresponding API document list from a Eurake registry in accordance with the URL address:
and setting each API document in the API document list to be in a valid state or an invalid state by using a monitoring configuration center.
5. A non-transitory computer readable storage medium storing computer instructions that cause the computer to perform the method of any of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110038672.1A CN112783837B (en) | 2021-01-12 | 2021-01-12 | API document searching method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110038672.1A CN112783837B (en) | 2021-01-12 | 2021-01-12 | API document searching method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112783837A CN112783837A (en) | 2021-05-11 |
CN112783837B true CN112783837B (en) | 2024-01-30 |
Family
ID=75755417
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110038672.1A Active CN112783837B (en) | 2021-01-12 | 2021-01-12 | API document searching method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112783837B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1444816A (en) * | 2000-06-01 | 2003-09-24 | 奥罗卡斯特.Com公司 | System for network addressing |
CN1549983A (en) * | 2001-11-13 | 2004-11-24 | �Ҵ���˾ | System and method for selecting electronic documents from a physical document and for displaying said electronic documents over said physical document |
CN1879107A (en) * | 2003-09-30 | 2006-12-13 | Google公司 | Information retrieval based on historical data |
CN103414793A (en) * | 2013-09-04 | 2013-11-27 | 广东全通教育股份有限公司 | Picture downloading and uploading device and method |
JP2017073084A (en) * | 2015-10-09 | 2017-04-13 | キヤノン株式会社 | Document management system, document management server, information processing device, document management method, and program |
CN110321154A (en) * | 2019-06-25 | 2019-10-11 | 北京奇艺世纪科技有限公司 | A kind of interface message methods of exhibiting, device and the electronic equipment of micro services |
CN111030963A (en) * | 2018-10-09 | 2020-04-17 | 华为技术有限公司 | Document tracking method, gateway equipment and server |
CN111368227A (en) * | 2018-12-25 | 2020-07-03 | 阿里巴巴集团控股有限公司 | URL processing method and device |
CN112199331A (en) * | 2020-10-09 | 2021-01-08 | 平安科技(深圳)有限公司 | Automatic generation method, system, terminal and storage medium of interface document |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120310913A1 (en) * | 2011-05-30 | 2012-12-06 | Jaimie Sirovich | System and method to access a plurality of document results pages |
-
2021
- 2021-01-12 CN CN202110038672.1A patent/CN112783837B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1444816A (en) * | 2000-06-01 | 2003-09-24 | 奥罗卡斯特.Com公司 | System for network addressing |
CN1549983A (en) * | 2001-11-13 | 2004-11-24 | �Ҵ���˾ | System and method for selecting electronic documents from a physical document and for displaying said electronic documents over said physical document |
CN1879107A (en) * | 2003-09-30 | 2006-12-13 | Google公司 | Information retrieval based on historical data |
CN103414793A (en) * | 2013-09-04 | 2013-11-27 | 广东全通教育股份有限公司 | Picture downloading and uploading device and method |
JP2017073084A (en) * | 2015-10-09 | 2017-04-13 | キヤノン株式会社 | Document management system, document management server, information processing device, document management method, and program |
CN111030963A (en) * | 2018-10-09 | 2020-04-17 | 华为技术有限公司 | Document tracking method, gateway equipment and server |
CN111368227A (en) * | 2018-12-25 | 2020-07-03 | 阿里巴巴集团控股有限公司 | URL processing method and device |
CN110321154A (en) * | 2019-06-25 | 2019-10-11 | 北京奇艺世纪科技有限公司 | A kind of interface message methods of exhibiting, device and the electronic equipment of micro services |
CN112199331A (en) * | 2020-10-09 | 2021-01-08 | 平安科技(深圳)有限公司 | Automatic generation method, system, terminal and storage medium of interface document |
Non-Patent Citations (2)
Title |
---|
File Search with Query Expansion in a Network System(s);Noor Ali Ameen Albayaty等;《Information and Knowledge Management》;第3卷(第9期);1-9 * |
企业文档服务器中英文搜索引擎的设计与实现;陈海波等;《微处理机》;第30卷(第2期);1-5 * |
Also Published As
Publication number | Publication date |
---|---|
CN112783837A (en) | 2021-05-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11113456B2 (en) | System and method for deep linking and search engine support for web sites integrating third party application and components | |
US20210314354A1 (en) | Techniques for determining threat intelligence for network infrastructure analysis | |
CN108156022B (en) | Service calling method and device and electronic equipment | |
US10187444B2 (en) | System and method of automatic generation and insertion of analytic tracking codes | |
CN109062563B (en) | Method and device for generating page | |
US10095798B2 (en) | Method for displaying website authentication information and browser | |
US20110106874A1 (en) | System and method for redirecting client-side storage operations | |
CN110321154B (en) | Micro-service interface information display method and device and electronic equipment | |
CN102346780B (en) | The acquisition methods of web page address and acquisition device | |
WO2017124692A1 (en) | Method and apparatus for searching for conversion relationship between form pages and target pages | |
US8095574B2 (en) | Dynamically mapping and maintaining a customized method set of tags particular to an extention point | |
US20130185322A1 (en) | Systems and methods for providing an electronic contact card | |
CN104102577A (en) | Test method of multi-version webpage visiting | |
US20130036108A1 (en) | Method and system for assisting users with operating network devices | |
US9465781B2 (en) | Analysis of web application state | |
CN112087370A (en) | Method, system, electronic device and computer-readable storage medium for issuing GitHub Issues | |
US9396259B1 (en) | Capture of web application state | |
CN112783837B (en) | API document searching method | |
US20160261715A1 (en) | System and method for securing a web server | |
CN112632419A (en) | Domain name pre-resolution configuration method and device, computer equipment and storage medium | |
US8751508B1 (en) | Contextual indexing of applications | |
CN105912573A (en) | Data updating method and data updating device | |
JP2006065467A (en) | Device for creating data extraction definition information and method for creating data extraction definition information | |
Casey et al. | Crowdsourcing forensics: Creating a curated catalog of digital forensic artifacts | |
CN110737636B (en) | Data import method, device and equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |