Skip to content

Enhance Class and Method Documentation with Examples #40

Description

@j03-dev

The current documentation for classes and methods in OxAPY lacks detailed descriptions and practical examples. Improving this documentation will aid developers in understanding and utilizing the framework more effectively.

Proposed Documentation Format:

/// Brief description of the class or method
///
/// Args:
///     param1 (Type): Description of param1
///     param2 (Type): Description of param2
///
/// Returns:
///     ReturnType: Description of the return value
///
/// Raises:
///     ExceptionType: Conditions under which this exception is raised
///
/// Example:
///     Example usage of the class or method

Example:

/// Create a new JWT manager
///
/// Args:
///     secret (str): Secret key used for signing tokens
///     algorithm (str): JWT algorithm to use (default: "HS256")
///     expiration_minutes (int): Token expiration time in minutes (default: 60)
///
/// Returns:
///     JwtManager: A new JwtManager instance
///
/// Raises:
///     ValueError: If the algorithm is not supported or secret is invalid
///
/// Example:
///     jwt_manager = JwtManager(secret="mysecret", algorithm="HS256", expiration_minutes=60)

Tasks:

  • Audit existing classes and methods for missing or incomplete documentation.
  • Apply the proposed documentation format to each class and method.
  • Include practical examples demonstrating typical usage scenarios.
  • Review and revise documentation for clarity and consistency.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions