Skip to content

Conversation

@osm-Jatin
Copy link

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

Task Link

Description

  • Convert to file-scoped namespaces
  • Renamed project from DocumentService to OsmoDoc and updated all related namespaces
  • Update Dockerfile and docker-compose for OsmoDoc rename
  • Update docs directory for OsmoDoc rename
  • Update GitHub documentation files after OsmoDoc rename
  • Update Contributing.md file

Summary by CodeRabbit

  • Refactor
    • Renamed the project from "DocumentService" to "OsmoDoc" across all namespaces, files, configuration, and documentation.
    • Updated Docker and docker-compose configurations to use new service, image, and container names.
    • Adjusted project and solution file names and references to reflect the new project identity.
  • Documentation
    • Updated all documentation, README, and contributor guidelines to reference "OsmoDoc" instead of "DocumentService".
    • Revised API and model documentation to match new namespaces and assembly names.
  • Chores
    • Updated pull request templates and manifest files to align with the rebranded project structure.
  • Revert
    • Removed old model and generator classes under the previous namespace and added equivalent classes under the new namespace, maintaining existing functionality.

@coderabbitai
Copy link

coderabbitai bot commented Jun 15, 2025

Walkthrough

This change rebrands the entire project from "DocumentService" to "OsmoDoc." All namespaces, file paths, class and enum definitions, documentation, Docker configurations, and related references have been updated to use the new "OsmoDoc" naming. No functional or structural changes were made to the logic of the codebase; only naming, references, and documentation paths were altered.

Changes

Files/Groups Change Summary
DocumentService/Pdf/Models/*, DocumentService/Pdf/PdfDocumentGenerator.cs Deleted PDF models and generator classes; replaced by OsmoDoc equivalents.
DocumentService/Word/Models/*, DocumentService/Word/WordDocumentGenerator.cs Deleted Word models, enums, and generator class; replaced by OsmoDoc equivalents.
OsmoDoc/Pdf/Models/*, OsmoDoc/Pdf/PdfDocumentGenerator.cs Added PDF models and generator class under OsmoDoc namespace.
OsmoDoc/Word/Models/*, OsmoDoc/Word/WordDocumentGenerator.cs Added Word models, enums, and generator class under OsmoDoc namespace.
OsmoDoc.API/Controllers/*, OsmoDoc.API/Helpers/*, OsmoDoc.API/Models/* Updated namespaces and using directives from DocumentService to OsmoDoc; no logic changes.
OsmoDoc.API/Program.cs Updated namespaces and Swagger title from DocumentService to OsmoDoc.
OsmoDoc.API/OsmoDoc.API.csproj, OsmoDoc.API/OsmoDoc.API.sln, OsmoDoc.sln Updated project references and solution entries from DocumentService to OsmoDoc.
.github/PULL_REQUEST_TEMPLATE/pull_request_template_api.md Updated contributing guidelines URL from document-service to osmodoc.
CONTRIBUTING.md, README.md Rebranded all textual and URL references from DocumentService to OsmoDoc.
Dockerfile, docker-compose.yaml Updated project, image, and service names from DocumentService to OsmoDoc.
docs/site/*, docs/site/manifest.json, docs/site/xrefmap.yml Updated all documentation and cross-reference files to use OsmoDoc namespaces and paths.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant OsmoDoc.API
    participant PdfGenerator
    participant WordGenerator

    Client->>OsmoDoc.API: POST /pdf/generate (HTML/EJS template)
    OsmoDoc.API->>PdfGenerator: GeneratePdf(templatePath, metaData, ...)
    PdfGenerator->>PdfGenerator: (If EJS) Convert EJS to HTML
    PdfGenerator->>PdfGenerator: Replace placeholders in HTML
    PdfGenerator->>PdfGenerator: Convert HTML to PDF
    PdfGenerator-->>OsmoDoc.API: PDF file path
    OsmoDoc.API-->>Client: PDF file (base64)

    Client->>OsmoDoc.API: POST /word/generate (template, data)
    OsmoDoc.API->>WordGenerator: GenerateDocumentByTemplate(templatePath, data, outputPath)
    WordGenerator->>WordGenerator: Replace placeholders (text, tables, images)
    WordGenerator-->>OsmoDoc.API: Word file path
    OsmoDoc.API-->>Client: Word file (base64)
Loading

Possibly related PRs

Suggested labels

ready for review

Poem

🐇
A hop, a skip, a brand new name,
OsmoDoc now takes the game!
From Docker files to docs so neat,
Every namespace, every sheet.
Goodbye old, hello new,
OsmoDoc, we welcome you!

✨ 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.

@osm-Jatin osm-Jatin changed the title Feat/rename to osmodoc refactor: rename to osmodoc and update related configs and docs Jun 15, 2025
@osm-Jatin osm-Jatin requested a review from sameer-s-b June 15, 2025 12:29
@osm-Jatin osm-Jatin self-assigned this Jun 15, 2025
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: 7

🧹 Nitpick comments (22)
OsmoDoc.API/Helpers/Base64StringHelper.cs (1)

9-12: Validate Configuration Value
configuration.GetSection(...).Value may be null, leading to a runtime exception on Convert.ToInt64. Consider adding a null or format check to provide a clearer error message.

- long uploadFileSizeLimitBytes = Convert.ToInt64(configuration.GetSection("CONFIG:UPLOAD_FILE_SIZE_LIMIT_BYTES").Value);
+ var sizeLimitValue = configuration["CONFIG:UPLOAD_FILE_SIZE_LIMIT_BYTES"];
+ if (!long.TryParse(sizeLimitValue, out var uploadFileSizeLimitBytes))
+     throw new ConfigurationErrorsException($"Invalid or missing UPLOAD_FILE_SIZE_LIMIT_BYTES: '{sizeLimitValue}'");
OsmoDoc/Pdf/Models/DocumentData.cs (1)

5-10: Consider initializing Placeholders list
To avoid potential null-reference exceptions when consuming DocumentData, initialize Placeholders with an empty list, e.g.:

public List<ContentMetaData> Placeholders { get; set; } = new List<ContentMetaData>();
OsmoDoc/Pdf/Models/ContentMetaData.cs (1)

3-7: Address non-nullable property initialization
The auto-properties Placeholder and Content are non-nullable but not given defaults, which triggers CS8618 warnings. Consider marking them nullable or initializing, e.g.:

public string Placeholder { get; set; } = string.Empty;
public string Content { get; set; } = string.Empty;
OsmoDoc.API/Helpers/AuthenticationHelper.cs (1)

11-12: Parameter naming should use camelCase
Rename LoginEmail to loginEmail to adhere to C# parameter naming conventions:

-public static string JwtTokenGenerator(string LoginEmail)
+public static string JwtTokenGenerator(string loginEmail)
OsmoDoc/Word/Models/TableData.cs (2)

1-3: Remove BOM and verify using directive
There's a leading BOM character before the using statement; remove it to avoid potential compilation or encoding issues. The using System.Collections.Generic; directive is otherwise correct.


16-21: Suggest initializing Data to avoid null
Consider giving Data a default initializer (e.g., = new List<Dictionary<string, string>>();) to prevent null-reference exceptions when consuming this model.

OsmoDoc/Word/Models/DocumentData.cs (2)

1-4: Remove unused using directive
The using System.Text; import isn’t used in this file. Removing it will clean up the imports.


16-23: Initialize list properties to avoid null references
Both Placeholders and TablesData are auto-properties without default values. Accessing them before assignment leads to NREs. Consider initializing them or enforcing non-nullability:

- public List<ContentData> Placeholders { get; set; }
- public List<TableData> TablesData { get; set; }
+ public List<ContentData> Placeholders { get; set; } = new List<ContentData>();
+ public List<TableData> TablesData { get; set; } = new List<TableData>();
OsmoDoc/Word/Models/Enums.cs (2)

1-4: Remove redundant blank lines before enum declarations
There are extra blank lines between the file-scoped namespace and the first enum. Trimming these improves readability.


29-35: Tidy XML comment spacing for ParentBody.Table
The <summary> block for Table is separated by an extra blank line from the enum member. Removing that blank line aligns formatting with other members.

OsmoDoc.API/Controllers/PdfController.cs (3)

63-71: Extract shared PDF-generation logic into a helper
The core steps—directory creation, Base64 save/load, and PdfDocumentGenerator.GeneratePdf invocation—are duplicated between GeneratePdf and GeneratePdfUsingEjs. Pull these into a private method to reduce duplication and ease maintenance.

Also applies to: 155-163


82-90: Use structured logging for exceptions
Instead of two separate _logger.LogError calls, leverage structured logging to capture the exception and message in one call:

_logger.LogError(ex, "Error generating PDF (EJS: {IsEjs})", isEjsTemplate);

This is more concise and captures the full stack trace.

Also applies to: 174-182


44-53: Implement cleanup for temporary files
Files written to WebRootPath (HTML/EJS templates and output PDFs) aren’t deleted after conversion. Over time, this may consume disk space. Consider deleting these files after ConvertFileToBase64String or scheduling a cleanup job.

Also applies to: 53-61

OsmoDoc.API/Controllers/WordController.cs (4)

63-98: Refactor image‐handling loop into its own method
The logic for saving and replacing image placeholders spans ~35 lines. Extracting it into a dedicated helper or service will slim down the controller and improve testability.


100-106: Map TablesData via AutoMapper
For consistency with Placeholders, use AutoMapper to map request.DocumentData.TablesData to domain TableData objects:

TablesData = _mapper.Map<List<TableData>>(request.DocumentData.TablesData)

This guards against mismatches if DTOs evolve.


123-153: Adopt structured exception logging
Replace the pair of _logger.LogError calls with a single structured log entry to capture context and the exception object:

_logger.LogError(ex, "Error generating Word document");

This is more idiomatic and includes the stack trace.


108-112: Schedule cleanup of generated files
Temporary template and output files (DOCX) persist under the web root. To prevent resource exhaustion, delete them after encoding to Base64 or implement a background cleanup.

Also applies to: 115-117

OsmoDoc/Word/Models/ContentData.cs (1)

12-17: Initialize non-nullable string properties
Both Placeholder and Content are non-nullable but lack defaults. To prevent null assignments, initialize them or enforce via constructor/attributes:

- public string Placeholder { get; set; }
- public string Content { get; set; }
+ public string Placeholder { get; set; } = string.Empty;
+ public string Content     { get; set; } = string.Empty;
OsmoDoc/Pdf/PdfDocumentGenerator.cs (2)

49-52: Remove unused exception variable or log it

catch (Exception e) immediately re-throws; the e identifier is never used, triggering a compiler warning.

- catch (Exception e)
- {
-     throw;
- }
+ catch
+ {
+     throw;
+ }
🧰 Tools
🪛 GitHub Check: build

[warning] 49-49:
The variable 'e' is declared but never used


56-75: Dispose temporary files & streams safely

ReplaceFileElementsWithMetaData creates a Modified folder that is never deleted; ConvertHtmlToPdf deletes the HTML file but leaves the directory. Consider using for streams and a try/finally that cleans up the entire temp directory once PDF generation completes.

Also applies to: 109-110

OsmoDoc/Word/WordDocumentGenerator.cs (2)

110-113: Drop unused ex variable

catch (Exception ex) re-throws without using ex, producing a warning. Use a bare catch or log the exception.

🧰 Tools
🪛 GitHub Check: build

[warning] 110-110:
The variable 'ex' is declared but never used


70-77: Regex excludes digits/underscores in placeholders

@"{[a-zA-Z]+}" prevents placeholders like {USER_1}. Consider @"{\w+}" or a more specific pattern.

Also applies to: 186-197

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between d055cd3 and 9750310.

⛔ Files ignored due to path filters (1)
  • OsmoDoc.API/wwwroot/Tools/wkhtmltopdf.exe is excluded by !**/*.exe
