API Documentation Generation via Comment Extraction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional methods for documenting application programming interfaces (APIs) face issues with formatting consistency, as it is typically done within the programming code, leading to inconsistencies and difficulties in updating documentation across multiple programmer contributions.
Innovation Solution
An automatic documentation generation system that extracts objects from comments in the programming code using tools like Javadoc, applying content and formatting templates to create consistent and easily updatable API documentation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of information
If comments are inserted into programming code to document APIs, then documentation content is available, but formatting consistency deteriorates due to multiple programmers contributing
Solution Approach 1:
The patent extracts documentation comments from the programming code into a separate documentation file. This separation allows the code to retain functional comments while the documentation file maintains centralized formatting control, resolving the contradiction between having documentation content and maintaining formatting consistency.
Solution Approach 2:
The patent creates a copy of the documentation content from the programming code into a separate documentation file. This copying process enables centralized formatting management in the documentation file while preserving the original comments in the code, thus maintaining formatting consistency across multiple programmer contributions.
2Productivity
If documentation formatting is done within programming code, then documentation is generated, but ease of updating deteriorates as changes require searching through entire codebase
Solution Approach 1:
The patent extracts documentation from the programming code into a separate documentation file. This extraction enables updates to be made in a single location (the documentation file) rather than requiring searches through the entire codebase, significantly improving ease of updating while maintaining automated generation capabilities.
Solution Approach 2:
The patent segments the documentation system into two parts: comments in the programming code and a separate documentation file. This segmentation allows independent management of each part, enabling easy updates to the documentation file without affecting the code, thus improving ease of operation.
3Adaptability or versatility
If multiple programmers write comments for the same API, then code development is flexible, but consistency of documentation deteriorates due to varying vocabularies and formats
Solution Approach 1:
The patent creates a centralized documentation file that copies and standardizes API documentation from multiple programmers' comments. This copying process enables consistency enforcement through standardized templates while preserving the flexibility of having multiple programmers contribute to the code, as they can use varied comment styles in the code without affecting the standardized documentation output.
Solution Approach 2:
The patent applies homogeneous formatting rules and standardized templates to all API documentation in the separate documentation file. This homogenization process ensures consistency across documentation from multiple programmers while allowing the programming code itself to maintain its natural diversity and flexibility.
4Ease of manufacture
If documentation is extracted as plaintext from programming code, then documentation is created, but adaptability of formatting deteriorates as formatting changes require code modification
Solution Approach 1:
The patent extracts documentation from the programming code into a separate file that can be processed and formatted in multiple ways. This extraction enables the use of various formatting tools and templates (such as LaTeX, HTML, or other markup languages) without modifying the original code, thus improving formatting adaptability while maintaining ease of documentation creation.
Data Source
AI summary
Some embodiments of a system and a method to automatically generate documentation on application programming interfaces (APIs) have been presented. For instance, while a processor is building a software system from programming code including APIs, the processor may extract objects related to the APIs from comments embedded in the programming code and automatically generate documentation on the APIs using the objects extracted and templates associated with the objects extracted.


