mirror of
https://github.com/bitwarden/server
synced 2025-12-06 00:03:34 +00:00
Change swagger docs to refer to main (#6337)
This commit is contained in:
@@ -17,8 +17,6 @@ namespace Bit.SharedWeb.Swagger;
|
||||
/// </summary>
|
||||
public class SourceFileLineOperationFilter : IOperationFilter
|
||||
{
|
||||
private static readonly string _gitCommit = GitCommitDocumentFilter.GitCommit ?? "main";
|
||||
|
||||
public void Apply(OpenApiOperation operation, OperationFilterContext context)
|
||||
{
|
||||
|
||||
@@ -27,7 +25,7 @@ public class SourceFileLineOperationFilter : IOperationFilter
|
||||
{
|
||||
// Add the information with a link to the source file at the end of the operation description
|
||||
operation.Description +=
|
||||
$"\nThis operation is defined on: [`https://github.com/bitwarden/server/blob/{_gitCommit}/{fileName}#L{lineNumber}`]";
|
||||
$"\nThis operation is defined on: [`https://github.com/bitwarden/server/blob/main/{fileName}#L{lineNumber}`]";
|
||||
|
||||
// Also add the information as extensions, so other tools can use it in the future
|
||||
operation.Extensions.Add("x-source-file", new OpenApiString(fileName));
|
||||
|
||||
Reference in New Issue
Block a user