📒 Files selected for processing (46)
  • .github/PULL_REQUEST_TEMPLATE/pull_request_template_api.md (1 hunks)
  • CONTRIBUTING.md (7 hunks)
  • Dockerfile (2 hunks)
  • DocumentService/Pdf/Models/ContentMetaData.cs (0 hunks)
  • DocumentService/Pdf/Models/DocumentData.cs (0 hunks)
  • DocumentService/Pdf/PdfDocumentGenerator.cs (0 hunks)
  • DocumentService/Word/Models/ContentData.cs (0 hunks)
  • DocumentService/Word/Models/DocumentData.cs (0 hunks)
  • DocumentService/Word/Models/Enums.cs (0 hunks)
  • DocumentService/Word/Models/TableData.cs (0 hunks)
  • DocumentService/Word/WordDocumentGenerator.cs (0 hunks)
  • OsmoDoc.API/Controllers/PdfController.cs (1 hunks)
  • OsmoDoc.API/Controllers/WordController.cs (1 hunks)
  • OsmoDoc.API/DotEnv.cs (1 hunks)
  • OsmoDoc.API/Helpers/AuthenticationHelper.cs (1 hunks)
  • OsmoDoc.API/Helpers/AutoMappingProfile.cs (1 hunks)
  • OsmoDoc.API/Helpers/Base64StringHelper.cs (1 hunks)
  • OsmoDoc.API/Helpers/CommonMethodsHelper.cs (1 hunks)
  • OsmoDoc.API/Models/BaseResponse.cs (1 hunks)
  • OsmoDoc.API/Models/PdfGenerationRequestDTO.cs (1 hunks)
  • OsmoDoc.API/Models/WordGenerationRequestDTO.cs (1 hunks)
  • OsmoDoc.API/OsmoDoc.API.csproj (1 hunks)
  • OsmoDoc.API/OsmoDoc.API.sln (1 hunks)
  • OsmoDoc.API/Program.cs (1 hunks)
  • OsmoDoc.sln (1 hunks)
  • OsmoDoc/Pdf/Models/ContentMetaData.cs (1 hunks)
  • OsmoDoc/Pdf/Models/DocumentData.cs (1 hunks)
  • OsmoDoc/Pdf/PdfDocumentGenerator.cs (1 hunks)
  • OsmoDoc/Word/Models/ContentData.cs (1 hunks)
  • OsmoDoc/Word/Models/DocumentData.cs (1 hunks)
  • OsmoDoc/Word/Models/Enums.cs (1 hunks)
  • OsmoDoc/Word/Models/TableData.cs (1 hunks)
  • OsmoDoc/Word/WordDocumentGenerator.cs (1 hunks)
  • README.md (6 hunks)
  • docker-compose.yaml (1 hunks)
  • docs/site/10.0.2/api/OsmoDoc.Word.Models.ContentData.html (5 hunks)
  • docs/site/10.0.2/api/OsmoDoc.Word.Models.ContentType.html (2 hunks)
  • docs/site/10.0.2/api/OsmoDoc.Word.Models.DocumentData.html (4 hunks)
  • docs/site/10.0.2/api/OsmoDoc.Word.Models.ParentBody.html (2 hunks)
  • docs/site/10.0.2/api/OsmoDoc.Word.Models.TableData.html (3 hunks)
  • docs/site/10.0.2/api/OsmoDoc.Word.Models.html (2 hunks)
  • docs/site/10.0.2/api/OsmoDoc.Word.WordDocumentGenerator.html (3 hunks)
  • docs/site/10.0.2/api/OsmoDocWord.html (2 hunks)
  • docs/site/10.0.2/api/toc.html (1 hunks)
  • docs/site/manifest.json (1 hunks)
  • docs/site/xrefmap.yml (1 hunks)
