API Documentation Generation via Comment Extraction

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvedocumentation contentVSAvoidformatting consistency
Core Design Contradiction:
Loss of informationVSStability of the object's composition

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.

Inventive Principle:
Principle #2Taking out (Extraction)

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.

Inventive Principle:
Principle #26Copying

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

Engineering Contradiction:
Improvedocumentation generationVSAvoidease of updating
Core Design Contradiction:
ProductivityVSEase of operation

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.

Inventive Principle:
Principle #2Taking out (Extraction)

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.

Inventive Principle:
Principle #1Segmentation

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

Engineering Contradiction:
Improvecode development flexibilityVSAvoiddocumentation consistency
Core Design Contradiction:
Adaptability or versatilityVSStability of the object's composition

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.

Inventive Principle:
Principle #26Copying

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.

Inventive Principle:
Principle #33Homogeneity

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

Engineering Contradiction:
Improvedocumentation creationVSAvoidformatting adaptability
Core Design Contradiction:
Ease of manufactureVSAdaptability or versatility

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.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS8819629B2Automatically generating documentation on application programming interfaces
Publication Date: 2014.08.26 RED HAT INC
  • US8819629B2 patent drawing
  • US8819629B2 patent drawing
  • US8819629B2 patent drawing

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.