More detail about a `.wire` file
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 4.4k
- Forks
- 627
- Avg merge
- 3d 15m
- Merged PRs (30d)
- 20
Description
By reading the source code, I found that it supports a mechanism called profile, which is described by the .wire file,describes how to map .proto to .java.
But I did not find a more detailed document or sample code to illustrate how to use this mechanism.For example, the TypeConfigElement information in the profile file seems to describe the configuration of different fields, but I don't quite understand how to use it for the val with: List<OptionElement> = emptyList(), field.
I'm dealing with a requirement—— I hope to keep some fields in the original java file when generating (more precisely, updating) java through the proto file. These fields may not be declared and defined in the proto file. It seems that it can be configured with the with information of this profile file, but I don't know how to do it. Can anyone give me some explanations or examples.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the source code for profiles, TypeConfigElement, and the with field in the .wire configuration. Document how profiles map .proto fields to generated .java fields, with a sample showing the relevant configuration and whether existing Java fields can be retained.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100