💤 Files with no reviewable changes (8)
  • DocumentService/Pdf/Models/ContentMetaData.cs
  • DocumentService/Word/Models/TableData.cs
  • DocumentService/Pdf/Models/DocumentData.cs
  • DocumentService/Word/Models/ContentData.cs
  • DocumentService/Word/Models/Enums.cs
  • DocumentService/Pdf/PdfDocumentGenerator.cs
  • DocumentService/Word/Models/DocumentData.cs
  • DocumentService/Word/WordDocumentGenerator.cs
🧰 Additional context used
🧬 Code Graph Analysis (6)
OsmoDoc.API/Models/PdfGenerationRequestDTO.cs (2)
OsmoDoc/Pdf/Models/DocumentData.cs (1)
  • DocumentData (7-10)
OsmoDoc/Word/Models/DocumentData.cs (1)
  • DocumentData (11-23)
OsmoDoc.API/Helpers/AutoMappingProfile.cs (2)
OsmoDoc.API/Models/WordGenerationRequestDTO.cs (1)
  • WordContentDataRequestDTO (15-18)
OsmoDoc/Word/Models/ContentData.cs (1)
  • ContentData (7-29)
OsmoDoc/Pdf/Models/DocumentData.cs (1)
OsmoDoc/Pdf/Models/ContentMetaData.cs (1)
  • ContentMetaData (3-7)
OsmoDoc.API/Controllers/WordController.cs (7)
OsmoDoc.API/Helpers/Base64StringHelper.cs (3)
  • Task (5-17)
  • Task (19-30)
  • Base64StringHelper (3-31)
OsmoDoc.API/Models/BaseResponse.cs (2)
  • BaseResponse (12-20)
  • BaseResponse (14-14)
OsmoDoc.API/Models/WordGenerationRequestDTO.cs (2)
  • WordGenerationRequestDTO (7-13)
  • WordContentDataRequestDTO (15-18)
OsmoDoc.API/Helpers/CommonMethodsHelper.cs (3)
  • CommonMethodsHelper (3-26)
  • GenerateRandomFileName (21-25)
  • CreateDirectoryIfNotExists (5-19)
OsmoDoc/Word/Models/DocumentData.cs (1)
  • DocumentData (11-23)
OsmoDoc/Word/Models/ContentData.cs (1)
  • ContentData (7-29)
OsmoDoc/Word/WordDocumentGenerator.cs (2)
  • WordDocumentGenerator (19-309)
  • GenerateDocumentByTemplate (27-114)
OsmoDoc/Pdf/PdfDocumentGenerator.cs (1)
OsmoDoc/Pdf/Models/ContentMetaData.cs (1)
  • ContentMetaData (3-7)
OsmoDoc/Word/WordDocumentGenerator.cs (3)
OsmoDoc/Word/Models/DocumentData.cs (1)
  • DocumentData (11-23)
OsmoDoc/Word/Models/ContentData.cs (1)
  • ContentData (7-29)
OsmoDoc/Word/Models/TableData.cs (1)
  • TableData (9-22)
🪛 GitHub Check: build
OsmoDoc.API/Models/WordGenerationRequestDTO.cs

[warning] 23-23:
Non-nullable property 'TablesData' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.


[warning] 22-22:
Non-nullable property 'Placeholders' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

OsmoDoc.API/Models/BaseResponse.cs

[warning] 30-30:
Dereference of a possibly null reference.


[warning] 30-30:
Dereference of a possibly null reference.


[warning] 27-27:
Dereference of a possibly null reference.

OsmoDoc.API/Helpers/CommonMethodsHelper.cs

[warning] 9-9:
Converting null literal or possible null value to non-nullable type.

OsmoDoc.API/Controllers/WordController.cs

[warning] 40-40:
Possible null reference argument for parameter 'paths' in 'string Path.Combine(params string[] paths)'.

OsmoDoc/Pdf/PdfDocumentGenerator.cs

[warning] 49-49:
The variable 'e' is declared but never used

OsmoDoc/Word/WordDocumentGenerator.cs

[warning] 293-293:
'WebClient.WebClient()' is obsolete: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.' (https://aka.ms/dotnet-warnings/SYSLIB0014)


[warning] 110-110:
The variable 'ex' is declared but never used

🪛 LanguageTool
README.md

[duplication] ~1-~1: Possible typo: you repeated a word.
Context: # OsmoDoc OsmoDoc is a library with the following functio...

(ENGLISH_WORD_REPEAT_RULE)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (csharp)
🔇 Additional comments (62)
OsmoDoc.API/OsmoDoc.API.csproj (1)

15-15: Consistent Project Reference Update
The project reference has been correctly updated to point at ..\OsmoDoc\OsmoDoc.csproj, matching the new project structure.

OsmoDoc.API/Helpers/Base64StringHelper.cs (1)

1-1: File-Scoped Namespace Applied
Switching to the C# 10 file-scoped namespace for OsmoDoc.API.Helpers is correct and consistent with your <ImplicitUsings>enable</ImplicitUsings> setup.

