Skip to content

fix: remove all compiler warnings #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open

fix: remove all compiler warnings #43

wants to merge 41 commits into from

Conversation

osm-Jatin
Copy link

@osm-Jatin osm-Jatin commented Jun 18, 2025

Task Link

REST-1567

Description

  • initialise non-nullable properties in DTOs
  • add null checks for configuration path values
  • add validation check for empty filePath
  • handle nulls safely while extracting model validation error message

Summary by CodeRabbit

  • New Features

    • Added login and token revocation API endpoints with Redis-based token storage and validation.
    • Introduced Redis integration for token management.
    • Added support for generating PDF and Word documents from templates, including placeholder and image replacement.
  • Improvements

    • Enhanced configuration validation and error handling for PDF and Word generation endpoints.
    • Updated environment variable and Docker configurations to support Redis and reflect new project naming.
    • Improved model validation error messaging and stricter request DTO validation.
  • Refactor

    • Renamed namespaces, classes, and files from "DocumentService" to "OsmoDoc" throughout the codebase and documentation.
    • Migrated and reorganized project files to align with the new OsmoDoc structure.
  • Documentation

    • Updated all documentation and API references to use the new OsmoDoc naming conventions.
    • Improved project documentation to reflect new features and configuration.
  • Chores

    • Updated project and solution files, Dockerfile, and docker-compose for new service names and dependencies.
    • Removed obsolete files and references from the previous "DocumentService" implementation.

Copy link

coderabbitai bot commented Jun 18, 2025

Walkthrough

This update migrates the project from "DocumentService" to "OsmoDoc," renaming namespaces, files, and documentation accordingly. It introduces Redis-based JWT token storage and revocation, adds login and token management endpoints, and refactors PDF and Word generation logic for improved async operations and configuration handling. Docker and environment configurations are updated to support Redis integration.

Changes

