Ignore:
Timestamp:
Aug 17, 2023, 4:57:23 PM (17 months ago)
Author:
alloc
Message:

21.1.16.0 release
Completed OpenAPI specs
Add support to path handlers to register OpenAPI specs
Fixed ItemIconHandler throwing error when requested path contains no dot

Location:
TFP-WebServer/MapRendering
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • TFP-WebServer/MapRendering/MapRendering.csproj

    r453 r463  
    112112    </ProjectReference>
    113113  </ItemGroup>
     114  <ItemGroup>
     115    <EmbeddedResource Include="src\Api\Map.openapi.yaml" />
     116    <EmbeddedResource Include="src\MapTileHandler.openapi.yaml" />
     117  </ItemGroup>
    114118</Project>
  • TFP-WebServer/MapRendering/ModInfo.xml

    r453 r463  
    55        <Description value="Render the game map to image map tiles as it is uncovered" />
    66        <Author value="The Fun Pimps LLC" />
    7         <Version value="21.1.9.0" />
     7        <Version value="21.1.16.0" />
    88        <Website value="" />
    99</xml>
  • TFP-WebServer/MapRendering/src/ModApi.cs

    r425 r463  
    66        [UsedImplicitly]
    77        public class ModApi : IModApi {
     8                private const string mapTilesBaseUrl = "/map/";
     9               
    810                public void InitMod (Mod _modInstance) {
    911                        ModEvents.GameStartDone.RegisterHandler (GameStartDone);
     
    1416                                }
    1517
    16                                 _web.RegisterPathHandler ("/map/", new StaticHandler (
     18                                _web.RegisterPathHandler (mapTilesBaseUrl, new StaticHandler (
    1719                                        $"{GameIO.GetSaveGameDir ()}/map",
    1820                                        MapRenderer.GetTileCache (),
     
    2022                                        "web.map")
    2123                                );
     24
     25                                _web.OpenApiHelpers.RegisterCustomSpec (GetType ().Assembly, "MapTileHandler", mapTilesBaseUrl);
    2226                        };
    2327                }
Note: See TracChangeset for help on using the changeset viewer.