OsmoDoc.API/OsmoDoc.API.sln (1)

6-6: Solution Entry Renamed
The solution entry has been updated to "OsmoDoc.API" and references OsmoDoc.API.csproj correctly. No further changes needed here.

OsmoDoc.API/Helpers/CommonMethodsHelper.cs (1)

9-12: Static Analysis False Positive
The string.IsNullOrWhiteSpace(directoryName) check safely handles a null result from Path.GetDirectoryName. You can ignore the null-to-non-nullable warning here.

🧰 Tools
🪛 GitHub Check: build

[warning] 9-9:
Converting null literal or possible null value to non-nullable type.

.github/PULL_REQUEST_TEMPLATE/pull_request_template_api.md (1)

5-5: Updated Contributing Link
The URL now points to the osmodoc repository CONTRIBUTING.md as expected. Ensure no other template links still reference document-service.

OsmoDoc.API/Models/WordGenerationRequestDTO.cs (1)

1-4: Consistent namespace and using directives rename
The using OsmoDoc.Word.Models and namespace OsmoDoc.API.Models updates correctly mirror the project-wide rebranding from DocumentService to OsmoDoc.

OsmoDoc.API/Helpers/AutoMappingProfile.cs (1)

1-12: Approve updated mapping profile and namespace
The AutoMappingProfile class has been correctly moved to OsmoDoc.API.Helpers, and the mapping call CreateMap<WordContentDataRequestDTO, ContentData>() aligns with the relocated model classes under the new OsmoDoc namespace.

OsmoDoc.API/Models/PdfGenerationRequestDTO.cs (2)

1-4: Consistent namespace and using updates
The namespace and using directive have been correctly updated from DocumentService to OsmoDoc without altering functionality.


8-11: Model property updated correctly
Properties correctly reference the new DocumentData DTO in OsmoDoc.Pdf.Models. Ensure API controllers and client code have been updated accordingly.

docs/site/10.0.2/api/OsmoDoc.Word.Models.html (2)

8-13: Namespace references updated correctly
Metadata tags and titles now reference OsmoDoc.Word.Models instead of DocumentService.Word.Models.


70-93:

Details

✅ Verification successful

Cross-reference links updated
All data-uid attributes and hyperlinks target the new OsmoDoc.Word.Models namespace. Verify no lingering DocumentService.Word.Models references remain.


🏁 Script executed:

#!/bin/bash
# Verify no leftover DocumentService namespace in Word.Models docs
rg -R "DocumentService.Word.Models" docs/site/10.0.2/api

Length of output: 461


🏁 Script executed:

#!/bin/bash
# Verify no leftover DocumentService namespace in Word.Models docs
rg "DocumentService.Word.Models" -n docs/site/10.0.2/api

Length of output: 56


No leftover DocumentService.Word.Models references
A search of docs/site/10.0.2/api for DocumentService.Word.Models returned no matches, confirming all cross-reference links now target OsmoDoc.Word.Models.

docs/site/10.0.2/api/OsmoDocWord.html (2)

8-12: Title and metadata reflect new namespace
The <title> and <meta name="title"> now correctly show OsmoDoc.Word.


70-84:

Details

✅ Verification successful

Article data-uid and links updated
The data-uid, heading IDs, and class link have been renamed to use OsmoDoc.Word. Ensure no residual DocumentService.Word entries by searching the docs.


🏁 Script executed:

#!/bin/bash
# Check for residual DocumentService.Word references in OsmoDocWord.html
rg -R "DocumentService.Word" docs/site/10.0.2/api/OsmoDocWord.html

Length of output: 471


🏁 Script executed:

#!/bin/bash
# Corrected: search for residual DocumentService.Word references
rg "DocumentService.Word" docs/site/10.0.2/api/OsmoDocWord.html

# Also search the entire docs tree to ensure no leftovers
rg "DocumentService.Word" docs

Length of output: 94


All DocumentService.Word references removed
Verified that no occurrences of DocumentService.Word remain in docs/site/10.0.2/api/OsmoDocWord.html or elsewhere in the docs/ tree. All data-uid, heading IDs, and links consistently use OsmoDoc.Word.

