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

Schema with same class, record or enum for different fields throws error #246

Open
RufusK opened this issue Dec 21, 2023 · 1 comment
Open

Comments

@RufusK
Copy link

RufusK commented Dec 21, 2023

Hi, we have a bug, that (at least for enums) we thought was fixed.
If we use the same class, enum or record in different fields of a message like this:

`
public class OrderMessage
{
public Address Address1 {get; set;}
public Address Address2 {get; set;}
}

public class Address
{
public string Street {get; set;}
}
`

then we get the following error when trying to produce a message:

System.Exception: Can not resolve JsonSchema 'type' id of "record", not recognized as one of standard values: [STRING, NUMBER, INTEGER, BOOLEAN, OBJECT, ARRAY, NULL, ANY] at <StartupCode$Pulsar-Client>[email protected]() at <StartupCode$Pulsar-Client>[email protected]() at <StartupCode$Pulsar-Client>[email protected]() at <StartupCode$Pulsar-Client>[email protected]()

There has been a similar issue: #201 that was originally fixed by a coworker.
We are wondering what can cause this to be back.

We use Pulsar Server Version 2.9.2; pulsar-client-dotnet 2.15.0

Thanks in advance

@Lanayx
Copy link
Member

Lanayx commented Dec 21, 2023

Hi, @RufusK ! First, I don't see that this issue relates to the previous in any way. Second, schema generation is handled by separate library (https://github.com/eaba/AvroSchemaGenerator), so please check it's generated output for your case and create issue there if something is wrong with it.

UPDATE: found something related apache/pulsar#6768

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

No branches or pull requests

2 participants