[
https://issues.apache.org/jira/browse/AVRO-3427?focusedWorklogId=737562&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-737562
]
ASF GitHub Bot logged work on AVRO-3427:
----------------------------------------
Author: ASF GitHub Bot
Created on: 07/Mar/22 15:15
Start Date: 07/Mar/22 15:15
Worklog Time Spent: 10m
Work Description: kordos commented on pull request #1578:
URL: https://github.com/apache/avro/pull/1578#issuecomment-1060797575
> Thanks for the use! that makes sense. However the patch you submitted will
flatten the directory and there wont be any `../codegentest/testdata/...`
sub-directories. Your above example is acombinatio of sub directories + some
sub directory structure is replaced by one songle directory with dotted names.
How would you be using the avrogen with patches submitted to generate the files
in the above example? `avrogen -s example.avsc
org.apache.avro/codegentest/testdata --skip-directories` might work, however if
you have many namespaces, the avrogen commands will be custom for individual
schema files.
I could use it in two ways:
`avrogen -s org.apache.avro/codegentest/testdata/example.avsc
org.apache.avro/codegentest/testdata --skip-directories`
or go to the end directory and run:
```
cd org.apache.avro/codegentest/testdata
avrogen -s example.avsc . --skip-directories
```
Then no matter which naming convention you're using in your project, it will
always generate classes in correct directory.
Also it can be easily integrated with custom tool which I'm also thinking to
build:
1. Get directory as and input
2. get all .avsc files
3. generate classes for each schema
Such tool would be very helpfull as avrogen can handle only 1 file so when
you have many files then it gets quite annoying.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 737562)
Time Spent: 5h 40m (was: 5.5h)
> Add command line option to skip creation of directories based on namespace
> path
> -------------------------------------------------------------------------------
>
> Key: AVRO-3427
> URL: https://issues.apache.org/jira/browse/AVRO-3427
> Project: Apache Avro
> Issue Type: Improvement
> Components: csharp
> Affects Versions: 1.11.0
> Reporter: Paweł Kordowski
> Priority: Major
> Labels: pull-request-available
> Time Spent: 5h 40m
> Remaining Estimate: 0h
>
> In java each part of the namespace is a separate directory but that's not the
> case for C#.
> In C# you can have directory name that have many namespaces in it.
> For example:
> {noformat}
> Application.Manager.Api{noformat}
> can be a single directory name. In Java it would be 3 separate directories
> and because of that classes are generated under wrong path. it is placed in:
> {noformat}
> /Application/Manager/Api/{noformat}
> but it should be placed like here:
> {noformat}
> /Application.Manager.Api/{noformat}
> I think the best solution would be to add command line option that would skip
> creation of directories based on namespace and it would just create classes
> directly in pointed directory.
>
> Regards,
> Pawel
--
This message was sent by Atlassian Jira
(v8.20.1#820001)