Skip to content

Commit b9f9e13

Browse files
authored
Merge pull request #50 from IlyaChichkov/develop
Develop 1.8.2
2 parents 74a2e08 + d41c5a4 commit b9f9e13

48 files changed

Lines changed: 6375 additions & 10562 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"csharpier": {
6-
"version": "1.8.1",
6+
"version": "1.8.2",
77
"commands": [
88
"csharpier"
99
],

.github/workflows/deploy.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,19 @@ jobs:
3030
run: |
3131
sudo apt-get update
3232
sudo apt-get install -y libcairo2-dev pkg-config python3-dev
33-
pip install cairosvg pycairo mkdocs mkdocs-material mkdocs-mermaid2-plugin mkdocs-minify-plugin mkdocs-macros-plugin mkdocs-llmstxt mkdocs-static-i18n
33+
# Added pyyaml to ensure the scripts have it available
34+
pip install cairosvg pycairo mkdocs mkdocs-material mkdocs-mermaid2-plugin mkdocs-minify-plugin mkdocs-macros-plugin mkdocs-llmstxt mkdocs-static-i18n pyyaml
35+
36+
- name: Format, Fix, and Validate API Docs
37+
run: |
38+
echo "🧹 Formatting YAML files..."
39+
python scripts/docs/mkdocs_format_yaml.py
40+
41+
echo "🔧 Auto-fixing HTTP methods..."
42+
python scripts/docs/mkdocs_fix_yaml_methods.py
43+
44+
echo "🔍 Running final validation check..."
45+
python scripts/docs/mkdocs_check_api.py
3446
3547
- name: Build site
3648
run: mkdocs build --site-dir public

.gitignore

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,44 @@
1-
.cursor
2-
.vscode/obj
3-
.venv
1+
# =========================
2+
# Python
3+
# =========================
4+
__pycache__/
5+
*.py[cod]
6+
*$py.class
7+
.venv/
48
*/.venv/
5-
*.cache
9+
10+
# =========================
11+
# C# & .NET
12+
# =========================
13+
[Bb]in/
14+
[Oo]bj/
15+
*.user
16+
.vs/
17+
*.suo
18+
19+
# =========================
20+
# MkDocs
21+
# =========================
622
site/
23+
public/
24+
25+
# =========================
26+
# IDEs & OS
27+
# =========================
28+
.cursor/
29+
.vscode/
30+
.DS_Store
31+
Thumbs.db
32+
33+
# =========================
34+
# Temp & Cache
35+
# =========================
36+
*.cache
737
tmp/
838
lib/
939

10-
Source/RIMAPI/obj/
40+
# =========================
41+
# RimWorld Build Outputs
42+
# =========================
1143
1.5/
1244
1.6/

About/About.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<description>RIMAPI is a mod that give you an REST API useable for your current game</description>
55
<packageId>RedEyeDev.RIMAPI</packageId>
66
<author>RedEyeDev</author>
7-
<modVersion>1.8.1</modVersion>
7+
<modVersion>1.8.2</modVersion>
88
<url></url>
99
<supportedVersions>
1010
<li>1.5</li>

About/Manifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<Manifest>
33
<identifier>redeyedev.rimapi</identifier>
4-
<version>1.8.1</version>
4+
<version>1.8.2</version>
55
<manifestUri>
66
https://raw.githubusercontent.com/IlyaChichkov/RIMAPI/refs/heads/main/About/Manifest.xml</manifestUri>
77
<downloadUri>https://github.com/IlyaChichkov/RIMAPI/releases</downloadUri>

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
# Changelog
2+
## v1.8.2
3+
4+
### Documentation Infrastructure (Refactor)
5+
6+
- Migrated from a single API YAML file to a modular, folder-based structure.
7+
- Multi-Language Support — Added dedicated localization folders (ja/, ru/) with fallback logic to ensure translated pages remain functional even if specific endpoints aren't yet translated.
8+
- Automated Validation — Introduced a Python-based sanity checker (mkdocs_check_api.py) that cross-references C# [Route] attributes against YAML documentation to prevent "documentation drift".
9+
- Auto-Fixer Tools — Added a synchronization script (mkdocs_fix_yaml_methods.py) that automatically updates YAML HTTP methods to match the C# source of truth.
10+
- Visual Enhancements — Implemented a tagging system (e.g., UI, Map, Pawn) with custom CSS badges to help users filter endpoints by category.
11+
12+
### Developer Workflow & CI/CD
13+
14+
- GitHub Actions Integration — Integrated the formatting, fixing, and validation scripts into the deployment pipeline to guarantee documentation accuracy on every push to master.
15+
- Improved Repository Hygiene — Optimized .gitignore to prevent Python bytecode (.pyc) and C# build artifacts from bloating the repository.
16+
17+
### Bug Fixes & API Refinement
18+
19+
- Unique Endpoint Routing — Refactored ImageController to use unique paths for GET and POST actions (e.g., /api/v1/item/change/image), resolving documentation collisions and improving REST clarity.
220

321
## v1.8.1
422

Source/RIMAPI/RIMAPI_Settings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class RIMAPI_Settings : ModSettings
1616
/// Current version of the RIMAPI mod.
1717
/// <para>Not saved to XML; used for UI display.</para>
1818
/// </summary>
19-
public string version = "1.8.1";
19+
public string version = "1.8.2";
2020

2121
/// <summary>
2222
/// Current supported API protocol version.

Source/RIMAPI/RimApi.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<RootNamespace>RIMAPI</RootNamespace>
77
<AssemblyName>RIMAPI</AssemblyName>
88
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
9-
<Version>1.8.1</Version>
9+
<Version>1.8.2</Version>
1010
</PropertyGroup>
1111

1212
<!-- Conditional properties for RimWorld 1.5 -->

Source/RIMAPI/RimworldRestApi/Core/Docs/DocumentationController.cs renamed to Source/RIMAPI/RimworldRestApi/BaseControllers/DocumentationController.cs

File renamed without changes.

Source/RIMAPI/RimworldRestApi/BaseControllers/ImagesController.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ public ImageController(IImageService imageService)
1717
}
1818

1919
[Get("/api/v1/item/image")]
20-
[EndpointMetadata("Get item's texture image in base64 format")]
2120
public async Task GetItemImage(HttpListenerContext context)
2221
{
2322
var name = RequestParser.GetStringParameter(context, "name");
@@ -26,16 +25,14 @@ public async Task GetItemImage(HttpListenerContext context)
2625
}
2726

2827
[Get("/api/v1/terrain/image")]
29-
[EndpointMetadata("Get terrain's texture image in base64 format")]
3028
public async Task GetTerrainImage(HttpListenerContext context)
3129
{
3230
var name = RequestParser.GetStringParameter(context, "name");
3331
var result = _imageService.GetTerrainImage(name);
3432
await context.SendJsonResponse(result);
3533
}
3634

37-
[Post("/api/v1/item/image")]
38-
[EndpointMetadata("Get item's texture image in base64 format")]
35+
[Post("/api/v1/item/change/image")]
3936
public async Task SetItemImage(HttpListenerContext context)
4037
{
4138
var requestData = await context.Request.ReadBodyAsync<ImageUploadRequest>();

0 commit comments

Comments
 (0)