Description
Aim here is to remove the current requirement to specify the CodeGenerator
metadata on <Service...Reference>
(soon <OpenApiReference>
and <ProtobufReference>
) items in a project file.
Some metadata must remain to say "give me TypeScript" (instead of project's default language) but this should be the exception and not the rule. Fortunately, the type of document is going to be explicit (again <OpenApiReference>
and <ProtobufReference>
) and we won't have to choose among multiple tools. Probably best to make TargetLanguage
the main override we provide in this area. (@glennc agreed?)
This change will require our Open API code generation partners (NSwag, AutoRest, ...) either all implement the same target name or include a well-known property specifying their target's prefix. Either way, the last file that declares a target or updates a property wins. So, unless our partners object, let's avoid the indirection and go with a single Open API target name. (gRPC doesn't have multiple partners for the foreseeable future and should be fine with a single target for that scenario.)