yandex-cloud / cloudapi

Interface definitions of Yandex.Cloud API
MIT License
85 stars 34 forks source link

The repository structure doesn't correspond to imports inside proto files ("third_party/googleapis/" part is missing in paths) #1

Closed mmarinchenko closed 4 years ago

mmarinchenko commented 5 years ago

Hi, guys!

I guess the title says it all. Plugins for code generation expect valid directory structure. For example you may read about this here (see ProtoRoot).

Because of wrong directory structure this repository cannot be just linked as git submodule to other repository. It requires manual path modification.

baranov1ch commented 5 years ago

Hi, thanks for the feedback :)

Unfortunately we haven't tested yet integration with this plugin. The current directory structure works for python, java-maven (probably with some tweaks) and golang (which requires special magic anyway).

Hope we'll look more closely into the issue soon

mmarinchenko commented 5 years ago

Ok I see) Thanks for the quick response!

Another issue I faced with this plugin is common output directory setting. So when used the generated C# class for yandex/api/operation.proto is overwritten by generated class for yandex/cloud/operation/operation.proto :)

This is not your fault of course but it would be nice to avoid the same naming for different objects even in different namespaces. Not just because of this plugin but also for better code readability.

Otherwise, everything seems to be worked as expected. Cool!)

mmarinchenko commented 5 years ago

For those who may be interested I leave here a VS 2017 project configuration sample showing how to compile YC API protos in C#.

YandexCloud.API.txt

mmarinchenko commented 4 years ago

It seems the ProtoRoot can contain multiple directories separated by semicolon (see comment at issue #4).

mmarinchenko commented 4 years ago

Updated VS 2017 project configuration sample showing how to compile YC API protos in C# based on the info from issue #4.

YandexCloud.API (new).txt