IP Library Granted Patent US 8,756,568
Granted Patent B2
US 8,756,568 · App. 13/563,674 · Granted Jun 17, 2014

Documentation generation for web APIs based on byte code analysis

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,756,568
App. No.
13/563,674
Granted
Jun 17, 2014
Kind
B2
Abstract

Documentation for an application or web service, such as a web application programming interface (API), is generated by analyzing bytecode for the application itself. Metadata contained within the bytecode and that specifies the functionality of the web service is extracted and used as a template and basis for documentation. A second source of documentation, which contains detailed documentation of the web service, is contributed by the web service developer and merged with the metadata extracted from the bytecode.

Claims (74)

1. A computer-implemented method comprising:

obtaining bytecode corresponding to a web service that includes an application programming interface (API);

identifying a particular annotation included in the bytecode, wherein an annotation comprises text that is included in source code, and that a compiler preserves in bytecode that is generated from the source code;

identifying one or more parameters associated with the web service from the particular annotation included in the bytecode;

generating a template for documentation for the API of the web service, wherein the template specifies the one or more parameters that are identified from the particular annotation included in the bytecode;

obtaining a plurality of code notes, wherein each of the plurality of code notes comprises a description of the web service; and

merging the template and at least a portion of the plurality of code notes to generate the documentation for the API of the web service; and

wherein generating the template for documentation for the API of the web service comprises generating one or more documentation indices, wherein each index maps one or more parameters from an annotation to a code note.

2. The method of claim 1 , wherein merging the template and at least a portion of the plurality of code notes to generate the documentation for the API of the web service comprises:

identifying one or more code notes of the plurality of code notes corresponding to the identified one or more parameters;

mapping each identified code note to one or more parameters of the identified one or more parameters;

storing each mapping in an index of the one or more documentation indices.

3. The method of claim 1 , wherein identifying a particular annotation comprises:

identifying a request mapping that maps a portion of the bytecode to a request for a resource; and

identifying the particular annotation from the request mapping.

4. The method of claim 1 further comprising:

searching bytecode for a function configured to process a request for a resource made available by the application; and

including one or more parameters from the function in the identified one or more parameters.

5. The method of claim 1 , wherein identifying one or more parameters comprises:

identifying an annotation of a parent class, wherein a child class inherits from the parent class;

associating the annotation with the child class; and

identifying the one or more parameters from the annotation of the child class.

6. The method of claim 5 further comprising:

identifying one or more parameters from the annotation of the parent class, wherein a parameter of the one or more parameters is a name of a first function included in the parent class:

determining that a name of a second function included in the child class is a same name as the name of the first function; and

including one or more parameters from the second function in the identified one or more parameters from the annotation of the child class.

7. The method of claim 1 , wherein the identified one or more parameters include a name of a Hypertext Transfer Protocol (HTTP) request and a universal resource locator (URL) pattern.

8. A system comprising:

one or more computers and one or more storage devices storing instructions that are operable, when executed by the one or more computers, to cause the one or more computers to perform operations comprising:

obtaining bytecode corresponding to a web service that includes an application programming interface (API);

identifying a particular annotation included in the bytecode, wherein an annotation comprises text that is included in source code, and that a compiler preserves in bytecode that is generated from the source code;

identifying one or more parameters associated with the web service from the particular annotation included in the bytecode;

generating a template for documentation for the API of the web service, wherein the template specifies the one or more parameters that are identified from the particular annotation included in the bytecode;

obtaining a plurality of code notes, wherein each of the plurality of code notes comprises a description of the web service; and

merging the template and at least a portion of the plurality of code notes to generate the documentation for the API of the web service, and

wherein generating the template for documentation for the API of the web service comprises generating one or more documentation indices, wherein each index maps one or more parameters from an annotation to a code note.

9. The system of claim 8 , wherein merging the template and at least a portion of the plurality of code notes to generate the documentation for the API of the web service comprises:

identifying one or more code notes of the plurality of code notes corresponding to the identified one or more parameters;

mapping each identified code note to one or more parameters of the identified one or more parameters;

storing each mapping in an index of the one or more documentation indices.

