I think there are some things that will need to be added (service address, auth info)
@timburks you mentioned here that we should add additional information to the generated output.
Service address:
An example input file might look like this:
input.yaml: (OpenAPI spec)
server:
- url: https://development.gigantic-server.com/v1
description: Development server
- url: https://staging.gigantic-server.com/v1
description: Staging server
- url: https://api.gigantic-server.com/v1
description: Production server
An example output file generated by gnostic-grpc might look like this:
output.proto: (Proto Buf file)
service SomeService {
// Use the first one if multiple addresses are given
option (google.api.default_host) = "development.gigantic-server.com/v1";
// Other code...
}
We can use the default_host service option for that.
Auth info:
Essentially, we want the information of a security scheme object reflected inside the generated proto file.
How should this object be represented inside the generated output file?
As far as I understand, for Google Cloud, one could define a service configuration where additional information (i.e.: authentication) can be provided. This config maps to the service.proto where also the mentioned auth.proto is defined.
We see that for HTTP rules it does not matter whether we define them inside the service config or inside the proto file, however this does not seem to be possible for other configurations.
@timburks and @noahdietz additional input would be helpful.