Dockerfile (2)

13-19: Consistent project rename in COPY and restore steps
The COPY commands and subsequent dotnet restore invocations correctly reference OsmoDoc.API and OsmoDoc. All paths align with the new project structure.


48-48: Verify entrypoint matches published DLL
The entrypoint is updated to OsmoDoc.API.dll. Confirm that the published assembly name is indeed OsmoDoc.API.dll.

OsmoDoc.API/Helpers/AuthenticationHelper.cs (1)

6-6: File-scoped namespace updated correctly
The namespace is now OsmoDoc.API.Helpers using C# 10 file-scoped syntax.

docs/site/10.0.2/api/OsmoDoc.Word.Models.TableData.html (4)

70-75: Update data-uid and heading IDs for TableData
The data-uid attributes and <h1> ID have been renamed to OsmoDoc.Word.Models.TableData. This aligns the HTML doc with the new namespace.


107-108: Namespace and assembly references updated
The <h6> tags now correctly display Namespace: OsmoDoc.Word.Models and Assembly: OsmoDoc.dll.


115-116: Data property anchor updated
The id and data-uid for the Data property have been updated to use the OsmoDoc prefix.


139-140: TablePos property anchor updated
The id and data-uid for the TablePos property have been updated accordingly.

OsmoDoc.API/DotEnv.cs (1)

1-1: File-scoped namespace updated correctly
The namespace declaration has been changed from DocumentService.API to OsmoDoc.API as expected.

docs/site/manifest.json (2)

3-4: Rename base source path
The source_base_path has been updated to point at osmodoc, reflecting the project folder rename.


8-62: Update managed reference paths for OsmoDoc models
All source_relative_path and relative_path entries for the managed reference files have been renamed from DocumentService to OsmoDoc across the manifest.

docs/site/10.0.2/api/OsmoDoc.Word.Models.ContentData.html (5)

70-74: Namespace identifiers updated correctly

All data-uid and id attributes for the ContentData class have been changed to use OsmoDoc.Word.Models.ContentData.


107-108: Assembly and namespace labels aligned

The <h6> elements now correctly reference OsmoDoc as the namespace and assembly.


115-116: Property anchors updated

The anchor and heading for the Content property have been renamed to OsmoDoc.Word.Models.ContentData.Content.


156-156: Type link corrected

The cross-reference link for ContentType now points to OsmoDoc.Word.Models.ContentType.html.


179-179: Type link corrected

The cross-reference link for ParentBody now points to OsmoDoc.Word.Models.ParentBody.html.

README.md (7)

1-2: Project title and description renamed

The README header and introductory sentence correctly use OsmoDoc instead of DocumentService.

🧰 Tools
🪛 LanguageTool

[duplication] ~1-~1: Possible typo: you repeated a word.
Context: # OsmoDoc OsmoDoc is a library with the following functio...

(ENGLISH_WORD_REPEAT_RULE)


27-27: Clone instruction updated

The repository clone command now references osmodoc.


52-52: Docker Compose section renamed

The dockerize instructions now refer to osmodoc.


103-103: Windows Tools section updated

The OsmoDoc.dll path instructions are correctly updated for the new project name.


126-127: Code snippet file paths renamed

The C# example uses OsmoDoc in the template and output file paths.


190-190: License link updated

The MIT license URL now points to the osmodoc repository.


193-194: Contributors badge updated

The contributors image reference now targets the osmodoc repo.

CONTRIBUTING.md (8)

1-2: Header and project name updated

The contributing guide title and welcome message now use OsmoDoc.


17-17: Support channel updated

General support is now directed to Stack Overflow with the osmodoc tag.


26-27: Issue submission links updated

The links for reporting bugs and creating pull requests point to the osmodoc repository.


37-37: Project reference in bug report checklist

The bullet listing of the project version is updated to osmodoc.


43-43: New-issue form link corrected

The “new issue form” URL now refers to osmodoc.


49-49: Pull-requests link updated

The PR search link points to the osmodoc pulls page.


66-66: Target branch instruction renamed

The guidance now instructs sending PRs to osmodoc:main.


68-71: Commit guidance icons and project name updated

The example bullets now reflect osmodoc in the styling section.

