The invention relates to a method for generating an interface document based on eclipse. The method comprises the following steps: S1, calling an eclipse extension plug-in; S2, screening interface classes; S3, screening out a mapping interface from the interface classes obtained by screening; S4, judging whether the mapping interface obtained by screening needs to be transformed or not, if so, executing the step S5, and otherwise, executing the step S7; S5, corresponding swagger configuration is carried out on the mapping interface; S6, corresponding swagger configuration is carried out on method parameters of the mapping interface, and then a reconstruction mark is recorded at a preset position of the mapping interface; S7, judging whether transformation of all mapping interfaces is completed or not, if so, executing the step S8, and otherwise, returning to the step S2; and S8, generating an interface document. Compared with the prior art, the plug-in function of the eclipse platformis utilized, one-time batch transformation can be conducted on existing documents, the purpose of automatically and rapidly generating interface documents is achieved. Compared with traditional manualrepeated operation, the complex degree of operation is effectively reduced, and the working efficiency is improved.