[
https://issues.apache.org/jira/browse/AVRO-2633?focusedWorklogId=740065&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-740065
]
ASF GitHub Bot logged work on AVRO-2633:
----------------------------------------
Author: ASF GitHub Bot
Created on: 11/Mar/22 14:10
Start Date: 11/Mar/22 14:10
Worklog Time Spent: 10m
Work Description: massada opened a new pull request #1596:
URL: https://github.com/apache/avro/pull/1596
Make sure you have checked _all_ steps below.
### Jira
- [x] My PR addresses the following [Avro
Jira](https://issues.apache.org/jira/browse/AVRO-3003)
- https://issues.apache.org/jira/browse/AVRO-3003
- In case you are adding a dependency, check if the license complies with
the [ASF 3rd Party License
Policy](https://www.apache.org/legal/resolved.html#category-x).
### Tests
- [x] My PR adds the following unit tests __OR__ does not need testing for
this extremely good reason:
- Add a new test case to the Avro.Test.CodeGenTest.TestCodeGen unit test
- Enable the tests to run under .NET Core by adding compilation support with
the Microsoft.CodeAnalysis.CSharp package
### Commits
- [x] My commits all reference Jira issues in their subject lines. In
addition, my commits follow the guidelines from "[How to write a good git
commit message](https://chris.beams.io/posts/git-commit/)":
1. Subject is separated from body by a blank line
1. Subject is limited to 50 characters (not including Jira issue reference)
1. Subject does not end with a period
1. Subject uses the imperative mood ("add", not "adding")
1. Body wraps at 72 characters
1. Body explains "what" and "why", not "how"
### Documentation
- [x] In case of new functionality, my PR adds documentation that describes
how to use it.
- All the public functions and the classes in the PR contain Javadoc that
explain what it does
--
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: 740065)
Time Spent: 0.5h (was: 20m)
> C# - AvroGen tool - Document for record type is not included in the Schema
> field
> --------------------------------------------------------------------------------
>
> Key: AVRO-2633
> URL: https://issues.apache.org/jira/browse/AVRO-2633
> Project: Apache Avro
> Issue Type: Bug
> Components: csharp
> Affects Versions: 1.9.1
> Reporter: Minh Nguyen
> Assignee: Tom Irvine
> Priority: Critical
> Labels: pull-request-available
> Fix For: 1.11.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Steps to reproduce:
> 1) MyRecord.asvc file :
>
> {code:java}
> {
> "type" : "record",
> "doc" : "Doc for record"
> "name" : "MyRecord",
> "namespace" : "My.Namespace",
> "fields" :
> [
> { "name" : "Field1", "type" : "int" }
> ]
> }
> {code}
> 2) Run command to generate C# class from the Avro spec file:
> avrogen -s MyRecord.asvc ./
> -> Current behavior: the Schema field in C# class is missing the "doc" data,
> I got serialization error when tried to use this class because the subject in
> Schema Registry contains the "doc" field (I register the avro spec file to
> the schema registry seperately)
> {code:java}
> public partial class MyRecord : ISpecificRecord
> {
> public static Schema _SCHEMA =
> Schema.Parse("{\"type\":\"record\",\"name\":\"MyRecord\",\"namespace\":\"My.Namespace\",\"fields\":[{\"name\":\""
> + "Field1\",\"type\":\"int\"}]}");
> {code}
> -> Expected behavior: we should have the "doc" field for type "record", so it
> will be consistent with the spec file
> {code:java}
> public partial class MyRecord : ISpecificRecord
> {
> public static Schema _SCHEMA =
> Schema.Parse("{\"type\":\"record\", \"doc\":\"Doc for record\",
> \"name\":\"MyRecord\", \"namespace\":\"My.Namespace\",
> \"fields\":[{\"name\":\"" + "Field1\",\"type\":\"int\"}]}");
> {code}
> As a work around, right now I have to remove the "doc" for the type "record"
> but I think we should have it there and not causing a problem.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)