docs/site/10.0.2/api/OsmoDoc.Word.Models.DocumentData.html (5)

70-74: Namespace identifiers updated correctly

The <article> element and heading now reference OsmoDoc.Word.Models.DocumentData.


107-108: Assembly and namespace labels aligned

The namespace and assembly <h6> tags reflect OsmoDoc.


115-116: Placeholders property anchors updated

The anchor and heading for Placeholders now use OsmoDoc.Word.Models.DocumentData.Placeholders.


133-133: Type link corrected

The link for ContentData within List<ContentData> points to the new OsmoDoc path.


156-156: Type link corrected

The link for TableData within List<TableData> now points to OsmoDoc.Word.Models.TableData.html.

OsmoDoc.API/Program.cs (4)

1-12: Using directives updated

All using statements now reference OsmoDoc.API instead of DocumentService.API.


23-27: DotEnv loader namespace adjusted

The call to load environment variables uses OsmoDoc.API.DotEnv, matching the renamed namespace.


47-60: Swagger documentation title updated

The OpenApiInfo title now correctly reads "OsmoDoc API".


1-137:

Details

✅ Verification successful

Verify no residual DocumentService references remain

Please ensure there are no stray DocumentService strings in this file.


🏁 Script executed:

#!/bin/bash
# Search for any remaining DocumentService references in Program.cs
rg "DocumentService" -n OsmoDoc.API/Program.cs

Length of output: 46


No residual DocumentService references in Program.cs
Ripgrep search confirms there are zero occurrences of DocumentService in OsmoDoc.API/Program.cs. No further action needed.

OsmoDoc.sln (1)

6-6: Updated solution project entries for rebranding
The solution file references have been correctly renamed from DocumentService to OsmoDoc, and the project file paths have been updated.

Also applies to: 8-8

docker-compose.yaml (1)

2-7: Renamed Docker Compose service and image/container identifiers
The document-service service has been rebranded to osmodoc, with corresponding image and container names updated. The YAML structure and indentation remain valid.

docs/site/10.0.2/api/toc.html (1)

17-17: Consistent TOC link renaming
All Table of Contents entries for the Word models and generators have been updated from the old DocumentService namespace to OsmoDoc.

Also applies to: 21-21, 27-27, 31-31, 34-34, 37-37, 40-40, 43-43

OsmoDoc/Word/Models/TableData.cs (2)

3-3: Correct file-scoped namespace
The file-scoped namespace OsmoDoc.Word.Models is properly declared.


6-14: XML docs and TablePos property
The XML summary clearly describes TablePos, and the auto-property follows conventions.

docs/site/10.0.2/api/OsmoDoc.Word.WordDocumentGenerator.html (1)

70-70: Documentation namespace and assembly update
All DocFX headings, metadata, and parameter links have been correctly updated from DocumentService to OsmoDoc. The HTML remains valid with no broken references.

Also applies to: 74-74, 107-108, 115-116, 139-139

OsmoDoc.API/Controllers/PdfController.cs (1)

34-40: Validate configuration values before combining paths
Using _configuration.GetSection(...).Value may return null, leading to ArgumentNullException in Path.Combine. Use GetValue<string>(key) with a default or explicitly check for null and throw a clear error message.

Also applies to: 126-132

OsmoDoc.API/Controllers/WordController.cs (2)

2-7: Verify global usings cover missing namespaces
This file uses IConfiguration, IWebHostEnvironment, and ILogger without explicit using directives for Microsoft.Extensions.Configuration, Microsoft.AspNetCore.Hosting, and Microsoft.Extensions.Logging. Ensure these are provided via global usings or add them to prevent compiler errors.


37-44: Validate configuration keys before Path.Combine
Similar to PdfController, GetSection(...).Value can be null. Guard these values or switch to GetValue<string>(key) with defaults to avoid runtime exceptions.

🧰 Tools
🪛 GitHub Check: build

[warning] 40-40:
Possible null reference argument for parameter 'paths' in 'string Path.Combine(params string[] paths)'.

docs/site/xrefmap.yml (1)

4-10: Namespace rename looks consistent

All UID entries correctly switch from DocumentService to OsmoDoc. No further action required.

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