Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/protobuf-net.Grpc.Reflection/SchemaGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@ public sealed class SchemaGenerator
/// <summary>
/// Gets or sets the syntax version
/// </summary>
public ProtoSyntax ProtoSyntax { get; set; } = ProtoSyntax.Proto3;
public ProtoSyntax ProtoSyntax { get => Options.Syntax; set => Options.Syntax = value; }

/// <summary>
/// Gets or sets the options for the generation of the schema.
/// </summary>
public SchemaGenerationOptions Options { get; set; } = new SchemaGenerationOptions
{
Syntax = ProtoSyntax.Proto3
};

/// <summary>
/// Gets or sets the binder configuration (the default configuration is used if omitted)
Expand Down Expand Up @@ -118,8 +126,10 @@ public string GetSchema(params Type[] contractTypes)

var options = new SchemaGenerationOptions
{
Syntax = ProtoSyntax,
Syntax = Options.Syntax,
Package = globalPackage,
Flags = Options.Flags,
Origin = Options.Origin,
};
options.Services.AddRange(services);

Expand Down