10. The system of claim 8 , wherein identifying a particular annotation comprises:

identifying a request mapping that maps a portion of the bytecode to a request for a resource; and

identifying the particular annotation from the request mapping.

11. The system of claim 8 , wherein the operations further comprise:

searching bytecode for a function configured to process a request for a resource made available by the application; and

including one or more parameters from the function in the identified one or more parameters.

12. The system of claim 8 , wherein identifying a particular annotation comprises:

identifying an annotation of a parent class, wherein a child class inherits from the parent class;

associating the annotation with the child class; and

identifying the one or more parameters from the annotation of the child class.

13. The system of claim 12 , wherein the operations further comprise:

identifying one or more parameters from the annotation of the parent class, wherein a parameter of the one or more parameters is a name of a first function included in the parent class:

determining that a name of a second function included in the child class is a same name as the name of the first function; and

including one or more parameters from the second function in the identified one or more parameters from the annotation of the child class.

14. The system of claim 8 , wherein the identified one or more parameters include a name of a Hypertext Transfer Protocol (HTTP) request and a universal resource locator (URL) pattern.

15. A computer program product, encoded on one or more non-transitory computer storage media, comprising instructions that when executed by one or more computers cause the one or more computers to perform operations comprising:

obtaining bytecode corresponding to a web service that includes an application programming interface (API);

identifying a particular annotation included in the bytecode, wherein an annotation comprises text that is included in source code, and that a compiler preserves in bytecode that is generated from the source code;

identifying one or more parameters associated with the web service from the particular annotation included in the bytecode;

generating a template for documentation for the API of the web service, wherein the template specifies the one or more parameters that are identified from the particular annotation included in the bytecode;

obtaining a plurality of code notes, wherein each of the plurality of code notes comprises a description of the web service; and

merging the template and at least a portion of the plurality of code notes to generate the documentation for the API of the web service, and

wherein generating the template for documentation for the API of the web service comprises generating one or more documentation indices, wherein each index maps one or more parameters from an annotation to a code note.

16. The computer program product of claim 15 , wherein merging the template and at least a portion of the plurality of code notes to generate the documentation for the API of the web service comprises:

identifying one or more code notes of the plurality of code notes corresponding to the identified one or more parameters;

mapping each identified code note to one or more parameters of the identified one or more parameters;

storing each mapping in an index of the one or more documentation indices.

17. The computer program product of claim 15 , wherein the operations further comprise:

searching bytecode for a function configured to process a request for a resource made available by the application; and

including one or more parameters from the function in the identified one or more parameters.

18. The computer program product of claim 15 , wherein identifying a particular annotation comprises:

identifying an annotation of a parent class, wherein a child class inherits from the parent class;

associating the annotation with the child class; and

identifying the one or more parameters from the annotation of the child class.

Assignments (5)
MERGER Recorded May 20, 2026
From: PIVOTAL SOFTWARE, INC.
To: VMWARE LLC
Reel/Frame 075613/0980 →
CHANGE OF NAME Recorded Feb 18, 2014
From: GOPIVOTAL, INC.
To: PIVOTAL SOFTWARE, INC.
Reel/Frame 032275/0931 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 25, 2013
From: VMWARE, INC.
To: GOPIVOTAL, INC.
Reel/Frame 030682/0694 →
CORRECTIVE ASSIGNMENT TO CORRECT THE SECOND ASSIGNOR'S "DOC DATE:" WHICH WAS INADVERTENTLY TYPED INCORRECTLY, PREVIOUSLY RECORDED ON REEL 029208 FRAME 0096. ASSIGNOR(S) HEREBY CONFIRMS THE "DOC DATE: 06/08/2012" FOR ANDREW WILKINSON SHOULD BE DELETED AND REPLACED WITH -- 08/06/2012 --. Recorded Nov 7, 2012
From: HALE, JOSEPH BENJAMIN; WILKINSON, ANDREW
To: VMWARE, INC.
Reel/Frame 029260/0044 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 29, 2012
From: HALE, JOSEPH BENJAMIN; WILKINSON, ANDREW
To: VMWARE, INC.
Reel/Frame 029208/0096 →