-
Notifications
You must be signed in to change notification settings - Fork 6
refactor: rename to osmodoc and update related configs and docs #38
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
base: main
Are you sure you want to change the base?
Conversation
… all related namespaces
WalkthroughThis 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
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)
Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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(...).Valuemay be null, leading to a runtime exception onConvert.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 initializingPlaceholderslist
To avoid potential null-reference exceptions when consumingDocumentData, initializePlaceholderswith 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-propertiesPlaceholderandContentare 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
RenameLoginEmailtologinEmailto 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 theusingstatement; remove it to avoid potential compilation or encoding issues. Theusing System.Collections.Generic;directive is otherwise correct.
16-21: Suggest initializingDatato avoid null
Consider givingDataa 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
Theusing 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
BothPlaceholdersandTablesDataare 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 forParentBody.Table
The<summary>block forTableis 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, andPdfDocumentGenerator.GeneratePdfinvocation—are duplicated betweenGeneratePdfandGeneratePdfUsingEjs. 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.LogErrorcalls, 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 toWebRootPath(HTML/EJS templates and output PDFs) aren’t deleted after conversion. Over time, this may consume disk space. Consider deleting these files afterConvertFileToBase64Stringor 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: MapTablesDatavia AutoMapper
For consistency withPlaceholders, use AutoMapper to maprequest.DocumentData.TablesDatato domainTableDataobjects: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.LogErrorcalls 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
BothPlaceholderandContentare non-nullable but lack defaults. To preventnullassignments, 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; theeidentifier 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
ReplaceFileElementsWithMetaDatacreates aModifiedfolder that is never deleted;ConvertHtmlToPdfdeletes the HTML file but leaves the directory. Considerusingfor streams and atry/finallythat cleans up the entire temp directory once PDF generation completes.Also applies to: 109-110
OsmoDoc/Word/WordDocumentGenerator.cs (2)
110-113: Drop unusedexvariable
catch (Exception ex)re-throws without usingex, producing a warning. Use a barecatchor 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
⛔ Files ignored due to path filters (1)
OsmoDoc.API/wwwroot/Tools/wkhtmltopdf.exeis 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 forOsmoDoc.API.Helpersis 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 referencesOsmoDoc.API.csprojcorrectly. No further changes needed here.OsmoDoc.API/Helpers/CommonMethodsHelper.cs (1)
9-12: Static Analysis False Positive
Thestring.IsNullOrWhiteSpace(directoryName)check safely handles anullresult fromPath.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 theosmodocrepositoryCONTRIBUTING.mdas expected. Ensure no other template links still referencedocument-service.OsmoDoc.API/Models/WordGenerationRequestDTO.cs (1)
1-4: Consistent namespace and using directives rename
Theusing OsmoDoc.Word.Modelsandnamespace OsmoDoc.API.Modelsupdates correctly mirror the project-wide rebranding fromDocumentServicetoOsmoDoc.OsmoDoc.API/Helpers/AutoMappingProfile.cs (1)
1-12: Approve updated mapping profile and namespace
TheAutoMappingProfileclass has been correctly moved toOsmoDoc.API.Helpers, and the mapping callCreateMap<WordContentDataRequestDTO, ContentData>()aligns with the relocated model classes under the newOsmoDocnamespace.OsmoDoc.API/Models/PdfGenerationRequestDTO.cs (2)
1-4: Consistent namespace and using updates
The namespace and using directive have been correctly updated fromDocumentServicetoOsmoDocwithout altering functionality.
8-11: Model property updated correctly
Properties correctly reference the newDocumentDataDTO inOsmoDoc.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 referenceOsmoDoc.Word.Modelsinstead ofDocumentService.Word.Models.
70-93:Details
✅ Verification successful
Cross-reference links updated
Alldata-uidattributes and hyperlinks target the newOsmoDoc.Word.Modelsnamespace. Verify no lingeringDocumentService.Word.Modelsreferences remain.
🏁 Script executed:
#!/bin/bash # Verify no leftover DocumentService namespace in Word.Models docs rg -R "DocumentService.Word.Models" docs/site/10.0.2/apiLength 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/apiLength of output: 56
No leftover DocumentService.Word.Models references
A search ofdocs/site/10.0.2/apiforDocumentService.Word.Modelsreturned no matches, confirming all cross-reference links now targetOsmoDoc.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 showOsmoDoc.Word.
70-84:Details
✅ Verification successful
Article
data-uidand links updated
Thedata-uid, heading IDs, and class link have been renamed to useOsmoDoc.Word. Ensure no residualDocumentService.Wordentries 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.htmlLength 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" docsLength of output: 94
All
DocumentService.Wordreferences removed
Verified that no occurrences ofDocumentService.Wordremain indocs/site/10.0.2/api/OsmoDocWord.htmlor elsewhere in thedocs/tree. Alldata-uid, heading IDs, and links consistently useOsmoDoc.Word.Dockerfile (2)
13-19: Consistent project rename in COPY and restore steps
TheCOPYcommands and subsequentdotnet restoreinvocations correctly referenceOsmoDoc.APIandOsmoDoc. All paths align with the new project structure.
48-48: Verify entrypoint matches published DLL
The entrypoint is updated toOsmoDoc.API.dll. Confirm that the published assembly name is indeedOsmoDoc.API.dll.OsmoDoc.API/Helpers/AuthenticationHelper.cs (1)
6-6: File-scoped namespace updated correctly
The namespace is nowOsmoDoc.API.Helpersusing 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
Thedata-uidattributes and<h1>ID have been renamed toOsmoDoc.Word.Models.TableData. This aligns the HTML doc with the new namespace.
107-108: Namespace and assembly references updated
The<h6>tags now correctly displayNamespace: OsmoDoc.Word.ModelsandAssembly: OsmoDoc.dll.
115-116: Data property anchor updated
Theidanddata-uidfor theDataproperty have been updated to use theOsmoDocprefix.
139-140: TablePos property anchor updated
Theidanddata-uidfor theTablePosproperty have been updated accordingly.OsmoDoc.API/DotEnv.cs (1)
1-1: File-scoped namespace updated correctly
The namespace declaration has been changed fromDocumentService.APItoOsmoDoc.APIas expected.docs/site/manifest.json (2)
3-4: Rename base source path
Thesource_base_pathhas been updated to point atosmodoc, reflecting the project folder rename.
8-62: Update managed reference paths for OsmoDoc models
Allsource_relative_pathandrelative_pathentries for the managed reference files have been renamed fromDocumentServicetoOsmoDocacross the manifest.docs/site/10.0.2/api/OsmoDoc.Word.Models.ContentData.html (5)
70-74: Namespace identifiers updated correctlyAll
data-uidandidattributes for theContentDataclass have been changed to useOsmoDoc.Word.Models.ContentData.
107-108: Assembly and namespace labels alignedThe
<h6>elements now correctly referenceOsmoDocas the namespace and assembly.
115-116: Property anchors updatedThe anchor and heading for the
Contentproperty have been renamed toOsmoDoc.Word.Models.ContentData.Content.
156-156: Type link correctedThe cross-reference link for
ContentTypenow points toOsmoDoc.Word.Models.ContentType.html.
179-179: Type link correctedThe cross-reference link for
ParentBodynow points toOsmoDoc.Word.Models.ParentBody.html.README.md (7)
1-2: Project title and description renamedThe README header and introductory sentence correctly use
OsmoDocinstead ofDocumentService.🧰 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 updatedThe repository clone command now references
osmodoc.
52-52: Docker Compose section renamedThe dockerize instructions now refer to
osmodoc.
103-103: Windows Tools section updatedThe
OsmoDoc.dllpath instructions are correctly updated for the new project name.
126-127: Code snippet file paths renamedThe C# example uses
OsmoDocin the template and output file paths.
190-190: License link updatedThe MIT license URL now points to the
osmodocrepository.
193-194: Contributors badge updatedThe contributors image reference now targets the
osmodocrepo.CONTRIBUTING.md (8)
1-2: Header and project name updatedThe contributing guide title and welcome message now use
OsmoDoc.
17-17: Support channel updatedGeneral support is now directed to Stack Overflow with the
osmodoctag.
26-27: Issue submission links updatedThe links for reporting bugs and creating pull requests point to the
osmodocrepository.
37-37: Project reference in bug report checklistThe bullet listing of the project version is updated to
osmodoc.
43-43: New-issue form link correctedThe “new issue form” URL now refers to
osmodoc.
49-49: Pull-requests link updatedThe PR search link points to the
osmodocpulls page.
66-66: Target branch instruction renamedThe guidance now instructs sending PRs to
osmodoc:main.
68-71: Commit guidance icons and project name updatedThe example bullets now reflect
osmodocin the styling section.docs/site/10.0.2/api/OsmoDoc.Word.Models.DocumentData.html (5)
70-74: Namespace identifiers updated correctlyThe
<article>element and heading now referenceOsmoDoc.Word.Models.DocumentData.
107-108: Assembly and namespace labels alignedThe namespace and assembly
<h6>tags reflectOsmoDoc.
115-116: Placeholders property anchors updatedThe anchor and heading for
Placeholdersnow useOsmoDoc.Word.Models.DocumentData.Placeholders.
133-133: Type link correctedThe link for
ContentDatawithinList<ContentData>points to the newOsmoDocpath.
156-156: Type link correctedThe link for
TableDatawithinList<TableData>now points toOsmoDoc.Word.Models.TableData.html.OsmoDoc.API/Program.cs (4)
1-12: Using directives updatedAll
usingstatements now referenceOsmoDoc.APIinstead ofDocumentService.API.
23-27: DotEnv loader namespace adjustedThe call to load environment variables uses
OsmoDoc.API.DotEnv, matching the renamed namespace.
47-60: Swagger documentation title updatedThe
OpenApiInfotitle now correctly reads"OsmoDoc API".
1-137:Details
✅ Verification successful
Verify no residual
DocumentServicereferences remainPlease ensure there are no stray
DocumentServicestrings in this file.
🏁 Script executed:
#!/bin/bash # Search for any remaining DocumentService references in Program.cs rg "DocumentService" -n OsmoDoc.API/Program.csLength of output: 46
No residual
DocumentServicereferences in Program.cs
Ripgrep search confirms there are zero occurrences ofDocumentServiceinOsmoDoc.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 fromDocumentServicetoOsmoDoc, 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
Thedocument-serviceservice has been rebranded toosmodoc, 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 oldDocumentServicenamespace toOsmoDoc.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 namespaceOsmoDoc.Word.Modelsis properly declared.
6-14: XML docs andTablePosproperty
The XML summary clearly describesTablePos, 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 fromDocumentServicetoOsmoDoc. 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(...).Valuemay returnnull, leading toArgumentNullExceptioninPath.Combine. UseGetValue<string>(key)with a default or explicitly check fornulland 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 usesIConfiguration,IWebHostEnvironment, andILoggerwithout explicitusingdirectives forMicrosoft.Extensions.Configuration,Microsoft.AspNetCore.Hosting, andMicrosoft.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 toPdfController,GetSection(...).Valuecan benull. Guard these values or switch toGetValue<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 consistentAll UID entries correctly switch from
DocumentServicetoOsmoDoc. No further action required.
Task Link
Description
Summary by CodeRabbit