Files/Paths Change Summary
.env.example, docker-compose.yaml Added Redis configuration variables and service; updated service names to OsmoDoc.
Dockerfile, README.md, CONTRIBUTING.md, .github/..., docs/..., manifest.json, xrefmap.yml Renamed project, namespaces, and documentation from DocumentService to OsmoDoc.
DocumentService.*, DocumentService.API.* Deleted all source, models, and generator files under old DocumentService namespace.
OsmoDoc.API/Controllers/LoginController.cs, OsmoDoc.API/Models/LoginRequestDTO.cs, OsmoDoc.API/Models/RevokeTokenRequestDTO.cs Added login and token revocation endpoints and DTOs for authentication.
OsmoDoc.API/Controllers/PdfController.cs, OsmoDoc.API/Controllers/WordController.cs Refactored controllers for new namespaces, async generator calls, and improved config validation.
OsmoDoc.API/Helpers/*, OsmoDoc.API/Models/* Updated namespaces and improved validation, error handling, and default initializations for DTOs.
OsmoDoc.API/Program.cs Integrated Redis for token storage, added JWT validation with Redis, updated Swagger/API naming.
OsmoDoc.API/OsmoDoc.API.csproj, OsmoDoc/OsmoDoc.csproj, OsmoDoc.API/OsmoDoc.API.sln, OsmoDoc.sln Added/updated project and solution files for OsmoDoc, referencing Redis and new project structure.
OsmoDoc/Pdf/Models/*, OsmoDoc/Pdf/PdfDocumentGenerator.cs Added new PDF models and generator with async, cross-platform support and improved placeholder handling.
OsmoDoc/Word/Models/*, OsmoDoc/Word/WordDocumentGenerator.cs Added new Word models and async document generator supporting text, table, and image placeholders.
OsmoDoc/Services/Interfaces/IRedisTokenStoreService.cs, OsmoDoc/Services/RedisTokenStoreService.cs Introduced Redis-based token store interface and implementation for JWT management.

Sequence Diagram(s)

User Login and JWT Token Storage with Redis

sequenceDiagram
    participant User
    participant LoginController
    participant AuthenticationHelper
    participant RedisTokenStoreService
    participant Redis

    User->>LoginController: POST /api/login (email)
    LoginController->>AuthenticationHelper: Generate JWT token
    AuthenticationHelper-->>LoginController: JWT token
    LoginController->>RedisTokenStoreService: StoreTokenAsync(token, email)
    RedisTokenStoreService->>Redis: SET valid_token:{token}
    Redis-->>RedisTokenStoreService: OK
    RedisTokenStoreService-->>LoginController: (done)
    LoginController-->>User: BaseResponse(token, status=Success)
Loading

JWT Validation on Protected Endpoint

sequenceDiagram
    participant User
    participant API
    participant RedisTokenStoreService
    participant Redis

    User->>API: Request with JWT token
    API->>RedisTokenStoreService: IsTokenValidAsync(token)
    RedisTokenStoreService->>Redis: EXISTS valid_token:{token}
    Redis-->>RedisTokenStoreService: true/false
    RedisTokenStoreService-->>API: true/false
    alt token valid
        API-->>User: Proceed (authorized)
    else token revoked
        API-->>User: 401 Unauthorized
    end
Loading

PDF Generation (HTML/EJS Template)

sequenceDiagram
    participant Client
    participant PdfController
    participant PdfDocumentGenerator
    participant OS/wkhtmltopdf

    Client->>PdfController: POST /api/pdf (Base64, DocumentData, etc.)
    PdfController->>PdfDocumentGenerator: GeneratePdf(templatePath, metaData, ...)
    alt EJS template
        PdfDocumentGenerator->>OS/wkhtmltopdf: Convert EJS to HTML
        OS/wkhtmltopdf-->>PdfDocumentGenerator: HTML file
    end
    PdfDocumentGenerator->>OS/wkhtmltopdf: Convert HTML to PDF
    OS/wkhtmltopdf-->>PdfDocumentGenerator: PDF file
    PdfDocumentGenerator-->>PdfController: PDF path
    PdfController-->>Client: PDF (as Base64)
Loading

Poem

🐇
OsmoDoc hops with a brand new name,
Redis joins in the JWT game.
PDFs and Words, now async and bright,
Placeholders replaced—what a delight!
With Docker and docs all shiny and neat,
This bunny’s release is truly a treat!
🌱✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 32b31f9 and 928a94e.

📒 Files selected for processing (2)
  • OsmoDoc/Pdf/PdfDocumentGenerator.cs (1 hunks)
  • OsmoDoc/Word/WordDocumentGenerator.cs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • OsmoDoc/Pdf/PdfDocumentGenerator.cs
  • OsmoDoc/Word/WordDocumentGenerator.cs
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (csharp)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🧹 Nitpick comments (4)
.env.example (1)

3-4: Reorder keys to satisfy dotenv-linter
The linter flags an [UnorderedKey] warning: REDIS_PORT should alphabetically precede REDIS_URL.

Apply this diff:

-REDIS_URL=redis:6379
-REDIS_PORT=6379
+REDIS_PORT=6379
+REDIS_URL=redis:6379
OsmoDoc/Pdf/PdfDocumentGenerator.cs (1)

23-50: Fix method signature order and improve parameter validation.

The method signature uses async static which should be static async for consistency with C# conventions. Also, the parameter validation could be more specific.

-    public async static Task GeneratePdf(string templatePath, List<ContentMetaData> metaDataList, string outputFilePath, bool isEjsTemplate, string? serializedEjsDataJson)
+    public static async Task GeneratePdf(string templatePath, List<ContentMetaData> metaDataList, string outputFilePath, bool isEjsTemplate, string? serializedEjsDataJson)

Also consider using ArgumentException instead of ArgumentNullException for empty/whitespace strings:

-            if (string.IsNullOrWhiteSpace(templatePath))
-            {
-                throw new ArgumentNullException(nameof(templatePath));
-            }
+            if (string.IsNullOrWhiteSpace(templatePath))
+            {
+                throw new ArgumentException("Template path cannot be null or empty.", nameof(templatePath));
+            }
OsmoDoc/Word/WordDocumentGenerator.cs (2)

24-24: Consider HttpClient disposal for better resource management.

While static HttpClient instances are generally acceptable for static classes, consider implementing IDisposable pattern or using a factory pattern for better resource management in production applications.

This is acceptable for the current implementation but could be improved for better resource management:

-    private static readonly HttpClient _httpClient = new HttpClient();
+    private static readonly HttpClient _httpClient = new HttpClient() 
+    { 
+        Timeout = TimeSpan.FromSeconds(30) // Add timeout for better reliability
+    };

301-302: Address the FIXME comment for performance optimization.

The TODO comment indicates a known performance issue with the nested loop operation that should be addressed.

The current implementation has O(n²) complexity for image replacement. Consider creating a lookup dictionary for drawings by name to improve performance:

+                // Create a lookup dictionary for better performance
+                var drawingLookup = drawings
+                    .Where(d => d.Descendants<DocProperties>().FirstOrDefault()?.Name != null)
+                    .ToDictionary(
+                        d => d.Descendants<DocProperties>().First().Name!,
+                        d => d
+                    );
+
+                foreach (var imagePlaceholder in imagePlaceholders)
+                {
+                    if (drawingLookup.TryGetValue(imagePlaceholder.Key, out Drawing? drawing))
+                    {
+                        // Process the specific drawing
+                    }
+                }

Would you like me to generate a complete refactored version of the image replacement logic?

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4ac81a6 and b4b5731.

📒 Files selected for processing (22)
  • .env.example (1 hunks)
  • OsmoDoc.API/Controllers/LoginController.cs (1 hunks)
  • OsmoDoc.API/Controllers/PdfController.cs (1 hunks)
  • OsmoDoc.API/Controllers/WordController.cs (1 hunks)
  • OsmoDoc.API/Helpers/CommonMethodsHelper.cs (1 hunks)
  • OsmoDoc.API/Models/BaseResponse.cs (1 hunks)
  • OsmoDoc.API/Models/LoginRequestDTO.cs (1 hunks)
  • OsmoDoc.API/Models/PdfGenerationRequestDTO.cs (1 hunks)
  • OsmoDoc.API/Models/RevokeTokenRequestDTO.cs (1 hunks)
  • OsmoDoc.API/Models/WordGenerationRequestDTO.cs (1 hunks)
  • OsmoDoc.API/OsmoDoc.API.csproj (1 hunks)
  • OsmoDoc.API/Program.cs (1 hunks)
  • OsmoDoc/OsmoDoc.csproj (1 hunks)
  • OsmoDoc/Pdf/Models/ContentMetaData.cs (1 hunks)
  • OsmoDoc/Pdf/PdfDocumentGenerator.cs (1 hunks)
  • OsmoDoc/Services/Interfaces/IRedisTokenStoreService.cs (1 hunks)
  • OsmoDoc/Services/RedisTokenStoreService.cs (1 hunks)
  • OsmoDoc/Word/Models/ContentData.cs (1 hunks)
  • OsmoDoc/Word/Models/DocumentData.cs (1 hunks)
  • OsmoDoc/Word/Models/TableData.cs (1 hunks)
  • OsmoDoc/Word/WordDocumentGenerator.cs (1 hunks)
  • docker-compose.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (19)
  • OsmoDoc/Pdf/Models/ContentMetaData.cs
  • OsmoDoc/Word/Models/DocumentData.cs
  • OsmoDoc/OsmoDoc.csproj
  • OsmoDoc.API/OsmoDoc.API.csproj
  • OsmoDoc.API/Helpers/CommonMethodsHelper.cs
  • OsmoDoc/Word/Models/TableData.cs
  • OsmoDoc/Services/RedisTokenStoreService.cs
  • OsmoDoc.API/Models/LoginRequestDTO.cs
  • OsmoDoc.API/Program.cs
  • OsmoDoc.API/Models/BaseResponse.cs
  • OsmoDoc.API/Models/PdfGenerationRequestDTO.cs
  • OsmoDoc.API/Controllers/LoginController.cs
  • OsmoDoc.API/Models/WordGenerationRequestDTO.cs
  • OsmoDoc/Word/Models/ContentData.cs
  • docker-compose.yaml
  • OsmoDoc.API/Controllers/PdfController.cs
  • OsmoDoc.API/Models/RevokeTokenRequestDTO.cs
  • OsmoDoc/Services/Interfaces/IRedisTokenStoreService.cs
  • OsmoDoc.API/Controllers/WordController.cs
🧰 Additional context used
🪛 dotenv-linter (3.3.0)
.env.example

[warning] 4-4: [UnorderedKey] The REDIS_PORT key should go before the REDIS_URL key

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (csharp)
🔇 Additional comments (6)
.env.example (1)

1-1: Descriptive JWT_KEY placeholder
The JWT_KEY placeholder clearly instructs users to replace it with a strong key of at least 32 characters.

OsmoDoc/Pdf/PdfDocumentGenerator.cs (5)

84-109: Well-implemented template replacement logic.

The method correctly handles file reading, placeholder replacement, and temporary file creation with proper null checking and unique naming using GUIDs.


111-171: Excellent cross-platform implementation with proper async process handling.

The method correctly handles platform-specific differences and includes proper validation, async process execution, and cleanup. The use of ProcessStartInfo with proper redirection and error handling is well-implemented.


173-241: Well-structured EJS to HTML conversion with proper resource management.

The method correctly handles temporary file creation, JSON validation, cross-platform command execution, and cleanup. The use of null-coalescing operator for default JSON content is a good practice.


243-270: Clean and focused helper methods.

Both IsValidJSON and EjsToHtmlArgumentsBasedOnOS are well-implemented with proper exception handling and clear platform-specific logic. The JSON validation approach using JToken.Parse is appropriate.


1-271: Comprehensive and well-structured PDF generation implementation.

This implementation successfully addresses the PR objectives by providing proper validation, null checking, and robust error handling. The code demonstrates excellent practices in:

  • Asynchronous programming with proper async/await usage
  • Cross-platform compatibility
  • Resource management with temporary file cleanup
  • Parameter validation and input sanitization
  • Separation of concerns with focused helper methods

The migration from the old DocumentService to OsmoDoc appears to have been executed well with improved async functionality and better configuration handling.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (5)
OsmoDoc/Word/WordDocumentGenerator.cs (5)

33-48: Add null check for documentData parameter.

The method validates templateFilePath and outputFilePath but doesn't validate the documentData parameter before accessing its properties on lines 47-48. This could result in null reference exceptions and compiler warnings.

+        if (documentData == null)
+        {
+            throw new ArgumentNullException(nameof(documentData));
+        }
+
         List<ContentData> contentData = documentData.Placeholders;
         List<TableData> tablesData = documentData.TablesData;

126-129: Remove unnecessary try-catch block.

The try-catch block doesn't add any value as it simply rethrows the exception without additional context or handling.

-        catch (Exception)
-        {
-            throw;
-        }

137-144: Fix resource disposal and avoid unnecessary Task.Run.

The FileStream is not properly disposed, and using Task.Run for synchronous I/O operations is not recommended for ASP.NET applications as it can lead to thread pool starvation.

-    private async static Task<XWPFDocument> GetXWPFDocument(string docFilePath)
-    {
-        return await Task.Run(() =>
-        {
-            FileStream readStream = File.OpenRead(docFilePath);
-            return new XWPFDocument(readStream);
-        });
-    }
+    private static Task<XWPFDocument> GetXWPFDocument(string docFilePath)
+    {
+        return Task.FromResult(() =>
+        {
+            using FileStream readStream = File.OpenRead(docFilePath);
+            return new XWPFDocument(readStream);
+        }());
+    }

151-166: Avoid unnecessary Task.Run for I/O operations.

Using Task.Run for file I/O operations is not recommended as it adds unnecessary thread pool overhead. File I/O operations should use native async methods or be synchronous if no async alternative exists.

-        await Task.Run(() =>
-        {
-            using (FileStream writeStream = File.Create(filePath))
-            {
-                document.Write(writeStream);
-            }
-        });
+        using (FileStream writeStream = File.Create(filePath))
+        {
+            document.Write(writeStream);
+        }

309-322: Unsafe use of null-forgiving operators.

The code uses null-forgiving operators (!) without ensuring the values are actually non-null, which could lead to runtime exceptions.

-                    if (docProperty != null && docProperty.Name != null && imagePlaceholders.ContainsKey(docProperty.Name!))
+                    if (docProperty?.Name != null && imagePlaceholders.ContainsKey(docProperty.Name))
                     {
                         List<Blip> drawingBlips = drawing.Descendants<Blip>().ToList();

                         foreach (Blip blip in drawingBlips)
                         {
-                            if (blip.Embed == null)
+                            if (blip.Embed?.Value == null)
                             {
                                 continue;
                             }

-                            OpenXmlPart imagePart = mainDocumentPart!.GetPartById(blip.Embed!);
+                            if (mainDocumentPart == null) continue;
+                            OpenXmlPart imagePart = mainDocumentPart.GetPartById(blip.Embed.Value);

-                            string imagePath = imagePlaceholders[docProperty.Name!];
+                            string imagePath = imagePlaceholders[docProperty.Name];
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b4b5731 and ba24148.

📒 Files selected for processing (1)
  • OsmoDoc/Word/WordDocumentGenerator.cs (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (csharp)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (2)
OsmoDoc.API/Controllers/LoginController.cs (2)

42-43: Consider using structured logging.

Instead of logging the exception message and stack trace separately, consider using structured logging with the exception object directly for better error tracking.

-            this._logger.LogError(ex.Message);
-            this._logger.LogError(ex.StackTrace);
+            this._logger.LogError(ex, "Error occurred during login for email: {Email}", loginRequest?.Email);

65-66: Consider using structured logging for revoke method.

Apply the same structured logging improvement here as well.

-            this._logger.LogError(ex.Message);
-            this._logger.LogError(ex.StackTrace);
+            this._logger.LogError(ex, "Error occurred during token revocation");
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ba24148 and 6edbe02.

📒 Files selected for processing (21)
  • .env.example (1 hunks)
  • OsmoDoc.API/Controllers/LoginController.cs (1 hunks)
  • OsmoDoc.API/Controllers/PdfController.cs (1 hunks)
  • OsmoDoc.API/Controllers/WordController.cs (1 hunks)
  • OsmoDoc.API/Helpers/CommonMethodsHelper.cs (1 hunks)
  • OsmoDoc.API/Models/BaseResponse.cs (1 hunks)
  • OsmoDoc.API/Models/LoginRequestDTO.cs (1 hunks)
  • OsmoDoc.API/Models/PdfGenerationRequestDTO.cs (1 hunks)
  • OsmoDoc.API/Models/RevokeTokenRequestDTO.cs (1 hunks)
  • OsmoDoc.API/Models/WordGenerationRequestDTO.cs (1 hunks)
  • OsmoDoc.API/OsmoDoc.API.csproj (1 hunks)
  • OsmoDoc.API/Program.cs (1 hunks)
  • OsmoDoc/OsmoDoc.csproj (1 hunks)
  • OsmoDoc/Pdf/Models/ContentMetaData.cs (1 hunks)
  • OsmoDoc/Services/Interfaces/IRedisTokenStoreService.cs (1 hunks)
  • OsmoDoc/Services/RedisTokenStoreService.cs (1 hunks)
  • OsmoDoc/Word/Models/ContentData.cs (1 hunks)
  • OsmoDoc/Word/Models/DocumentData.cs (1 hunks)
  • OsmoDoc/Word/Models/TableData.cs (1 hunks)
  • OsmoDoc/Word/WordDocumentGenerator.cs (1 hunks)
  • docker-compose.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (19)
  • OsmoDoc.API/OsmoDoc.API.csproj
  • OsmoDoc.API/Helpers/CommonMethodsHelper.cs
  • OsmoDoc/Word/Models/TableData.cs
  • OsmoDoc/Word/Models/DocumentData.cs
  • OsmoDoc.API/Models/LoginRequestDTO.cs
  • OsmoDoc/Word/Models/ContentData.cs
  • OsmoDoc.API/Models/RevokeTokenRequestDTO.cs
  • OsmoDoc.API/Models/PdfGenerationRequestDTO.cs
  • OsmoDoc/Pdf/Models/ContentMetaData.cs
  • OsmoDoc.API/Controllers/PdfController.cs
  • OsmoDoc/OsmoDoc.csproj
  • OsmoDoc.API/Models/BaseResponse.cs
  • docker-compose.yaml
  • OsmoDoc/Services/Interfaces/IRedisTokenStoreService.cs
  • OsmoDoc/Services/RedisTokenStoreService.cs
  • OsmoDoc.API/Controllers/WordController.cs
  • OsmoDoc.API/Models/WordGenerationRequestDTO.cs
  • OsmoDoc.API/Program.cs
  • OsmoDoc/Word/WordDocumentGenerator.cs
🧰 Additional context used
🪛 dotenv-linter (3.3.0)
.env.example

[warning] 4-4: [UnorderedKey] The REDIS_PORT key should go before the REDIS_URL key

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (csharp)
🔇 Additional comments (2)
.env.example (2)

1-1: Improved JWT key placeholder.

The updated placeholder text clearly communicates the security requirement for a strong key with minimum 32 characters. This is a good improvement for security guidance.


3-4: Redis configuration variables added appropriately.

The Redis URL and port variables are correctly configured for the new token storage functionality. The static analysis warning about key ordering is a false positive - environment variable order doesn't affect functionality in .env files.

@osm-Jatin osm-Jatin mentioned this pull request Jul 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants