mirror of
https://github.com/bitwarden/server.git
synced 2025-12-10 00:42:07 -06:00
Change swagger docs to refer to main (#6337)
This commit is contained in:
parent
6ade09312f
commit
b4a0555a72
@ -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));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user