-
Hello, possibly a very simple question since I appear to be a moron: What is the URL of the SwaggerUI when self-hosting the Dockerfile?
And yes, the base path is correct, since |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I think one of the downsides to #52 is that the API itself doesn't include it's OpenAPI specification anymore. This is definitely something we need to address |
Beta Was this translation helpful? Give feedback.
-
For anyone finding this: Until the issue is addressed, you can build a very rough local replica of the GitHub pages deployment using a custom Dockerfile: FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
# Install DocFX
RUN dotnet tool install --tool-path=/tools docfx
RUN git clone https://github.com/helldivers-2/api
WORKDIR /api
# Initial static JSON schema submodule
RUN git submodule update --init ./src/Helldivers-2-Models/json
# Generate OpenAPI JSON files
RUN dotnet build -c Debug
# Generate DocFX metadata
RUN /tools/docfx metadata
# Generate DocFX site
RUN /tools/docfx build docfx.json
FROM nginx:stable-alpine AS final
COPY --from=build ["/api/_site", "/usr/share/nginx/html"]
EXPOSE 80
|
Beta Was this translation helpful? Give feedback.
good news @stnokott I've added OpenAPI support in #73
could you check out that feature branch locally and see if running the containers as documented works?
to save you some clicks, once you're on the feature branch (pending merge) you should be able to build a container with OpenAPI support like this: