Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to exclude options from reflection data. #7

Merged
merged 1 commit into from
Sep 15, 2020

Conversation

timostamm
Copy link
Owner

This implements the file option "ts.exclude_options".

Right now, the following proto:

syntax = "proto3";
package spec;

import "google/api/annotations.proto";

service AnnotatedService {
    rpc Get (AnnoGetRequest) returns (AnnoGetResponse) {
        option (google.api.http) = {
            get: "/v1/{name=messages/*}"
        };
    };
}

Will have the google.api.http option in the reflection information. Adding the following lines to the file will exclude options matching the name "google.api.*" from being emitted in the reflection information:

import "protobuf-ts.proto";
option (ts.exclude_options) = "google.api.*";

@protobuf-ts/protoc will automatically add a --proto_path to protoc calls to pickup "protobuf-ts.proto" from the plugin package.

This is the base for more TypeScript specific options in proto files.

This adds a facility for protobuf-ts options in proto files and implements the file option "ts.exclude_options".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant