OpenAPI document with Swagger UI (task 60) #27
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/openapi-docs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Document at
/openapi/v1.json, Swagger UI at/swagger, in every environment except Production — verified by running underASPNETCORE_ENVIRONMENT=Productionand confirming the document, page and UI assets all 404 while/healthstill answers 200. The document declares a bearer scheme and no security requirement, ready for task 52. Prose comes from XML doc comments, with/healthas the worked example. Choice of Swagger UI over Scalar is in ADR-0029.The "all endpoints documented" criterion is only partly satisfiable today — the API has
/healthplus the test-only endpoints from ADR-0022 and ADR-0025. This establishes the convention feature endpoints will follow rather than inventing endpoints to document.Two things this imposes on everything that follows:
PlaceMark.Contractsnow setsGenerateDocumentationFile, so an undocumented public member there is a build error. Anyone adding wire types must give them doc comments.PlaceMark.Api.csprojcarries a directMicrosoft.OpenApi2.11.0 reference solely to escape GHSA-v5pm-xwqc-g5wc in the 2.0.0 thatMicrosoft.AspNetCore.OpenApi10.0.10 resolves. It is a pin that holds the library back — delete it when a framework release resolves a patched version.One unrelated fix was needed to build with documentation files on: an ambiguous
crefinRequestValidator.cs.docs/adr/README.mdwill conflict with the PRs in flight — keep the rows in numeric order.BearerSecuritySchemeTransformer.SchemeNameis used both as thesecuritySchemesdictionary key and asScheme(the HTTP auth scheme, RFC 6750) — renaming the key to anything else would silently emit an invalidschemeand make the UI sendAuthorization: <newkey> <token>; split into two constants.PlaceMark.Api.xmlandPlaceMark.Contracts.xmlland in the publish output but are read only at build time — deleting both from a published Release output leaves the summaries and schema descriptions intact in the served document, so add<PublishDocumentationFile>false</PublishDocumentationFile>beside eachGenerateDocumentationFileand keep the internal prose out of the deployed artefact.Verdict: mergeable
Both actioned in
69d4490— key and RFC 6750 scheme split into separate constants; documentation files kept out of the publish output byPublishDocumentationFiles(plural) on PlaceMark.Api, since the singular property leavesPlaceMark.Contracts.xmlbehind.Paused. The
Verdict: mergeableabove is againsted31432and both its findings were actioned in69d4490, so it is stale by one commit — this needs a confirming look ated31432..69d4490before it merges, not a fresh review.Both fixes hold, including the
PublishDocumentationFilesingular/plural claim. Nothing to action.Verdict: mergeable